Search

CN-224233676-U - Serial port multiplexing circuit

CN224233676UCN 224233676 UCN224233676 UCN 224233676UCN-224233676-U

Abstract

The utility model discloses a serial port multiplexing circuit, which relates to the technical field of electronic circuits and comprises a plurality of communication modules connected with a battery microcontroller, wherein any communication module comprises a power supply enabling circuit, a communication conversion circuit and a communication identification circuit which are connected in an adaptive manner, the communication conversion circuit is connected with a serial port of the battery microcontroller, the communication identification circuit is used for generating a communication identification signal when the communication conversion circuit is connected with external equipment, the battery microcontroller is used for generating a communication enabling signal according to the communication identification signal, and the communication enabling signal is used for controlling the power supply enabling circuit to supply power for the communication conversion circuit so that the battery can communicate with the external equipment through the communication conversion circuit. The serial multiplexing circuit can save the serial port of the microcontroller and reduce the occupation of serial port resources of the microcontroller.

Inventors

  • XIE JUNJIE

Assignees

  • 无锡九通电子技术有限公司

Dates

Publication Date
20260512
Application Date
20250514

Claims (10)

  1. 1. The serial port multiplexing circuit is characterized by comprising a plurality of communication modules connected with a battery microcontroller, wherein any communication module comprises a power supply enabling circuit, a communication conversion circuit and a communication identification circuit, the communication conversion circuit is connected with the power supply enabling circuit, the communication identification circuit and the serial port of the battery microcontroller, and the power supply enabling circuit and the communication identification circuit are connected with the battery microcontroller; For any communication module, the communication identification circuit is used for generating a communication identification signal when the communication conversion circuit is connected with external equipment, the battery microcontroller is used for generating a communication enabling signal according to the communication identification signal, and the communication enabling signal is used for controlling the power enabling circuit to supply power to the communication conversion circuit so that the battery can communicate with the external equipment through the communication conversion circuit.
  2. 2. The serial multiplexing circuit of claim 1, wherein only a communication switching circuit in one communication module is connected to an external device at a time.
  3. 3. The serial port multiplexing circuit of claim 1, wherein the power supply enabling circuit comprises a switch tube Q1, a switch tube Q2, and a resistor R1, and the serial port of the battery microcontroller comprises a UART function port; The third electrode of the switch tube Q1 is connected to the power supply VCC, the second electrode of the switch tube Q1 is connected with the third electrode of the switch tube Q2 through a resistor R1, the second electrode of the switch tube Q2 is connected with the battery microcontroller and used for receiving a communication enabling signal, and the first electrode of the switch tube Q2 is grounded.
  4. 4. The serial multiplexing circuit of claim 3, wherein the communication identification circuit comprises a photo coupler U3 and a resistor R3; The primary side light emitting diode of the photoelectric coupler U3 is connected with the communication conversion circuit, the collector electrode of the photoelectric coupler U3 phototriode is connected with the battery microcontroller, and the emitter electrode of the photoelectric coupler U3 phototriode is grounded.
  5. 5. The serial port multiplexing circuit of claim 4, wherein said communication conversion circuit comprises a single wire communication conversion circuit, said power supply enabling circuit further comprises a diode D2a, a diode D2b, and a resistor R2a; The single-wire communication conversion circuit comprises a resistor R7, a resistor R8, a resistor R9, a resistor R10, a resistor R11, a resistor R12, a resistor R14, a resistor R15, a resistor R16, a switching tube T1, a switching tube T2, a switching tube T3, a switching tube T4, a diode D1, a diode D2 and a diode D3; The positive electrode of the diode D2 is connected with the positive electrode of the light-emitting diode of the photoelectric coupler U3 through a resistor R3, the positive electrode of the diode D2 is also connected with the third electrode of the switching tube T3, and the first electrode of the switching tube T3 is connected with the negative electrode of the light-emitting diode of the photoelectric coupler U3; The second electrode of the switch tube T3 is connected with one end of a resistor R14 and one end of a resistor R16, and the other end of the resistor R16 is connected with the first electrode of the switch tube T3; The cathode of the diode D2 is connected with the second electrode of the switching tube T4 through a resistor R11, the second electrode of the switching tube T4 is connected with the first electrode of the switching tube T4 through a resistor R12, the first electrode of the switching tube T4 is connected with the cathode of the light-emitting diode of the photoelectric coupler U3, and the third electrode of the switching tube T4 is connected with the cathode of the diode D1.
  6. 6. The serial port multiplexing circuit according to claim 5, wherein the positive electrode of the diode D1 is connected to the second electrode of the switching tube T1 through a resistor R10, the second electrode of the switching tube T1 is connected to the first electrode of the switching tube T1 through a resistor R8, the first electrode of the switching tube T1 is connected to the first electrode of the switching tube Q1, the third electrode of the switching tube T1 is grounded through a resistor R9, and the third electrode of the switching tube T1 is connected to the positive electrode of the diode D2a through a resistor R7, and the negative electrode of the diode D2a is connected to the UART function port; The other end of the resistor R14 is connected with the cathode of the diode D3, the anode of the diode D3 is connected with the third electrode of the switching tube T2, the first electrode of the switching tube T2 is connected with the first electrode of the switching tube Q1, the first electrode of the switching tube T2 is connected with the second electrode of the switching tube T2 through the resistor R2a, the second electrode of the switching tube T2 is connected with the anode of the diode D2a through the resistor R15, and the cathode of the diode D2b is connected with the UART function port.
  7. 7. The serial multiplexing circuit of claim 5, wherein the switching transistors T1 and T2 are PNP transistors, and the switching transistors T3 and T4 are NPN transistors.
  8. 8. A serial multiplexing circuit according to claim 3, wherein the switching tube Q1 is a PMOS tube and the switching tube Q2 is an NMOS tube.
  9. 9. The serial port multiplexing circuit of claim 4, wherein the communication conversion circuit comprises a 485 communication conversion circuit, wherein the power supply enabling circuit further comprises a diode D1a, a diode D1b and a resistor R1a, wherein the 485 communication conversion circuit comprises a communication isolation chip U1, the model of the communication isolation chip U1 comprises a CA-IS3721HS, and the communication isolation chip U1 comprises a VDD1 pin, a VIA pin, a VOA pin, a GND1 pin, a VDD2 pin, a VOB pin, a VIB pin and a GND2 pin; The cathodes of the diode D1a and the diode D1b are connected with a UART function port of the battery microcontroller, and the anode of the diode D1b is connected with the first electrode of the switching tube Q1 through a resistor R1 a; the first electrode of the switch tube Q1 is connected with the VDD1 pin, the positive electrode of the diode D1a is connected with the VOA pin, the positive electrode of the diode D1b is connected with the VIA pin, the VDD2 pin is connected with a power supply ISO_VCC, and the GND2 pin is grounded at the ground potential ISO_GND.
  10. 10. The serial multiplexing circuit according to claim 9, wherein the 485 communication conversion circuit comprises a 485 communication conversion chip U2, a resistor R4, a resistor R5, and a resistor R6, the model of the 485 communication conversion chip U2 comprises TP8485E, and the 485 communication conversion chip U3 comprises VCC pin, a pin, B pin, GND pin, RO pin, and DI pin; The pin A is connected with the anode of the light-emitting diode of the photoelectric coupler U3 through a resistor R3, and the pin B is connected with the cathode of the light-emitting diode of the photoelectric coupler U3; The resistor R5 is connected between the pin A and the pin B, the resistor R4 is connected between the pin VCC and the pin A, the resistor R6 is connected between the pin B and the pin GND, the VCC pin is connected to a power supply ISO_VCC, and the GND pin is grounded to a ground potential ISO_GND; and the RO pin is connected with a VIB pin of the communication isolation chip U1, and the DI pin is connected with a VOB pin of the communication isolation chip U1.

Description

Serial port multiplexing circuit Technical Field The utility model relates to the technical field of electronic circuits, in particular to a serial port multiplexing circuit. Background The shared battery is usually used for 485 communication in the battery changing cabinet, and serial communication modes such as single-wire communication and the like can be used when the shared battery is put on an electric two-wheel vehicle for use. To adapt to various communication methods, the MCU sharing the BMS in the battery is generally implemented using multiple UART function ports. However, this approach occupies multiple UART ports, thereby wasting resources of the MCU. Disclosure of utility model The present inventors have proposed a serial port multiplexing circuit for solving the above-mentioned problems and technical needs. The technical scheme of the utility model is as follows: The serial port multiplexing circuit comprises a plurality of communication modules connected with a battery microcontroller, wherein any communication module comprises a power supply enabling circuit, a communication conversion circuit and a communication identification circuit, the communication conversion circuit is connected with the power supply enabling circuit, the communication identification circuit and the serial port of the battery microcontroller, and the power supply enabling circuit and the communication identification circuit are connected with the battery microcontroller; For any communication module, the communication identification circuit is used for generating a communication identification signal when the communication conversion circuit is connected with external equipment, the battery microcontroller is used for generating a communication enabling signal according to the communication identification signal, and the communication enabling signal is used for controlling the power enabling circuit to supply power to the communication conversion circuit so that the battery can communicate with the external equipment through the communication conversion circuit. The further technical scheme is that only one communication conversion circuit in the communication module is connected with external equipment at the same time. The further technical scheme is that the power supply enabling circuit comprises a switching tube Q1, a switching tube Q2 and a resistor R1, and the serial port of the battery microcontroller comprises a UART function port; The third electrode of the switch tube Q1 is connected to the power supply VCC, the second electrode of the switch tube Q1 is connected with the third electrode of the switch tube Q2 through a resistor R1, the second electrode of the switch tube Q2 is connected with the battery microcontroller and used for receiving a communication enabling signal, and the first electrode of the switch tube Q2 is grounded. The communication identification circuit comprises a photoelectric coupler U3 and a resistor R3; The primary side light emitting diode of the photoelectric coupler U3 is connected with the communication conversion circuit, the collector electrode of the photoelectric coupler U3 phototriode is connected with the battery microcontroller, and the emitter electrode of the photoelectric coupler U3 phototriode is grounded. The power supply enabling circuit also comprises a diode D2a, a diode D2b and a resistor R2a; The single-wire communication conversion circuit comprises a resistor R7, a resistor R8, a resistor R9, a resistor R10, a resistor R11, a resistor R12, a resistor R14, a resistor R15, a resistor R16, a switching tube T1, a switching tube T2, a switching tube T3, a switching tube T4, a diode D1, a diode D2 and a diode D3; The positive electrode of the diode D2 is connected with the positive electrode of the light-emitting diode of the photoelectric coupler U3 through a resistor R3, the positive electrode of the diode D2 is also connected with the third electrode of the switching tube T3, and the first electrode of the switching tube T3 is connected with the negative electrode of the light-emitting diode of the photoelectric coupler U3; The second electrode of the switch tube T3 is connected with one end of a resistor R14 and one end of a resistor R16, and the other end of the resistor R16 is connected with the first electrode of the switch tube T3; The cathode of the diode D2 is connected with the second electrode of the switching tube T4 through a resistor R11, the second electrode of the switching tube T4 is connected with the first electrode of the switching tube T4 through a resistor R12, the first electrode of the switching tube T4 is connected with the cathode of the light-emitting diode of the photoelectric coupler U3, and the third electrode of the switching tube T4 is connected with the cathode of the diode D1. The further technical scheme is that the positive electrode of the diode D1 is connected with the second electrode of the switching tube T1 through a resist