A communication protocol converter for converting between USB, multi-channel serial port and CAN bus

By designing a communication protocol converter that can convert between USB and multiple serial ports and CAN bus, the problem of existing devices being unable to meet the requirements of multiple conversion and status monitoring is solved. It realizes flexible conversion between two CAN buses and four serial ports, as well as bidirectional conversion between USB and serial ports, and has system log output function.

CN113722252BActive Publication Date: 2024-11-29SUZHOU SUPER PLANET VENTURE CAPITAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110935155.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-16
Publication Date
2024-11-29
Estimated Expiration
2041-08-16

AI Technical Summary

Technical Problem

Existing CAN protocol conversion devices cannot meet the requirements for multi-channel CAN bus and serial port conversion, and cannot simultaneously support USB and serial port conversion. They also lack working status monitoring and log output functions.

Method used

A communication protocol converter was designed to convert between USB and multiple serial ports and CAN bus. It uses components such as power supply chip, microcontroller, CAN bus driver, and USB to serial port chip to realize flexible conversion between two CAN bus and four serial ports, and supports simultaneous output of USB and serial ports. It also has a 5-channel serial port log output function.

Benefits of technology

It enables flexible switching between two CAN buses and four serial ports, supports bidirectional switching between USB and serial ports, has system log output capability, and meets the needs of multi-channel conversion and stable communication in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722252B_ABST
    Figure CN113722252B_ABST
Patent Text Reader

Abstract

The present invention discloses a communication protocol converter for mutual conversion between USB and multi-channel serial ports and CAN buses, including a power chip, a single-chip microcomputer, a CAN1 bus driver, a CAN2 bus driver, a USB-to-serial port chip, and a USB-TYPE-A interface, wherein the USB-TYPE-A interface is electrically connected to the power chip, and the power chip is electrically connected to the single-chip microcomputer, the CAN1 bus driver, the CAN2 bus driver, and the USB-to-serial port chip respectively, and the single-chip microcomputer is respectively connected to the CAN1 bus driver, the CAN2 bus driver, and the USB-to-serial port chip for communication; the CAN1 bus driver and the CAN2 bus driver respectively convert the data link layer signal of the single-chip microcomputer into a physical layer signal. The present invention includes two CAN buses and four serial ports, which can convert communication between each other at will; the CAN bus can be converted to a serial port or a USB interface, and the USB and the serial port can be output simultaneously; any one of the five serial ports can be used as a log output port; and one USB to five serial ports output can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a communication protocol converter for mutual conversion between a USB and a multi-channel serial port and a CAN bus, belonging to the technical field of converter design. Background Art

[0002] The CANCOM-100IE+ three-in-one industrial-grade intelligent protocol converter is a common serial port to CAN bus communication protocol conversion module on the market. It can quickly connect RS-232 / 485 / 422 communication equipment to the CAN-bus field bus to achieve two-way communication. The converter supports 600~230400bps serial port rate and 5Kbps~1Mbps CAN-bus communication rate. The converter provides three data conversion modes: transparent conversion, transparent conversion with identification, and format conversion to meet the needs of different customers. Its interfaces are all industrial-grade designs, and the CAN interface comes with a magnetic coupling isolation module to avoid damage due to ground loop current. Its strong anti-static and surge capabilities allow it to be used in harsh environments.

[0003] The existing USBCAN-IIPro can realize bidirectional data transmission on the bus, with a dedicated industrial-grade high-speed 32-bit CPU, and a receiving and sending speed greater than 8000 frames / second (when the baud rate of the CAN card bus reaches 1M, the data frame sent by the bus will not be lost). It complies with the ISO11898 standard and supports CAN2.0A / B format, standard frame / extended frame / data frame / remote frame. Four-layer immersion gold process circuit board, enhanced USB interface overcurrent protection (adding overcurrent transient protection devices at the power interface greatly improves the protection performance of the USB interface). Enhance the EMI anti-interference ability of the CAN bus, and the product has passed the CiA (CAN-in-Automation) electromagnetic interference test to ensure that the module communicates normally under certain interference. Strictly control the production process, and all components are internationally renowned brands (extending the service life of the product). Embedded real-time operating system, the firmware program can be upgraded remotely, and users can upgrade the chip firmware program by themselves. (It can be downgraded to an old version of the kernel at any time, and a device will never be outdated)

[0004] Pure aluminum alloy shell, stable and anti-interference, terminal interface, easy to debug. Industrial-grade main chip, CAN end interface adopts magnetic coupling isolation method to ensure that the module is not damaged when high voltage is mixed into the CAN end, extending the service life. With GND and PE interfaces, the module can communicate normally in a severely interfered environment.

[0005] The product driver has been digitally signed by Microsoft and can be found at

[0006] It can be installed and used on 32 / 64-bit operating systems such as win98 / xp / 2000 / 2003 / 7 / 8 / 10. It can support 32 / 64-bit Linux systems based on the X86 kernel. The CAN card is plug-and-play, suitable for on-site debugging and detection of CAN network status. Summary of the invention

[0007] Shortcomings of the prior art and technical problems to be solved by the present application proposal: 1. Although the existing CAN protocol conversion device supports RS485 / RS232 / TTL, it generally has only one serial port and one CAN bus, which cannot meet the multi-channel requirements. The present invention includes two CAN buses and four serial ports that can convert communications with each other at will; 2. The existing CAN protocol conversion device can only convert to USB or can only convert to a serial port, which cannot meet the requirements of converting to both a serial port and a USB. The CAN bus of the present invention can be converted to a serial port, can also be converted to a USB interface, and can also output USB and serial ports at the same time; 3. The working status of the existing product cannot be known during operation, and there is no system log output. The present invention can use any one of the five serial ports as a log output port; 4. The existing product cannot realize the USB to serial port function. The present invention outputs through one USB to five serial ports.

[0008] The purpose of the present invention is to overcome the technical defects of the prior art, solve the above technical problems, and provide a communication protocol converter for converting between USB and multi-channel serial ports and CAN bus.

[0009] The present invention specifically adopts the following technical scheme: a communication protocol converter for converting between USB and multiple serial ports and CAN bus, comprising a power chip, a single-chip microcomputer, a CAN1 bus driver, a CAN2 bus driver, a USB to serial port chip, and a USB-TYPE-A interface, wherein the USB-TYPE-A interface is electrically connected to the power chip, and the power chip is respectively electrically connected to the single-chip microcomputer, the CAN1 bus driver, the CAN2 bus driver, and the USB to serial port chip, and the single-chip microcomputer is respectively communicatively connected to the CAN1 bus driver, the CAN2 bus driver, and the USB to serial port chip; the CAN1 bus driver and the CAN2 bus driver respectively convert the data link layer signal of the single-chip microcomputer into a physical layer signal.

[0010] As a preferred embodiment, the power chip includes a resettable fuse F1 and a voltage conversion chip U6. One end of the resettable fuse F1 is connected to the USB-TYPE-A interface, and the other end of the resettable fuse F1 is connected to a system power supply. The system power supply supplies power for the two CAN bus drivers and the external serial port. The system power supply obtains a divided voltage power supply by connecting to the VOUT1 and VOUT2 ends of the voltage conversion chip U6. The divided voltage power supply is respectively connected to the single-chip computer and the USB to serial port chip for power supply.

[0011] As a preferred embodiment, the system power supply is 5V.

[0012] As a preferred embodiment, the divided voltage power supply is 3.3V.

[0013] As a preferred embodiment, the single chip microcomputer adopts a 32-bit STM32F105RCT6 single chip microcomputer.

[0014] As a preferred embodiment, pin 42 and pin 43 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART1_TX end and USART1_RX end of the serial port J4, pin 16 and pin 17 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART2_TX end and USART2_RX end of the serial port J5, pin 29 and pin 30 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART3_TX end and USART3_RX end of the serial port J6, pin 51 and pin 52 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART4_TX end and USART4_RX end of the serial port J7, pin 53 and pin 54 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART1_TX end and USART2_RX end of the serial port J7. USART1_RX end; Pin 19 of the STM32F105RCT6 single-chip microcomputer is electrically connected to the output end of the power chip; Pin 45 and Pin 44 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN1_TX end and the CAN1_RX end of the CAN1 bus driver, and Pin 34 and Pin 33 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TX end and the CAN2_RX end of the CAN2 bus driver; Pin 62 and Pin 61 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the RE_CAN1_TX end and the RE_CAN1_RX end of the CAN1 bus driver, and Pin 57 and Pin 58 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TXR end and the CAN2_RXR end of the CAN2 bus driver.

[0015] As a preferred embodiment, the CAN1 driver includes a CAN driver chip U1, pin 1 of the CAN driver chip U1 is respectively connected to pin 45 and pin 62 of the STM32F105RCT6 type microcontroller, pin 4 of the CAN driver chip U1 is respectively connected to pin 44 and pin 61 of the STM32F105RCT6 type microcontroller; pin 6 and pin 7 of the CAN driver chip U1 are respectively connected to pin 2 and pin 1 of the serial port J1.

[0016] As a preferred embodiment, the CAN2 driver includes a CAN driver chip U2, pin 1 of the CAN driver chip U2 is respectively connected to pin 34 and pin 57 of the STM32F105RCT6 microcontroller, pin 4 of the CAN driver chip U2 is respectively connected to pin 33 and pin 58 of the STM32F105RCT6 microcontroller; pin 6 and pin 7 of the CAN driver chip U2 are respectively connected to pin 4 and pin 3 of the serial port J1.

[0017] As a preferred embodiment, the USB to serial port chip includes a serial port chip U3 and a USB-211-BCW chip. Pin 2 and pin 3 of the serial port chip U3 are respectively connected to the USART1_TX end and the USART1_RX end of the serial port J4; pin 5 and pin 6 of the serial port chip U3 are respectively connected to pin 3 and pin 2 of the USB-211-BCW chip, and pin 7 and pin 8 of the serial port chip U3 are respectively connected to the USB data output interface XI and the USB data output interface XO.

[0018] As a preferred embodiment, the model of the serial port conversion chip U3 is CH340GSOP-16.

[0019] Beneficial effects achieved: 1. The present invention comprises two CAN buses and four serial ports which can be converted to each other for communication at will; 2. The CAN bus of the present invention can be converted to a serial port or a USB interface, and the USB and serial ports can be output simultaneously; 3. The present invention can use any one of the five serial ports as a log output port; 4. The present invention can realize the conversion of one USB to five serial ports output. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a circuit connection schematic diagram of the power chip of the present invention;

[0021] Figure 2 It is a circuit connection schematic diagram of the single chip microcomputer of the present invention;

[0022] Figure 3It is a circuit connection diagram of the CAN1 bus driver and the CAN2 bus driver of the present invention;

[0023] Figure 4 It is a circuit connection diagram of the USB to serial port chip of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0025] Embodiment 1: The present invention proposes a communication protocol converter for converting between USB and multiple serial ports and CAN bus, comprising a power chip, a single-chip microcomputer, a CAN1 bus driver, a CAN2 bus driver, a USB to serial port chip, and a USB-TYPE-A interface. The USB-TYPE-A interface is electrically connected to the power chip, and the power chip is electrically connected to the single-chip microcomputer, the CAN1 bus driver, the CAN2 bus driver, and the USB to serial port chip respectively. The single-chip microcomputer is communicatively connected to the CAN1 bus driver, the CAN2 bus driver, and the USB to serial port chip respectively; the CAN1 bus driver and the CAN2 bus driver respectively convert the data link layer signal of the single-chip microcomputer into a physical layer signal.

[0026] Example 2: Figure 1 As shown, the power chip includes a resettable fuse F1 and a voltage conversion chip U6. One end of the resettable fuse F1 is connected to the USB-TYPE-A interface, and the other end of the resettable fuse F1 is connected to the system power supply. The system power supply supplies power for the two CAN bus drivers and the external serial port. The system power supply obtains a divided voltage power supply by connecting to the VOUT1 and VOUT2 ends of the voltage conversion chip U6. The divided voltage power supply is respectively connected to the single-chip microcomputer and the USB to serial port chip for power supply.

[0027] As a preferred embodiment, the system power supply is 5V.

[0028] As a preferred embodiment, the voltage-divided power supply is 3.3V, and the rest is the same as in Embodiment 1.

[0029] Example 3: Figure 2As shown, the single-chip microcomputer adopts a 32-bit STM32F105RCT6 single-chip microcomputer, and the 42nd and 43rd pins of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART1_TX end and the USART1_RX end of the serial port J4, and the 16th and 17th pins of the STM32F105RCT6 single-chip microcomputer are respectively connected to the USART2_TX end and the USART2_RX end of the serial port J5. Pins 29 and 30 of the F105RCT6 microcontroller are connected to the USART3_TX and USART3_RX ends of the serial port J6, respectively. Pins 51 and 52 of the STM32F105RCT6 microcontroller are connected to the USART4_TX and USART4_RX ends of the serial port J7, respectively. Pins 53 and 54 of the STM32F105RCT6 microcontroller are connected to the USART4_TX and USART4_RX ends of the serial port J7, respectively. 1_TX end, USART1_RX end; Pin 19 of the STM32F105RCT6 single-chip microcomputer is electrically connected to the output end of the power chip; Pin 45 and Pin 44 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN1_TX end and the CAN1_RX end of the CAN1 bus driver, and Pin 34 and Pin 33 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TX end and the CAN2_RX end of the CAN2 bus driver; Pin 62 and Pin 61 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the RE_CAN1_TX end and the RE_CAN1_RX end of the CAN1 bus driver, and Pin 57 and Pin 58 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TXR end and the CAN2_RXR end of the CAN2 bus driver, and the rest are the same as in Example 1.

[0030] Example 4: Figure 3 As shown, the CAN1 driver includes a CAN driver chip U1, and pin 1 of the CAN driver chip U1 is respectively connected to pins 45 and 62 of the STM32F105RCT6 microcontroller, and pin 4 of the CAN driver chip U1 is respectively connected to pins 44 and 61 of the STM32F105RCT6 microcontroller; pins 6 and 7 of the CAN driver chip U1 are respectively connected to pins 2 and 1 of the serial port J1.

[0031] The CAN2 driver includes a CAN driver chip U2, wherein pin 1 of the CAN driver chip U2 is respectively connected to pins 34 and 57 of the STM32F105RCT6 microcontroller, and pin 4 of the CAN driver chip U2 is respectively connected to pins 33 and 58 of the STM32F105RCT6 microcontroller; pins 6 and 7 of the CAN driver chip U2 are respectively connected to pins 4 and 3 of the serial port J1.

[0032] Example 5: Figure 4 As shown, the USB to serial port chip includes a serial port chip U3 and a USB-211-BCW chip. Pin 2 and pin 3 of the serial port chip U3 are respectively connected to the USART1_TX end and the USART1_RX end of the serial port J4; pin 5 and pin 6 of the serial port chip U3 are respectively connected to pin 3 and pin 2 of the USB-211-BCW chip, and pin 7 and pin 8 of the serial port chip U3 are respectively connected to the USB data output interface XI and the USB data output interface XO.

[0033] As a preferred embodiment, the model of the serial port conversion chip U3 is CH340GSOP-16.

[0034] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A communication protocol converter for converting between USB and multiple serial ports and CAN bus, characterized in that: It includes a power chip, a single-chip microcomputer, a CAN1 bus driver, a CAN2 bus driver, a USB-to-serial port chip, and a USB-TYPE-A interface. The USB-TYPE-A interface is electrically connected to the power chip. The power chip is electrically connected to the single-chip microcomputer, the CAN1 bus driver, the CAN2 bus driver, and the USB-to-serial port chip respectively. The single-chip microcomputer is communicatively connected to the CAN1 bus driver, the CAN2 bus driver, and the USB-to-serial port chip respectively. The CAN1 bus driver and the CAN2 bus driver respectively convert the data link layer signal of the single-chip microcomputer into a physical layer signal. The single-chip microcomputer adopts a 32-bit STM32F105RCT6 single-chip microcomputer. Pins 42 and 43 of the STM32F105RCT6 microcontroller are connected to the USART1_TX and USART1_RX ends of the serial port J4, respectively; pins 16 and 17 of the STM32F105RCT6 microcontroller are connected to the USART2_TX and USART2_RX ends of the serial port J5, respectively; pins 29 and 30 of the STM32F105RCT6 microcontroller are connected to the USART3_TX and USART3_RX ends of the serial port J6, respectively; pins 51 and 52 of the STM32F105RCT6 microcontroller are connected to the USART4_TX and USART4_RX ends of the serial port J7, respectively; pins 53 and 54 of the STM32F105RCT6 microcontroller are connected to the USART1_TX and USART1_RX ends of the serial port J7, respectively. 1_RX end; Pin 19 of the STM32F105RCT6 single-chip microcomputer is electrically connected to the output end of the power chip; Pin 45 and Pin 44 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN1_TX end and CAN1_RX end of the CAN1 bus driver, and Pin 34 and Pin 33 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TX end and CAN2_RX end of the CAN2 bus driver; Pin 62 and Pin 61 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the RE_CAN1_TX end and RE_CAN1_RX end of the CAN1 bus driver, and Pin 57 and Pin 58 of the STM32F105RCT6 single-chip microcomputer are respectively connected to the CAN2_TXR end and CAN2_RXR end of the CAN2 bus driver; The CAN1 bus driver includes a CAN driver chip U1, wherein pin 1 of the CAN driver chip U1 is respectively connected to pins 45 and 62 of the STM32F105RCT6 microcontroller, and pin 4 of the CAN driver chip U1 is respectively connected to pins 44 and 61 of the STM32F105RCT6 microcontroller; pins 6 and 7 of the CAN driver chip U1 are respectively connected to pins 2 and 1 of the serial port J1; The CAN2 bus driver includes a CAN driver chip U2, wherein pin 1 of the CAN driver chip U2 is respectively connected to pins 34 and 57 of the STM32F105RCT6 microcontroller, and pin 4 of the CAN driver chip U2 is respectively connected to pins 33 and 58 of the STM32F105RCT6 microcontroller; pins 6 and 7 of the CAN driver chip U2 are respectively connected to pins 4 and 3 of the serial port J1; The USB to serial port chip includes a serial port chip U3 and a USB-211-BCW chip. Pin 2 and pin 3 of the serial port chip U3 are respectively connected to the USART1_TX end and the USART1_RX end of the serial port J4; pin 5 and pin 6 of the serial port chip U3 are respectively connected to pin 3 and pin 2 of the USB-211-BCW chip, and pin 7 and pin 8 of the serial port chip U3 are respectively connected to the USB data output interface XI and the USB data output interface XO.

2. A communication protocol converter for converting between USB and multiple serial ports or CAN bus according to claim 1, characterized in that: The power chip includes a resettable fuse F1 and a voltage conversion chip U6. One end of the resettable fuse F1 is connected to the USB-TYPE-A interface, and the other end of the resettable fuse F1 is connected to the system power supply. The system power supply supplies power for the two CAN bus drivers and the external serial port. The system power supply obtains a divided voltage power supply by connecting to the VOUT1 terminal and the VOUT2 terminal of the voltage conversion chip U6, and the divided voltage power supply is respectively connected to the single-chip microcomputer and the USB-to-serial port chip for power supply.

3. A communication protocol converter for converting between USB and multiple serial ports or CAN bus according to claim 2, characterized in that: The system power supply is 5V.

4. A communication protocol converter for converting between USB and multiple serial ports or CAN bus according to claim 2, characterized in that: The divided voltage power supply is 3.3V.

5. A communication protocol converter for converting between USB and multiple serial ports or CAN bus according to claim 1, characterized in that: The model of the serial port chip U3 is CH340GSOP-16.

Citation Information

Patent Citations

  • Adaptive multi-protocol converter

    CN103516669A

  • Multifunctional data exchange device based on elevator communication

    CN204155273U