RS485 and CAN bus conversion circuit

By designing the RS485 and CAN bus conversion circuit, using MOS tubes, transistors, diodes and other components for signal isolation and protection, the problem of signal attenuation and data loss of shared bicycle circuit modules in long distance and high interference environments has been solved, and efficient Data transmission and low power consumption, suitable for the application of shared bicycle smart lock systems.

CN221746564UActive Publication Date: 2024-09-20TIANJIN ZHENGHUA IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323503032.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2024-09-20
Estimated Expiration
2033-12-21

AI Technical Summary

Technical Problem

Existing shared bicycle circuit modules have limitations in data transmission efficiency, anti-interference ability and power consumption. Especially in long-distance and high electromagnetic interference environments, signal attenuation and data loss are prominent problems, and they are not suitable for long-term standby applications.

Method used

Design a RS485 and CAN bus conversion circuit, through the combination of microcontroller, 485 chip, power module, sending module, terminal matching module, receiving module and CAN module, using MOS tubes, transistors and diodes and other components for signal isolation and protection, to achieve Dual-mode communication between 485 chip and CAN module, and improve reliability and fault tolerance through COM_B_BK line.

Benefits of technology

It improves the stability and efficiency of data transmission, optimizes power consumption, adapts to long-distance and high electromagnetic interference environments, is suitable for the long-term operation requirements of shared bicycle smart lock systems, and enhances the reliability and user experience of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221746564U
    Figure CN221746564U
Patent Text Reader

Abstract

The utility model provides an RS485 and CAN bus conversion circuit. The RS485 and CAN bus conversion circuit comprises a single-chip microcomputer, a 485 chip, a power supply module, a sending module, a terminal matching module, a receiving module and a CAN module. The single chip microcomputer is electrically connected with the 485 chip, the input end of the power supply module is connected with a system power supply SYS3V3, the output end of the power supply module outputs a stable power supply COM3V3, a VCC pin of the 485 chip is connected with the stable power supply COM3V3 to realize power supply, and the terminal matching module, the receiving module and the sending module are all connected with the stable power supply COM3V3. The dual-mode RS485 / CAN communication circuit has the beneficial effects that the dual-mode RS485 / CAN communication circuit is compact and light in size, the power consumption of the serial port communication of the shared bicycle is optimized, and the dual-mode RS485 / CAN communication circuit is suitable for long-distance and high-electromagnetic-interference urban environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the technical field of single-chip computer communication, in particular to a RS485 and CAN bus conversion circuit. Background Art

[0002] As an emerging urban transportation tool, shared bicycles have rapidly gained popularity around the world in recent years. They provide a convenient, environmentally friendly and economical way to travel, especially suitable for short-distance travel and urban congested areas. Shared bicycle systems rely on smart locks and tracking technologies to ensure the safety, tracking and efficient management of bicycles. These systems usually contain communication modules, such as RS485 or CAN bus-based circuits, for data transmission and remote control. Existing shared bicycle circuit modules usually have limitations in data transmission efficiency, anti-interference ability and power consumption. For example, traditional RS485 communication modules may suffer from signal attenuation and data loss over long distances or in high-interference environments. In addition, some modules are not efficient in terms of energy consumption and size, which is a major drawback for shared bicycles that require long standby times. Utility Model Content

[0003] In view of this, the utility model aims to propose an RS485 and CAN bus conversion circuit to achieve compactness and lightweight circuit of dual-mode RS485 / CAN communication, optimize the power consumption of shared bicycle serial port communication, and adapt to long distance and high electromagnetic interference urban environment.

[0004] In order to achieve the above object, the technical solution of the utility model is implemented as follows:

[0005] The invention discloses a conversion circuit between RS485 and CAN bus.

[0006] Furthermore, it includes a single-chip microcomputer, a 485 chip, a power module, a sending module, a terminal matching module, a receiving module, and a CAN module; the single-chip microcomputer is electrically connected to the 485 chip, the input end of the power module is connected to the system power supply SYS_3V3, the output end of the power module outputs a stable power supply COM_3V3, the VCC pin of the 485 chip is connected to the stable power supply COM_3V3 to realize power supply, and the terminal matching module, the receiving module, and the sending module are all connected to the stable power supply COM_3V3; the input end of the sending module is electrically connected to the DI pin of the 485 chip, and the output end of the sending module is electrically connected to the CAN module; the input end of the receiving module is electrically connected to the RO pin of the 485 chip, and the output end of the receiving module is electrically connected to the CAN module; the input end of the terminal matching module is electrically connected to the A pin and the B pin of the 485 chip, and the output end of the terminal matching module is electrically connected to the CAN module.

[0007] Furthermore, the power module includes a MOS tube Q1, a resistor R21, and a capacitor C49. The source of the MOS tube Q1 is electrically connected to the system power supply SYS_3V3, the drain outputs a stable power supply COM_3V3, and the gate is electrically connected to the single-chip computer; the gate and source of the MOS tube Q1 are electrically connected and connected in series with the resistor R21, the drain of the MOS tube Q1 is grounded, and the ground line is connected in series with the capacitor C49.

[0008] Furthermore, the sending module includes a MOS tube Q11, a diode D8, and a transistor Q7; the gate of the MOS tube Q11 is electrically connected to the DI pin of the 485 chip, the drain thereof is grounded, and the source thereof is electrically connected to the gate of the transistor Q7; the source of the transistor Q7 is connected in parallel with the cathode of the diode D8 and the COM_A line of the CAN module to form a CAN signal input terminal, and the emitter of the transistor Q7 is grounded; the anode of the diode D8 is connected in parallel with the stable power supply COM_3V3 and the source of the MOS tube Q11.

[0009] Furthermore, the sending module also includes a resistor R66 and a resistor R65, the input end of the resistor R66 is connected to the stable power supply COM_3V3, and the output end of the resistor R66 is electrically connected to the source of the MOS tube Q11 and the gate of the transistor Q7 respectively; the input end and the output end of the resistor R65 are electrically connected to the cathode of the diode D8 and the COM_A line respectively.

[0010] Further, the terminal matching module includes a diode DW1, a diode DW2, a resistor R26, a resistor R32, a resistor R30, a resistor R67, a resistor R24, a resistor R33, a capacitor C58, and a capacitor C63; the input end and the output end of the resistor R26 are respectively connected to the A pin of the 485 chip and the COM_A line of the CAN module, and the input end and the output end of the resistor R32 are respectively connected to the B pin of the 485 chip and the COM_B line of the CAN module; the positive end and the negative end of the diode DW1 are respectively electrically connected to the output end of the resistor R26 and the ground wire, The positive end and negative end of the diode DW2 are electrically connected to the output end of the resistor R326 and the ground respectively; the input end and output end of the capacitor C58 are electrically connected to the output end of the resistor R26 and the ground respectively, and the input end and output end of the capacitor C63 are electrically connected to the output end of the resistor R32 and the ground respectively; the output end of the resistor R26 is electrically connected to the stable power supply COM_3V3, and a resistor R24 ​​is connected in series between the output end of the resistor R26 and the stable power supply COM_3V3; the output end of the resistor R32 is grounded, and a resistor R33 is connected in series between the output end of the resistor R32 and the ground.

[0011] Furthermore, the terminal matching module also includes a resistor R30 and a resistor R67, and the two ends of the resistor R30 are electrically connected to the COM_A line and the COM_B line of the CAN module respectively; the resistor R67 is located on the line of the COM_B line of the CAN module, and the input end of the resistor R67 is the potential of the COM_B line, and the output end is the potential of the COM_B_BK line.

[0012] Furthermore, the receiving module includes a diode D9 and a diode D11; the anode of the diode D9 is connected in parallel with the 485 chip RXD, the stable power supply COM_3V3, and the ground line, and the cathode of the diode D9 is electrically connected to the COM_B line; the anode of the diode D11 is connected in parallel with the 485 chip RXD, the stable power supply COM_3V3, and the ground line, and the cathode of the diode D9 is electrically connected to the COM_B_BK line.

[0013] Furthermore, it also includes a resistor R58 and a capacitor C90. The resistor R58 is connected in series to the stable power supply COM_3V3 line; the capacitor C90 is connected in series to the ground line.

[0014] Furthermore, the model of the 485 chip is SP3485E, and the model of the single-chip microcomputer is STM32L471-64P.

[0015] Furthermore, the PC11 pin of the microcontroller is electrically connected to the RE pin and the DE pin of the 485 chip.

[0016] Compared with the prior art, the RS485 and CAN bus conversion circuit described in the utility model has the following beneficial effects:

[0017] (1) In the RS485 and CAN bus conversion circuit described in the utility model, the input end of the sending module is electrically connected to the DI pin of the 485 chip, and the output end of the sending module is electrically connected to the CAN module to prevent the circuit from being damaged by external interference. The switching characteristics of the MOS tube Q11 and the transistor Q7 are used to isolate the signal between the 485 chip and the CAN module. At the same time, the diode D8 is used to protect the circuit from reverse voltage or excessive current, thereby ensuring accurate signal transmission and the reliability and stability of the system;

[0018] (2) In the RS485 and CAN bus conversion circuit described in the utility model, the receiving module is responsible for transmitting the data signal received on the COM_B line of the CAN bus to the SP3485E for receiving and processing, thereby realizing the data receiving function;

[0019] (3) In the RS485 and CAN bus conversion circuit described in the present invention, the CAN module bus is divided into a COM_A line, a COM_B line and a COM_B_BK line, wherein COM_B_BK is used as a backup signal line to improve the reliability and fault tolerance of the conversion circuit. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation on the present invention. In the accompanying drawings:

[0021] Figure 1 This is a schematic diagram of the 485 chip wiring diagram described in the embodiment of the utility model;

[0022] Figure 2 This is a schematic diagram of a power module circuit diagram according to an embodiment of the utility model;

[0023] Figure 3 This is a schematic diagram of a sending module circuit diagram according to an embodiment of the utility model;

[0024] Figure 4 This is a schematic diagram of a receiving module circuit diagram according to an embodiment of the utility model;

[0025] Figure 5 This is a schematic diagram of a circuit diagram of a terminal matching module according to an embodiment of the present utility model. DETAILED DESCRIPTION

[0026] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0027] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0028] This application integrates more advanced signal processing and conversion technologies, and the circuit can effectively improve the stability and efficiency of data transmission, especially in long-distance and high-electromagnetic interference urban environments. At the same time, the optimized power consumption management makes the circuit more suitable for long-term applications, such as the smart lock system of shared bicycles. In addition, the compact design also helps to reduce the size of the module, making shared bicycles lighter. In general, this circuit not only improves the reliability of the shared bicycle system, but also brings it higher efficiency and better user experience.

[0029] A RS485 and CAN bus conversion circuit includes a single-chip microcomputer, a 485 chip, a power module, a sending module, a terminal matching module, a receiving module, and a CAN module. It integrates CAN and RS485 communication interfaces and is used for the single-chip microcomputer to communicate with an external CAN module through the 485 chip. The single-chip microcomputer, the 485 chip, the power module, the sending module, the terminal matching module, and the receiving module can all be integrated on a single PCB board to establish a communication connection between the 485 chip and the external CAN module. Specifically, the single-chip microcomputer is electrically connected to the 485 chip, the system provides a system power supply SYS_3V3, the input end of the power module is connected to the system power supply SYS_3V3, the output end of the power module outputs a stable power supply COM_3V3, the VCC pin of the 485 chip is connected to the stable power supply COM_3V3 to realize power supply, and the terminal matching module, the receiving module, and the sending module are all connected to the stable power supply COM_3V3 for power supply. The input end of the sending module is electrically connected to the DI pin of the 485 chip, and the output end of the sending module is electrically connected to the CAN module. Figure 1 As shown, the PC11 pin of the single-chip microcomputer is electrically connected to the RE pin and DE pin of the 485 chip. The input end of the receiving module is electrically connected to the RO pin of the 485 chip, the output end of the receiving module is electrically connected to the CAN module, the input end of the terminal matching module is electrically connected to the A pin and B pin of the 485 chip, and the output end of the terminal matching module is electrically connected to the CAN module.

[0030] like Figure 2 As shown, the power module includes a MOS tube Q1, a resistor R21, and a capacitor C49. The source of the MOS tube Q1 is electrically connected to the system power supply SYS_3V3, and its drain outputs a stable power supply COM_3V3, and its gate is electrically connected to the single-chip computer. The gate and source of the MOS tube Q1 are electrically connected and connected in series with the resistor R21. The drain of the MOS tube Q1 is grounded, and the ground line is connected in series with the capacitor C49. The power module converts the input power into a stable output power supply of 3.3V to supply the entire circuit. The capacitor C49 is used as a decoupling capacitor to filter out possible high-frequency noise.

[0031] like Figure 3As shown, the sending module includes a MOS tube Q11, a diode D8, and a transistor Q7. The gate of the MOS tube Q11 is electrically connected to the DI pin of the 485 chip, its drain is grounded, and its source is electrically connected to the gate of the transistor Q7. The source of the transistor Q7 is connected in parallel with the cathode of the diode D8 and the COM_A line of the CAN module to form a CAN signal input terminal, and the emitter of the transistor Q7 is grounded. The anode of the diode D8 is connected in parallel with the stable power supply COM_3V3 and the source of the MOS tube Q11. Signal isolation realizes effective isolation of RS485 signals. The sending module also includes a resistor R66 and a resistor R65. The input end of the resistor R66 is connected to the stable power supply COM_3V3, and the output end of the resistor R66 is electrically connected to the source of the MOS tube Q11 and the gate of the transistor Q7 respectively. The input end and the output end of the resistor R65 are electrically connected to the cathode of the diode D8 and the COM_A line respectively. The switching characteristics of MOS tube Q11 and transistor Q7 are used to isolate the signal between the 485 chip and the CAN module. At the same time, diode D8 is used to protect the circuit from reverse voltage or excessive current, thereby ensuring accurate signal transmission and system reliability and stability.

[0032] like Figure 4 As shown, the receiving module includes a diode D9 and a diode D11; the anode of the diode D9 is connected in parallel with the 485 chip RXD, the stable power supply COM_3V3, and the ground line, and the cathode of the diode D9 is electrically connected to the COM_B line; the anode of the diode D11 is connected in parallel with the 485 chip RXD, the stable power supply COM_3V3, and the ground line, and the cathode of the diode D9 is electrically connected to the COM_B_BK line. It also includes a resistor R58 and a capacitor C90, the resistor R58 is connected in series to the stable power supply COM_3V3 line, and the capacitor C90 is connected in series to the ground line. The receiving module is responsible for transmitting the data signal received on the COM_B line of the CAN bus to the SP3485E for receiving and processing, thereby realizing the data receiving function.

[0033] like Figure 5As shown, the terminal matching module includes a diode DW1, a diode DW2, a resistor R26, a resistor R32, a resistor R30, a resistor R67, a resistor R24, a resistor R33, a capacitor C58, and a capacitor C63; the input end and the output end of the resistor R26 are respectively connected to the A pin of the 485 chip and the COM_A line of the CAN module, and the input end and the output end of the resistor R32 are respectively connected to the B pin of the 485 chip and the COM_B line of the CAN module, providing appropriate impedance matching to reduce the reflection and attenuation of the signal in the line. The positive end and the negative end of the diode DW1 are respectively electrically connected to the output end of the resistor R26 and the ground wire, and the positive end and the negative end of the diode DW2 are respectively electrically connected to the output end of the resistor R326 and the ground wire. When an over-high voltage appears on the communication line, the diode can be turned on and discharge the voltage to the ground wire, thereby protecting the circuit from damage. The input and output ends of capacitor C58 are electrically connected to the output end of resistor R26 and the ground wire respectively, and the input and output ends of capacitor C63 are electrically connected to the output end of resistor R32 and the ground wire respectively, which helps to smooth the voltage of the power supply line, eliminate high-frequency interference, and ensure the clarity and stability of the signal line. The output end of resistor R26 is electrically connected to the stable power supply COM_3V3, and a resistor R24 ​​is connected in series between the output end of resistor R26 and the stable power supply COM_3V3; the output end of resistor R32 is grounded, and a resistor R33 is connected in series between the output end of resistor R32 and the ground.

[0034] The terminal matching module also includes a resistor R30 and a resistor R67. The two ends of the resistor R30 are electrically connected to the COM_A line and the COM_B line of the CAN module respectively. The resistor R67 is located on the line of the COM_B line of the CAN module. The input end of the resistor R67 is the potential of the COM_B line, and the output end is the potential of the COM_B_BK line. The CAN module bus is divided into the COM_A line, the COM_B line and the COM_B_BK line, of which the COM_B_BK is used as a backup signal line to improve the reliability and fault tolerance of the conversion circuit.

[0035] Specifically, the model of the 485 chip is preferably SP3485E, and the model of the single-chip microcomputer is preferably STM32L471-64P. The information transmission, signal processing, control method, and control logic involved in the technical solution can be realized by adopting existing technologies.

[0036] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the utility model, rather than to limit it. Although the utility model has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the utility model, and they should all be included in the scope of the claims and specification of the utility model.

[0037] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A RS485 and CAN bus conversion circuit, characterized in that: Including single chip microcomputer, 485 chip, power module, sending module, terminal matching module, receiving module, CAN module; The single-chip microcomputer is electrically connected to the 485 chip. The input end of the power module is connected to the system power supply SYS_3V3. The output end of the power module outputs the stable power supply COM_3V3. The VCC pin of the 485 chip is connected to the stable power supply COM_3V3 to realize power supply. The terminal matching module, the receiving module, and the sending module are all connected to the stable power supply COM_3V3. The input end of the sending module is electrically connected to the DI pin of the 485 chip, and the output end of the sending module is electrically connected to the CAN module; The input end of the receiving module is electrically connected to the RO pin of the 485 chip, and the output end of the receiving module is electrically connected to the CAN module; The input end of the terminal matching module is electrically connected to the A pin and the B pin of the 485 chip, and the output end of the terminal matching module is electrically connected to the CAN module.

2. A RS485 and CAN bus conversion circuit according to claim 1, characterized in that: The power module includes a MOS tube Q1, a resistor R21, and a capacitor C49. The source of the MOS tube Q1 is electrically connected to the system power supply SYS_3V3, the drain thereof outputs a stable power supply COM_3V3, and the gate thereof is electrically connected to the single chip computer; The gate and source of the MOS tube Q1 are electrically connected and connected in series with a resistor R21. The drain of the MOS tube Q1 is grounded, and the ground line is connected in series with a capacitor C49.

3. A RS485 and CAN bus conversion circuit according to claim 2, characterized in that: The sending module includes a MOS tube Q11, a diode D8, and a transistor Q7; The gate of the MOS tube Q11 is electrically connected to the DI pin of the 485 chip, the drain thereof is grounded, and the source thereof is electrically connected to the gate of the transistor Q7; The source of transistor Q7 is connected in parallel with the cathode of diode D8 and the COM_A line of the CAN module to form a CAN signal input terminal, and the emitter of transistor Q7 is grounded; The anode of the diode D8 is connected in parallel with the stable power supply COM_3V3 and the source of the MOS tube Q11.

4. A RS485 and CAN bus conversion circuit according to claim 3, characterized in that: The sending module also includes a resistor R66 and a resistor R65, the input end of the resistor R66 is connected to the stable power supply COM_3V3, and the output end of the resistor R66 is electrically connected to the source of the MOS tube Q11 and the gate of the transistor Q7 respectively; The input end and the output end of the resistor R65 are electrically connected to the cathode end of the diode D8 and the COM_A line respectively.

5. A RS485 and CAN bus conversion circuit according to claim 2, characterized in that: The terminal matching module includes a diode DW1, a diode DW2, a resistor R26, a resistor R32, a resistor R30, a resistor R67, a resistor R24, a resistor R33, a capacitor C58, and a capacitor C63; The input end and output end of the resistor R26 are respectively connected to the A pin of the 485 chip and the COM_A line of the CAN module, and the input end and output end of the resistor R32 are respectively connected to the B pin of the 485 chip and the COM_B line of the CAN module; the positive end and negative end of the diode DW1 are respectively electrically connected to the output end of the resistor R26 and the ground wire, and the positive end and negative end of the diode DW2 are respectively electrically connected to the output end of the resistor R326 and the ground wire; The input end and output end of capacitor C58 are electrically connected to the output end of resistor R26 and the ground wire respectively, and the input end and output end of capacitor C63 are electrically connected to the output end of resistor R32 and the ground wire respectively; The output end of the resistor R26 is electrically connected to the stable power supply COM_3V3, and a resistor R24 ​​is connected in series between the output end of the resistor R26 and the stable power supply COM_3V3; An output terminal of the resistor R32 is grounded, and a resistor R33 is connected in series between the output terminal of the resistor R32 and the ground.

6. A RS485 and CAN bus conversion circuit according to claim 5, characterized in that: The terminal matching module also includes a resistor R30 and a resistor R67, and both ends of the resistor R30 are electrically connected to the COM_A line and the COM_B line of the CAN module respectively; The resistor R67 is located on the line of the COM_B line of the CAN module. The input end of the resistor R67 is the potential of the COM_B line, and the output end thereof is the potential of the COM_B_BK line.

7. A RS485 and CAN bus conversion circuit according to claim 6, characterized in that: The receiving module includes a diode D9 and a diode D11; The anode of diode D9 is connected in parallel with 485 chip RXD, stable power supply COM_3V3 and ground line, and the cathode of diode D9 is electrically connected with COM_B line; The anode of the diode D11 is connected in parallel with the 485 chip RXD, the stable power supply COM_3V3, and the ground line, and the cathode of the diode D9 is electrically connected to the COM_B_BK line.

8. A RS485 and CAN bus conversion circuit according to claim 7, characterized in that: It also includes a resistor R58 and a capacitor C90, wherein the resistor R58 is connected in series to the stable power supply COM_3V3 line; Capacitor C90 is connected in series to the ground line.

9. A RS485 and CAN bus conversion circuit according to claim 1, characterized in that: The model of the 485 chip is SP3485E, and the model of the microcontroller is STM32L471-64P.

10. The RS485 and CAN bus conversion circuit according to claim 1, characterized in that: The PC11 pin of the microcontroller is electrically connected to the RE pin and DE pin of the 485 chip.