Anti-creeping USB interface serial communication circuit and intelligent door lock

By using resistor and diode network design in the USB interface serial communication circuit, the leakage current problem of the USB to serial port circuit in the prior art is solved in scenarios where the USB to serial port circuit is not suitable for using the USB protocol, and the effect of low power consumption and normal communication is achieved.

CN222867088UActive Publication Date: 2025-05-13HANGZHOU COMMNET
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422282335.9
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-05-13
Estimated Expiration
2034-09-19

AI Technical Summary

Technical Problem

In scenarios where the existing USB to serial port circuit is not suitable for using the USB protocol, there is a leakage current problem, which increases power consumption and affects the communication effect.

Method used

A USB interface serial communication circuit is designed, using a simple resistor and diode network to realize signal conversion. Through the unidirectional conduction characteristics of diodes D1 and D2, it prevents leakage current, and when the USB interface is not connected to an external device, the circuit is kept in a disconnected state to reduce power consumption.

Benefits of technology

It effectively prevents leakage current, reduces the power consumption of the circuit, and ensures the normal progress of communication. It is suitable for equipment with strict power consumption requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222867088U_ABST
    Figure CN222867088U_ABST
Patent Text Reader

Abstract

The utility model relates to an anti-creeping USB interface serial port communication circuit and an intelligent door lock. The USB interface serial port communication circuit comprises a main control chip, a USB interface, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1 and a diode D2. According to the anti-creeping USB interface serial port communication circuit and the intelligent door lock designed by the utility model, signal conversion is realized by adopting a simple resistor and diode network, so that the problems of how to use a USB interface to carry out serial port communication and how to simultaneously take the effects of preventing creeping and reducing power consumption into consideration in a scene that a USB protocol is not suitable to be used are effectively solved, and the anti-creeping USB interface serial port communication circuit and the intelligent door lock are suitable for popularization and application. Therefore, normal communication is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of communication circuits, in particular to a leakage-proof USB interface serial communication circuit and an intelligent door lock. Background Art

[0002] In the prior art, USB interfaces are widely used in various products due to their strong versatility and ease of use, and are mainly used for communication and upgrading with product motherboards. Usually, these applications use the USB communication protocol, but the current USB protocol itself has some limitations, such as occupying a large storage space and a complex protocol, which makes it unsuitable for some products.

[0003] Taking smart door lock products as an example, due to the various functions of door locks, there are strict requirements for low power consumption and compact circuit layout, so it is not suitable to use USB protocol. However, considering that the frequency of firmware upgrades in emergency situations is low and the amount of upgrade package data is not large, choosing serial communication method has become a feasible solution. In this case, the USB interface is only used as a physical connection method, and the actual transmission is still the serial communication signal.

[0004] At present, the most common method to realize USB to serial port conversion is to use a dedicated conversion chip, such as CH340, etc. Its typical circuit is as follows: Figure 1 As shown, however, this solution has some shortcomings in practical applications: first, the conversion chip requires an external crystal oscillator, an additional power supply circuit, etc., resulting in more peripheral devices, usually in the form of modules, which undoubtedly increases the cost of the product; secondly, ideally, if the levels of the two serial ports are the same, they can be directly cross-connected for communication, but in actual use, it is difficult to determine in advance whether the working levels of the two serial ports are consistent. If the working levels of the two serial ports are different, the voltage difference between them may cause leakage current and increase power consumption, which is fatal for devices with strict power consumption requirements. At the same time, leakage current will also affect the communication effect and even cause communication failure. Summary of the invention

[0005] In order to solve the above problems, the utility model provides a USB interface serial communication circuit and a smart door lock that use a USB interface to implement serial communication in scenarios where the USB protocol is not suitable, which can effectively prevent leakage to reduce power consumption while ensuring normal communication.

[0006] In order to achieve the above-mentioned purpose, in a first aspect, an embodiment of the present application provides a USB interface serial communication circuit, including a main control chip, a USB interface, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1 and a diode D2, the main control chip having a TXD pin, a RXD pin and a VCC pin, the USB interface having a power pin, a D+ signal pin and a D- signal pin; the TXD pin is connected to the cathode of the diode D1, the anode of the diode D1 is connected to the D+ signal pin, the RXD pin is connected to the cathode of the diode D2, the anode of the diode D2 is connected to the D- signal pin, the resistor R1 and the resistor R3 are connected in series and between the TXD pin and the RXD pin, the resistor R2 and the resistor R4 are connected in series and in parallel between the D+ signal pin and the D- signal pin, the VCC pin is connected to the connection point between the resistor R1 and the resistor R3, and the power pin is connected to the connection point between the resistor R2 and the resistor R4.

[0007] In order to improve circuit efficiency, the diode D1 and the diode D2 are both switching diodes.

[0008] In order to ensure the normal operation of the circuit, the main control chip and the USB interface both have a GND pin, and the GND pin is grounded.

[0009] In order to improve the stability and reliability of the circuit, it is characterized in that when the USB interface is connected to an external device, the power pin provides a 5V DC voltage; the resistance values ​​of the resistors R1, R2, R3 and R4 are 10kΩ.

[0010] In a second aspect, an embodiment of the present application provides a smart door lock having the leakage-proof USB interface serial communication circuit described in any embodiment of the first aspect.

[0011] The leakage-proof USB interface serial communication circuit and intelligent door lock designed by the utility model adopt a simple resistor and diode network to realize signal conversion, which effectively solves the problem of how to use the USB interface for serial communication in scenarios where the USB protocol is not suitable, and takes into account both leakage prevention and power consumption reduction, thereby ensuring normal communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a typical USB to serial port circuit diagram in the prior art;

[0013] Figure 2 It is a circuit diagram of a USB interface serial communication circuit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0015] Example 1.

[0016] like Figure 2 As shown, in the first aspect, an embodiment of the present application provides a USB interface serial communication circuit, including a main control chip 100, a USB interface 200, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1 and a diode D2, the main control chip 100 has a TXD pin, a RXD pin and a VCC pin, the USB interface 200 has a power pin 201, a D+ signal pin and a D- signal pin; the TXD pin is connected to the cathode of the diode D1, the anode of the diode D1 is connected to the D+ signal pin, the RXD pin is connected to the cathode of the diode D2, the anode of the diode D2 is connected to the D- signal pin, the resistor R1 and the resistor R3 are connected in series and between the TXD pin and the RXD pin, the resistor R2 and the resistor R4 are connected in series and in parallel between the D+ signal pin and the D- signal pin, the VCC pin is connected to the connection point between the resistor R1 and the resistor R3, and the power pin 201 is connected to the connection point between the resistor R2 and the resistor R4.

[0017] In this embodiment, when the USB interface 200 is connected to an external device, the power pin 201 provides a 5V DC voltage; the resistance values ​​of the resistors R1, R2, R3 and R4 are 10kΩ.

[0018] In specific implementation, the main control chip 100 can be an STM32 microcontroller. When the USB interface 200 is not connected to an external device, its power pin 201 has no voltage input. At this time, due to the unidirectional conduction characteristics of the diode D1, the signal of the TXD pin can be effectively prevented from outputting current. Even if the RXD pin signal line can add the voltage of the VCC pin to the anode of the diode D1 through the diode D2, the voltage difference across the diode D1 is not enough to make it conductive, so the two signal lines corresponding to the TXD and RXD pins are actually in a disconnected state, and the circuit power consumption is extremely low. In other words, only when the USB interface 200 is connected to a device, the entire circuit will start to work.

[0019] When the VCC pin voltage of the main control chip 100 is +5V, although the D+ signal pin and the RXD pin are both in a high level state, the voltages across the diodes D1 and D2 are equal and cannot be turned on, so the two signal lines are still in a disconnected state and no communication will be performed at this time. When communication starts, if the TXD pin or the D- signal pin becomes a low level, a 5V voltage difference will be generated across the diodes D1 and D2, causing the diodes to turn on, thereby causing the D+ signal pin and the RXD pin to also become a low level. In this way, the levels of the D+ signal pin and the RXD pin will always follow the level changes of the TXD pin and the D- signal pin, which is equivalent to reading the levels of the TXD and D- pins, thereby achieving communication.

[0020] In this embodiment, the diode D1 and the diode D2 are both switching diodes. In this way, the reverse leakage current of the switching diode is very small, which can effectively block the flow of current. In this circuit, when the USB interface 200 is not connected to an external device, the diode D1 and the diode D2 will be in a reverse cut-off state. Due to their extremely low reverse leakage current, the power consumption of the circuit can be reduced to the greatest extent. Therefore, the use of the switching diode can effectively reduce the static power consumption of the circuit, thereby extending the battery life of the entire device.

[0021] In this embodiment, if Figure 2 As shown, the main control chip 100 and the USB interface 200 both have a GND pin, and the GND pin is grounded. Grounding the GND pin can effectively reduce the impact of external electromagnetic interference on the circuit. In some application scenarios, such as smart door locks and other devices related to personal safety, the GND pin can be connected to the ground layer of the circuit board, thereby reducing the wiring on the circuit board and simplifying the design of the circuit board.

[0022] In a second aspect, an embodiment of the present application provides a smart door lock having the leakage-proof USB interface serial communication circuit described in any embodiment of the first aspect.

[0023] When the firmware of the smart door lock needs to be upgraded, an external device (such as a computer) can be connected through the USB interface, and serial communication can be performed using the anti-leakage USB interface serial communication circuit described in any embodiment of the first aspect to transmit the upgrade program to the control circuit of the smart door lock to complete the firmware upgrade.

[0024] The leakage-proof USB interface serial communication circuit and smart door lock provided in this embodiment use a simple resistor and diode network to achieve signal conversion, which effectively solves the problem of how to use the USB interface for serial communication in scenarios where the USB protocol is not suitable, while taking into account both leakage prevention and power consumption reduction, thereby ensuring normal communication.

[0025] In the description of the present invention, it should be noted that the terms "vertical", "up", "down", "horizontal", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0026] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0027] Finally, it should be noted that the above description is only a preferred embodiment of the utility model and is not intended to limit the utility model. Although the utility model is described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions recorded in the above embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the utility model shall be included in the protection scope of the utility model.

Claims

1. A leakage-proof USB serial communication circuit, characterized in that: The invention comprises a main control chip, a USB interface, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1 and a diode D2. The main control chip has a TXD pin, a RXD pin and a VCC pin. The USB interface has a power pin, a D+ signal pin and a D- signal pin. The TXD pin is connected to the cathode of the diode D1, the anode of the diode D1 is connected to the D+ signal pin, the RXD pin is connected to the cathode of the diode D2, the anode of the diode D2 is connected to the D- signal pin, the resistor R1 and the resistor R3 are connected in series and are connected between the TXD pin and the RXD pin, the resistor R2 and the resistor R4 are connected in series and are connected in parallel between the D+ signal pin and the D- signal pin, the VCC pin is connected to the connection point between the resistor R1 and the resistor R3, and the power pin is connected to the connection point between the resistor R2 and the resistor R4.

2. The leakage-proof USB serial communication circuit according to claim 1, characterized in that: The diode D1 and the diode D2 are both switching diodes.

3. The leakage-proof USB serial communication circuit according to claim 1, characterized in that: The main control chip and the USB interface both have a GND pin, and the GND pin is grounded.

4. The leakage-proof USB interface serial communication circuit according to claim 1, 2 or 3, characterized in that: When the USB interface is connected to an external device, the power pin provides a 5V DC voltage; the resistance values ​​of the resistors R1, R2, R3 and R4 are 10kΩ.

5. A smart door lock, characterized in that: A USB interface serial communication circuit with leakage prevention as claimed in any one of claims 1 to 4.