Logic expansion device for CAN bus communication
By designing a logical expansion device for CAN bus communication in the fire monitoring solution in the energy storage field, the problem of communication incompatibility between traditional fire detectors and new energy storage systems is solved, address coding and signal transmission between devices are realized, and the efficiency is improved The signal transmission reliability and anti-interference performance of the system.
Patent Information
- Application Number
- CN202410899158.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-29
AI Technical Summary
In existing fire monitoring solutions in the energy storage field, the communication between traditional fire detectors and new energy storage systems is incompatible, and there is a lack of expansion requirements for controller output linkage control, resulting in insufficient trust and mismatched communication between devices.
A logic expansion device for CAN bus communication is designed, including a main controller, CAN bus circuit, relay output circuit and dry contact input detection circuit. Data processing is performed through the STM32F103C8T6 chip, using TJA1042T/1J and AC The M4520-231-2P-T000 chip realizes CAN bus data interaction and performs relay output through the EL357N(B)(TA)-G and HK4100F-DC24V-SHG devices, solving the communication mismatch problem between devices.
It achieves communication matching between new and old equipment, provides address encoding functions, improves the reliability and anti-interference performance of signal transmission, solves the gap of fire dry contact equipment in the fire protection system, and ensures effective communication of fire alarm control devices. and signal transmission.
Smart Images

Figure CN118859797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of CAN communication equipment, and in particular to a logic expansion device for CAN bus communication. Background Art
[0002] The energy storage field needs to monitor battery thermal runaway fires, so a fire monitoring solution is needed. The existing solution is based on a combination of traditional fire protection and early automotive battery thermal runaway monitoring solutions. However, the current energy storage fire alarm control device and energy storage fire alarm detection device both use the CAN bus as the main communication method, while traditional fire detectors or gas detectors use other communication methods such as the 485 bus and the fire bus 2, which are not compatible with the current energy storage application scenarios. The market currently does not have enough trust in new energy storage, so a combined monitoring solution is needed, which has triggered the demand for compatible designs of traditional fire alarm detectors. In addition, there is also an expansion demand for controller output linkage control. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, a logic expansion device for CAN bus communication provided by the present invention solves the problem of communication mismatch between new and old equipment in the existing battery thermal runaway fire monitoring scheme in the energy storage field.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0005] Provided is a logic expansion device for CAN bus communication, comprising a main controller, and a CAN bus circuit, a power supply circuit, a relay output circuit, and a dry contact input detection circuit electrically connected to the main controller;
[0006] The main controller is used to perform address management according to the serial port signal output by the CAN bus circuit and control the relay output circuit; superimpose the address information of the device according to the signal output by the dry contact input detection circuit, and control the CAN bus circuit to convert the superimposed data into CAN instructions and send them to the CAN bus;
[0007] CAN bus circuit, used for CAN bus data interaction, CAN command generation, and external dry contact signal processing;
[0008] Relay output circuit, used for dry contact signal output;
[0009] The dry contact input detection circuit is used to receive external dry contact signals.
[0010] Furthermore, the main controller uses STM32F103C8T6 chip for data processing.
[0011] Further, the CAN bus circuit includes a chip U3 of model TJA1042T / 1J and a chip Lb1 of model ACM4520-231-2P-T000; pin 3 of chip U3 is respectively connected to one end of capacitor C12, one end of capacitor C13 and 5V voltage; pin 2 of chip U3 is respectively connected to the other end of capacitor C12, the other end of capacitor C13 and grounded; pin 5 of chip U3 is respectively connected to one end of grounded capacitor C15, one end of resistor R4 and one end of resistor R5; pin 6 of chip U3 is respectively connected to the other end of resistor R4 and pin 4 of chip Lb1; pin 7 of chip U3 is respectively connected to the other end of resistor R5 and pin 3 of chip Lb1; pin 1 and pin 4 of chip U3 are respectively connected to the main controller. Pin 1, pin 4 and pin 8 of chip U3 are respectively connected to the main controller;
[0012] Pin 1 of chip Lb1 is respectively connected to grounding capacitor C14, one end of transient voltage suppression diode TVS1 and one end of thermistor PTC2; pin 2 of chip Lb1 is respectively connected to grounding capacitor C11, one end of transient voltage suppression diode TVS2 and one end of thermistor PTC1; the other end of transient voltage suppression diode TVS1 and the other end of transient voltage suppression diode TVS2 are both grounded; the other end of thermistor PTC1 is connected to the CANH line of the CAN bus; the other end of thermistor PTC2 is connected to the CANL line of the CAN bus.
[0013] Further, the relay output circuit includes a device J1 of model EL357N(B)(TA)-G and a relay JK1 of model HK4100F-DC24V-SHG; pin 1 of the device J1 is connected to a 5V voltage through a resistor R2; pin 2 of the device J1 is connected to a drain of an N-channel MOS transistor Q2; a source of the N-channel MOS transistor Q2 is connected to one end of a resistor R7 and is grounded; a gate of the N-channel MOS transistor Q2 is respectively connected to one end of a resistor R6 and the other end of the resistor R7; the other end of the resistor R6 is a control end of the relay output circuit;
[0014] Pin 4 of device J1 is connected to 24V voltage through resistor R1; Pin 3 of device J1 is respectively connected to one end of resistor R3 and the gate of N-channel MOS transistor Q1; The source of N-channel MOS transistor Q1 is connected to the other end of resistor R3 and grounded; The drain of N-channel MOS transistor Q1 is connected to pin 2 of relay;
[0015] Pin 1 of relay JK1 is connected to 24V voltage; Pin 3 of relay JK1 is the normally open end; Pin 4 of relay JK1 is the normally closed end, used to output dry contact signal; Pin 5 of relay JK1 is the common pin used to form a closed loop with the normally open end or the normally closed end.
[0016] Further, the dry contact input detection circuit includes a device J3 and a device J4, both of which are EL357N(B)(TA)-G; the pins of the device J3 are respectively connected to one end of the resistor R17, one end of the resistor R18, one end of the resistor R21 and one end of the capacitor C14; the other end of the resistor R17 and the other end of the resistor R18 are commonly connected to a 24V voltage; the pin 2 of the device J3 is respectively connected to the other end of the resistor R21, the other end of the capacitor C14, the other end of the capacitor C15 and the pin 1 of the device J4; the pin 3 of the device J3 is grounded; the pin 4 of the device J3 is respectively connected to one end of the resistor R20 and one end of the resistor R19; the other end of the resistor R19 is connected to a 3.3V voltage; the other end of the resistor R20 is connected to the main controller;
[0017] Pin 2 of device J4 is respectively connected to the other end of capacitor C15 and the positive electrode of diode D1; the negative electrode of diode D1 is connected to the negative electrode of transient voltage suppression diode D2 and the external dry contact input terminal; the positive electrode of transient voltage suppression diode D2 is grounded; pin 3 of device J4 is grounded; pin 4 of device J4 is respectively connected to one end of resistor R22 and one end of resistor R23; the other end of resistor R22 is connected to 3.3V voltage; the other end of resistor R23 is connected to the main controller.
[0018] The beneficial effects of the present invention are:
[0019] 1. This device realizes the information interaction between CAN bus data and dry contact input and output through the built-in main controller (MCU) and peripheral circuits, and can provide address encoding function, so that the fire alarm control device for energy storage can receive the input dry contact signal with address information and control the clear address, solving the communication mismatch problem between new and old equipment in the existing battery thermal runaway fire monitoring solution in the energy storage field.
[0020] 2. The relay output circuit can be controlled by the main controller to be normally open or normally closed, which is convenient for continuous dry contact signal output.
[0021] 3. This dry contact input detection circuit can automatically send the dry contact signal to the main controller when the dry contact signal input is detected, so as to realize fast communication.
[0022] 4. The device adopts optocoupler control relay output as a whole, and uses optocoupler isolation circuit to collect the three states of on, off and access of external dry contact signals, effectively shielding a series of electromagnetic interference that may be caused by external circuits, improving the anti-interference performance of the product itself, and using MCU to realize address coding and analog signal conversion, improving the reliability and editability of signal transmission. It solves the vacancy of fire dry contact equipment with address access to the fire protection system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a structural schematic diagram of the device;
[0024] Figure 2 This is a schematic diagram of the address management process;
[0025] Figure 3 This is the CAN bus circuit diagram;
[0026] Figure 4 It is the relay output control flow chart;
[0027] Figure 5 This is the relay output circuit diagram;
[0028] Figure 6 Input flow chart for dry contact signal;
[0029] Figure 7 This is the circuit diagram for dry contact input detection. DETAILED DESCRIPTION
[0030] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0031] like Figure 1 As shown, the logic expansion device of the CAN bus communication includes a main controller, and a CAN bus circuit, a power supply circuit, a relay output circuit, and a dry contact input detection circuit electrically connected to the main controller;
[0032] The main controller is used to perform address management according to the serial port signal output by the CAN bus circuit and control the relay output circuit; superimpose the address information of the device according to the signal output by the dry contact input detection circuit, and control the CAN bus circuit to convert the superimposed data into CAN instructions and send them to the CAN bus;
[0033] CAN bus circuit, used for CAN bus data interaction, CAN command generation, and external dry contact signal processing;
[0034] Relay output circuit, used for dry contact signal output;
[0035] The dry contact input detection circuit is used to receive external dry contact signals.
[0036] In this embodiment, the main controller uses the STM32F103C8T6 chip for data processing, and through wiring configuration, it can also realize 24V power supply output control.
[0037] In the specific implementation process, address management includes address writing, such as Figure 2 As shown, the main controller (MCU) receives data and sets the local device address according to the instruction, and stores the address information in the internal FLASH.
[0038] like Figure 3 As shown, the CAN bus circuit includes a chip U3 of model TJA1042T / 1J and a chip Lb1 of model ACM4520-231-2P-T000; Pin 3 of chip U3 is respectively connected to one end of capacitor C12, one end of capacitor C13 and 5V voltage; Pin 2 of chip U3 is respectively connected to the other end of capacitor C12, the other end of capacitor C13 and grounded; Pin 5 of chip U3 is respectively connected to one end of grounded capacitor C15, one end of resistor R4 and one end of resistor R5; Pin 6 of chip U3 is respectively connected to the other end of resistor R4 and Pin 4 of chip Lb1; Pin 7 of chip U3 is respectively connected to the other end of resistor R5 and Pin 3 of chip Lb1; Pin 1 and Pin 4 of chip U3 are respectively connected to the main controller; Pin 1, Pin 4 and Pin 8 of chip U3 are respectively connected to the main controller;
[0039] Pin 1 of chip Lb1 is respectively connected to grounding capacitor C14, one end of transient voltage suppression diode TVS1 and one end of thermistor PTC2; pin 2 of chip Lb1 is respectively connected to grounding capacitor C11, one end of transient voltage suppression diode TVS2 and one end of thermistor PTC1; the other end of transient voltage suppression diode TVS1 and the other end of transient voltage suppression diode TVS2 are both grounded; the other end of thermistor PTC1 is connected to the CANH line of the CAN bus; the other end of thermistor PTC2 is connected to the CANL line of the CAN bus.
[0040] In the CAN bus circuit, chip Lb1 is used to filter out external common-mode interference, capacitor C12 is used for chip power filtering and energy storage, capacitor C13 is used for chip power decoupling, resistors R4 and R5 are CAN bus matching resistors, transient voltage suppression diode TVS1 is used to absorb surge impact voltage, and thermistors PTC1 and PTC2 are used to prevent short-circuit damage and protect back-end devices.
[0041] In this embodiment, if Figure 4 As shown, after receiving the CAN bus command, the CAN bus conversion circuit translates the data into serial port data and sends it to the MCU. After receiving the signal, the MCU determines whether the CAN bus control command address is correct. If it is correct, it outputs the control signal. After the relay output circuit receives the control signal, it controls the relay output state to change (if the output is normally open in the command, it becomes a normally open state, and if the output is normally closed in the command, it becomes a normally closed state).
[0042] like Figure 5 As shown, the relay output circuit includes a device J1 of model EL357N(B)(TA)-G and a relay JK1 of model HK4100F-DC24V-SHG; pin 1 of the device J1 is connected to a 5V voltage through a resistor R2; pin 2 of the device J1 is connected to a drain of an N-channel MOS transistor Q2; a source of the N-channel MOS transistor Q2 is connected to one end of a resistor R7 and is grounded; a gate of the N-channel MOS transistor Q2 is respectively connected to one end of a resistor R6 and the other end of the resistor R7; the other end of the resistor R6 is a control end of the relay output circuit;
[0043] Pin 4 of device J1 is connected to 24V voltage through resistor R1; Pin 3 of device J1 is respectively connected to one end of resistor R3 and the gate of N-channel MOS transistor Q1; The source of N-channel MOS transistor Q1 is connected to the other end of resistor R3 and grounded; The drain of N-channel MOS transistor Q1 is connected to pin 2 of relay;
[0044] Pin 1 of relay JK1 is connected to 24V voltage; Pin 3 of relay JK1 is the normally open end; Pin 4 of relay JK1 is the normally closed end, used to output dry contact signal; Pin 5 of relay JK1 is the common pin used to form a closed loop with the normally open end or the normally closed end.
[0045] In the relay output circuit, device J1 is used for isolation control to prevent external impact from damaging the chip; resistor R2 is a pull-up resistor, used to provide driving power to the optocoupler and limit the on-current; N-channel MOS tube Q2 is used to control the on-current of the optocoupler; resistor R7 is a grounding voltage divider resistor, which controls the MOS tube with resistor R6 on the one hand, and provides a fixed ground level to the MOS tube when the IO port state of the powered-on MCU chip is uncertain on the other hand. Resistor R6 is used as a current limiting resistor to limit the current flowing through the gate of the MOS tube. Resistor R1 is used as a pull-up resistor to limit the output current of the optocoupler. Resistor R3 is used as a pull-down resistor, which divides the voltage with resistor R1 and provides a control signal to the N-channel MOS tube Q1. The N-channel MOS tube Q1 is used to control the on-current of the relay.
[0046] In this embodiment, if Figure 6 As shown, when the dry contact signal detection circuit detects the dry contact signal input, it will send a signal to the MCU. After receiving the signal, the MCU will add the input signal to the address information of the device and send it to the CAN bus circuit, which will convert it into a CAN command and send it to the bus.
[0047] like Figure 7As shown, the dry contact input detection circuit includes a device J3 and a device J4, both of which are EL357N(B)(TA)-G; the pins of the device J3 are respectively connected to one end of the resistor R17, one end of the resistor R18, one end of the resistor R21 and one end of the capacitor C14; the other end of the resistor R17 and the other end of the resistor R18 are commonly connected to a 24V voltage; the pin 2 of the device J3 is respectively connected to the other end of the resistor R21, the other end of the capacitor C14, the other end of the capacitor C15 and the pin 1 of the device J4; the pin 3 of the device J3 is grounded; the pin 4 of the device J3 is respectively connected to one end of the resistor R20 and one end of the resistor R19; the other end of the resistor R19 is connected to a 3.3V voltage; the other end of the resistor R20 is connected to the main controller;
[0048] Pin 2 of device J4 is respectively connected to the other end of capacitor C15 and the positive electrode of diode D1; the negative electrode of diode D1 is connected to the negative electrode of transient voltage suppression diode D2 and the external dry contact input terminal; the positive electrode of transient voltage suppression diode D2 is grounded; pin 3 of device J4 is grounded; pin 4 of device J4 is respectively connected to one end of resistor R22 and one end of resistor R23; the other end of resistor R22 is connected to 3.3V voltage; the other end of resistor R23 is connected to the main controller.
[0049] In the dry contact input detection circuit, resistors R17 and 18 are pull-up resistors to limit the on-current of the optocoupler. Capacitors C14 and C15 are both stable filter capacitors. Resistor R21 is connected in parallel with the input of optocoupler J3 to divide the voltage. When the load is connected and not turned on, the voltage at the input of optocoupler J3 is less than 0.8V (optocoupler J3 has no output). Resistor R20 and resistor R22 are both power pull-up resistors. Diode D1 and diode D2 are used to prevent external DC power supply from being connected. Resistor R23 is a protective current limiting resistor.
[0050] In the specific implementation process, the judgment table of the input feedback circuit of the device is shown in Table 1.
[0051] Table 1
[0052] Input Status FB0 FB1 Input load connection High level Low level Input load closed High level High level Input load disconnect Low level Low level
[0053] In summary, the device as a whole adopts optocoupler to control the relay output, and uses optocoupler isolation circuit to collect the three states of on, off and connected of the external dry contact signal, which effectively shields a series of electromagnetic interference that may be caused by the external circuit, improves the anti-interference performance of the product itself, and uses MCU to realize address coding and analog signal conversion, which improves the reliability and editability of signal transmission. It solves the vacancy of fire dry contact equipment with address access to the fire protection system. The present invention can realize the communication between the traditional smoke and heat detector that outputs dry contact alarm signals and the fire alarm control device for energy storage, and can realize the assignment of address information to the dry contact signal and upload it to the CAN bus.
Claims
1. A logic expansion device for CAN bus communication, characterized in that: It includes a main controller, and a CAN bus circuit, a power supply circuit, a relay output circuit, and a dry contact input detection circuit electrically connected to the main controller; The main controller is used to perform address management according to the serial port signal output by the CAN bus circuit and control the relay output circuit; superimpose the address information of the device according to the signal output by the dry contact input detection circuit, and control the CAN bus circuit to convert the superimposed data into CAN instructions and send them to the CAN bus; CAN bus circuit, used for CAN bus data interaction, CAN command generation, and external dry contact signal processing; Relay output circuit, used for dry contact signal output; The dry contact input detection circuit is used to receive external dry contact signals.
2. The logic expansion device for CAN bus communication according to claim 1, characterized in that: The main controller uses STM32F103C8T6 chip for data processing.
3. The logic expansion device for CAN bus communication according to claim 1, characterized in that: The CAN bus circuit includes a chip U3 of model TJA1042T / 1J and a chip Lb1 of model ACM4520-231-2P-T000; Pin 3 of chip U3 is respectively connected to one end of capacitor C12, one end of capacitor C13 and 5V voltage; Pin 2 of chip U3 is respectively connected to the other end of capacitor C12, the other end of capacitor C13 and grounded; Pin 5 of chip U3 is respectively connected to one end of grounded capacitor C15, one end of resistor R4 and one end of resistor R5; Pin 6 of chip U3 is respectively connected to the other end of resistor R4 and Pin 4 of chip Lb1; Pin 7 of chip U3 is respectively connected to the other end of resistor R5 and Pin 3 of chip Lb1; Pin 1 and Pin 4 of chip U3 are respectively connected to the main controller; Pin 1, Pin 4 and Pin 8 of chip U3 are respectively connected to the main controller; Pin 1 of chip Lb1 is respectively connected to grounding capacitor C14, one end of transient voltage suppression diode TVS1 and one end of thermistor PTC2; pin 2 of chip Lb1 is respectively connected to grounding capacitor C11, one end of transient voltage suppression diode TVS2 and one end of thermistor PTC1; the other end of transient voltage suppression diode TVS1 and the other end of transient voltage suppression diode TVS2 are both grounded; the other end of thermistor PTC1 is connected to the CANH line of the CAN bus; the other end of thermistor PTC2 is connected to the CANL line of the CAN bus.
4. The logic expansion device for CAN bus communication according to claim 1, characterized in that: The relay output circuit includes a device J1 of model EL357N(B)(TA)-G and a relay JK1 of model HK4100F-DC24V-SHG; a pin 1 of the device J1 is connected to a 5V voltage through a resistor R2; a pin 2 of the device J1 is connected to a drain of an N-channel MOS transistor Q2; a source of the N-channel MOS transistor Q2 is connected to one end of a resistor R7 and is grounded; a gate of the N-channel MOS transistor Q2 is respectively connected to one end of a resistor R6 and the other end of the resistor R7; the other end of the resistor R6 is a control end of the relay output circuit; Pin 4 of device J1 is connected to 24V voltage through resistor R1; Pin 3 of device J1 is respectively connected to one end of resistor R3 and the gate of N-channel MOS transistor Q1; The source of N-channel MOS transistor Q1 is connected to the other end of resistor R3 and grounded; The drain of N-channel MOS transistor Q1 is connected to pin 2 of relay; Pin 1 of relay JK1 is connected to 24V voltage; Pin 3 of relay JK1 is the normally open end; Pin 4 of relay JK1 is the normally closed end, used to output dry contact signal; Pin 5 of relay JK1 is the common pin used to form a closed loop with the normally open end or the normally closed end.
5. The logic expansion device for CAN bus communication according to claim 1, characterized in that: The dry contact input detection circuit includes a device J3 and a device J4, both of which are EL357N(B)(TA)-G; the pins of the device J3 are respectively connected to one end of a resistor R17, one end of a resistor R18, one end of a resistor R21 and one end of a capacitor C14; the other end of the resistor R17 and the other end of the resistor R18 are commonly connected to a 24V voltage; the pin 2 of the device J3 is respectively connected to the other end of the resistor R21, the other end of the capacitor C14, the other end of the capacitor C15 and the pin 1 of the device J4; the pin 3 of the device J3 is grounded; the pin 4 of the device J3 is respectively connected to one end of a resistor R20 and one end of a resistor R19; the other end of the resistor R19 is connected to a 3.3V voltage; the other end of the resistor R20 is connected to the main controller; Pin 2 of device J4 is respectively connected to the other end of capacitor C15 and the positive electrode of diode D1; the negative electrode of diode D1 is connected to the negative electrode of transient voltage suppression diode D2 and the external dry contact input terminal; the positive electrode of transient voltage suppression diode D2 is grounded; pin 3 of device J4 is grounded; pin 4 of device J4 is respectively connected to one end of resistor R22 and one end of resistor R23; the other end of resistor R22 is connected to 3.3V voltage; the other end of resistor R23 is connected to the main controller.
