Multi-product automatic addressing circuit based on CAN bus
By setting up addressing units in the CAN bus controller and cascading them in series, the problem of the lack of automatic addressing in the CAN bus is solved, enabling automatic addressing of multiple products, simplifying configuration and improving scalability and reliability.
Patent Information
- Application Number
- CN202520490453.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2035-03-18
AI Technical Summary
The CAN bus lacks automatic addressing capabilities, which leads to complex configuration, poor scalability, and poor reliability, especially in scenarios with a large number of devices or complex network topologies.
Design a multi-product automatic addressing circuit based on CAN bus. By setting an addressing unit in each controller and connecting multiple addressing units in series, the microcontroller unit parses the addressing instructions to generate control signals, thereby achieving automatic numbering.
It implements automatic addressing on the CAN bus, supports automatic addressing of multiple products, the number of addresses is not limited by hardware circuitry, simplifies the configuration process, and improves scalability and reliability.
Smart Images

Figure CN223870974U_ABST
Abstract
Description
[Technical Field]
[0001] This utility model relates to the field of circuit design technology, and in particular to a multi-product automatic addressing circuit based on CAN bus. [Background Technology]
[0002] CAN bus is a multi-master serial communication protocol primarily used for real-time communication in vehicle and industrial environments. CAN bus uses identifiers to distinguish different messages; these identifiers are used for arbitration and priority management, rather than a traditional addressing mechanism. Therefore, CAN bus itself does not have automatic addressing functionality. Automatic addressing is crucial in communication, especially in scenarios with a large number of devices or complex network topologies. Automatic addressing simplifies configuration and improves scalability and reliability. Currently, there are no technical solutions for automatic addressing on the CAN bus.
[0003] Therefore, a solution is needed to address the automatic addressing problem of the CAN bus. [Utility Model Content]
[0004] One of the purposes of this invention is to provide a multi-product automatic addressing circuit based on CAN bus, which can solve the problem of automatic addressing of multi-products based on CAN bus.
[0005] According to one aspect of this utility model, a multi-product automatic addressing circuit based on a CAN bus is provided, comprising multiple controllers, each controller being connected to a corresponding product to control the corresponding product. Each controller includes a CAN transceiver, a microcontroller unit, and an addressing unit. The CAN transceiver is connected to the CAN bus and the microcontroller unit, and is used to convert the differential signals of the CAN bus into digital signals and provide them to the microcontroller unit. The microcontroller unit is connected to the corresponding product and the addressing unit. In each controller, the addressing unit includes a first resistor, a second resistor, a first power switch, and a second power switch. One end of the first resistor is connected to a node, and the other end is connected to a first signal terminal of the microcontroller unit. MCU_UP is connected; the first connection terminal of the first power switch is connected to the node, its second connection terminal is connected to the address output terminal Address_OUT of the addressing unit, and its control terminal is connected to the first connection terminal of the second power switch; the second connection terminal of the second power switch is grounded, and its control terminal is connected to the second signal terminal MCU_SW of the microcontroller unit; the voltage sampling terminal MCU_ADC of the microcontroller unit is connected to the node; the address input terminal Address_IN of the addressing unit is connected to the node; except for the first controller, the address input terminal Address_IN of the addressing unit in each controller is connected to the address output terminal Address_OUT of the addressing unit in the previous controller.
[0006] Compared with the prior art, this utility model has an addressing unit in the controller corresponding to each product, and multiple addressing units are connected in series, thereby solving the problem of automatic addressing of multiple products based on CAN bus. [Attached Image Description]
[0007] To more clearly illustrate the technical solutions of the embodiments of this utility model, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0008] Figure 1 This is a schematic diagram of the functional modules of a CAN bus-based multi-product automatic addressing circuit in one embodiment of the present invention.
[0009] Figure 2 As shown in one embodiment of the present invention Figure 1 The circuit diagram of the controller shown is shown.
[0010] Figure 3 As shown in one embodiment of the present invention Figure 1 and Figure 2 The circuit connection diagrams for each addressing unit are shown.
Detailed Implementation Methods
[0011] To make the above-mentioned objectives, features and advantages of this utility model more apparent and understandable, the utility model will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0012] The term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that excludes other embodiments. Unless otherwise specified, the terms coupling, connection, linking, and interconnection used herein to indicate electrical connection mean direct or indirect connection. For example, A being connected to B includes both a direct electrical connection between A and B and a connection between A and B via electrical components or circuits.
[0013] In the description of this utility model, it should be understood that the terms "upper", "lower", "front", "back", "positive", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this utility model and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this utility model.
[0014] Please refer to Figure 1 As shown, it is a functional module schematic diagram of a multi-product automatic addressing circuit based on CAN bus in one embodiment of this utility model. Figure 1 The CAN bus-based multi-product automatic addressing circuit shown includes multiple controllers (e.g., LED Controller No.1, LED Controller No.2, LED Controller No.3, ..., LED Controller No.××), each connected to a corresponding product to control that product. The number of controllers and products required depends on actual needs.
[0015] Figure 1The technical solution shown is applied to an ambient lighting project. Taking an ambient lighting product as an example, the product is an LED; the controller is an LED controller to control the LED's light color and brightness; the controller's power supply terminal Vin, R-Control terminal, G-Control terminal, and B-Control terminal are all connected to the corresponding LEDs. The power supply terminal Vin is the power supply for the LED, and the R-Control terminal, G-Control terminal, and B-Control terminal output signals to control the LED's brightness and color.
[0016] Please refer to Figure 2 As shown, this is one embodiment of the present invention. Figure 1 The circuit diagram of the controller is shown. Figure 2 The controller shown includes a CAN transceiver 210, a microcontroller unit (MCU) 220, and an address switch 230. The CAN transceiver 210 is connected to the CAN bus (e.g., CAN_H and CAN_L) and is connected to the MCU 220 via transmit data lines (TX) and receive data lines (RX). The CAN transceiver 210 converts the differential signals of the CAN bus into digital signals and provides them to the MCU 220. The MCU 220 is connected to the address switch 230 and the corresponding LED. The MCU 220 controls the brightness and color of the LED and also controls the address switch 230. Alternatively, the microcontroller unit (MCU) 220 is connected to the addressing unit (Address Switch) 230 and the corresponding product. The microcontroller unit (MCU) 220 is used to control the corresponding product and also controls the addressing unit (Address Switch) 230.
[0017] Figure 2The controller shown also includes a reverse protection and filter circuit 240, a DC / DC convector circuit 250, and a low-dropout regulator (LDO) 260. The input of the reverse protection and filter circuit 240 is connected to the power interface Vbat, and its output is connected to the input of the DC / DC convector circuit 250. The output of the DC / DC convector circuit 250 is connected to the input of the LDO 260, and the output of the LDO 260 is connected to the power supply of the CAN transceiver 210 and the microcontroller unit (MCU) 220. The output of the DC / DC convector circuit 250 is connected to the corresponding LED. The R-Control, G-Control, and B-Control terminals of the MCU 220 are all connected to the corresponding LEDs. The DC-DC converter (DC / DC Convector) 250 powers the LED and the low-dropout regulator (LDO) 260; the LDO 260 powers the CAN transceiver 210 and the microcontroller unit (MCU) 220. The reverse protection and filtering circuit 240, the DC-DC converter 250, and the LDO 260 are existing technologies well-known to those skilled in the art, and therefore will not be described in detail here.
[0018] Please refer to Figure 3 As shown, this is one embodiment of the present invention. Figure 1 and Figure 2 The circuit connection diagrams for each addressing unit are shown.
[0019] In LED Controller No.1 (or the first controller), the addressing unit includes a first resistor R1, a second resistor R4, a first power switch Q1, and a second power switch Q4. One end of the first resistor R1 is connected to node A, and the other end is connected to the first signal terminal MCU_UP (or GPIO_UP) of the microcontroller unit (MCU) 220. The first connection terminal of the first power switch Q1 is connected to node A, and its second connection terminal is connected to the address output terminal Address_OUT of the addressing unit. Its control terminal is connected to the first connection terminal of the second power switch Q4. The second connection terminal of the second power switch Q4 is grounded, and its control terminal is connected to the second signal terminal MCU_SW (or GPIO_SW) of the microcontroller unit (MCU) 220. The voltage sampling terminal MCU_ADC (or GPIO_AD) of the microcontroller unit (MCU) 220 is connected to node A. The address input terminal Address_IN of the addressing unit is connected to node A. The addressing unit also includes a third resistor R7, a fourth resistor R10, and a fifth resistor R13. The control terminal of the first power switch Q1 is connected to the first connection terminal of the second power switch Q4 via the third resistor R7. The control terminal of the second power switch Q4 is connected to the second signal terminal MCU_SW of the microcontroller unit (i.e., MCU) 220 via the fourth resistor R10. One end of the fifth resistor R13 is connected to the control terminal of the second power switch Q4, and the other end is connected to the second connection terminal of the second power switch Q4.
[0020] In LED Controller No.2 (or the second controller), the addressing unit includes a first resistor R2, a second resistor R5, a first power switch Q2, and a second power switch Q5. One end of the first resistor R2 is connected to node B, and the other end is connected to the first signal terminal MCU_UP (or GPIO_UP) of the microcontroller unit (MCU) 220. The first connection terminal of the first power switch Q2 is connected to node B, and its second connection terminal is connected to the address output terminal Address_OUT of the addressing unit. Its control terminal is connected to the first connection terminal of the second power switch Q5. The second connection terminal of the second power switch Q5 is grounded, and its control terminal is connected to the second signal terminal MCU_SW (or GPIO_SW) of the microcontroller unit (MCU) 220. The voltage sampling terminal MCU_ADC (or GPIO_AD) of the microcontroller unit (MCU) 220 is connected to node B. The address input terminal Address_IN of the addressing unit is connected to node B. The addressing unit also includes a third resistor R8, a fourth resistor R11, and a fifth resistor R14. The control terminal of the first power switch Q2 is connected to the first connection terminal of the second power switch Q5 via the third resistor R8. The control terminal of the second power switch Q5 is connected to the second signal terminal MCU_SW of the microcontroller unit (i.e., MCU) 220 via the fourth resistor R11. One end of the fifth resistor R14 is connected to the control terminal of the second power switch Q5, and the other end is connected to the second connection terminal of the second power switch Q5.
[0021] In LED Controller No. ×× (or the last controller), the addressing unit includes a first resistor R3, a second resistor R6, a first power switch Q3, and a second power switch Q6. One end of the first resistor R3 is connected to node C, and the other end is connected to the first signal terminal MCU_UP (or GPIO_UP) of the microcontroller unit (i.e., MCU) 220. The first connection terminal of the first power switch Q3 is connected to node C, and its second connection terminal is connected to the address output terminal Address_OUT of the addressing unit. Its control terminal is connected to the first connection terminal of the second power switch Q6. The second connection terminal of the second power switch Q6 is grounded, and its control terminal is connected to the second signal terminal MCU_SW (or GPIO_SW) of the microcontroller unit (i.e., MCU) 220. The voltage sampling terminal MCU_ADC (or GPIO_AD) of the microcontroller unit (i.e., MCU) 220 is connected to node C. The address input terminal Address_IN of the addressing unit is connected to node C. The addressing unit also includes a third resistor R9, a fourth resistor R12, and a fifth resistor R15. The control terminal of the first power switch Q3 is connected to the first connection terminal of the second power switch Q6 via the third resistor R9. The control terminal of the second power switch Q6 is connected to the second signal terminal MCU_SW of the microcontroller unit (i.e., MCU) 220 via the fourth resistor R12. One end of the fifth resistor R15 is connected to the control terminal of the second power switch Q6, and the other end is connected to the second connection terminal of the second power switch Q6.
[0022] In other words, in each LED Controller, the addressing unit includes a first resistor (R1, R2, R3), a second resistor (R4, R5, R6), a first power switch (Q1, Q2, Q3), and a second power switch (Q4, Q5, Q6). One end of the first resistor (R1, R2, R3) is connected to nodes (A, B, C), and the other end is connected to the first signal terminal MCU_UP (or GPIO_UP) of the microcontroller unit (MCU) 220. The first connection terminal of the first power switch (Q1, Q2, Q3) is connected to nodes (A, B, C), and its second connection terminal... The address output terminal Address_OUT of the addressing unit is connected to the control terminal of the second power switch (Q4, Q5, Q6); the second connection terminal of the second power switch (Q4, Q5, Q6) is grounded, and its control terminal is connected to the second signal terminal MCU_SW (or GPIO_SW) of the microcontroller unit (i.e., MCU) 220; the voltage sampling terminal MCU_ADC (or GPIO_AD) of the microcontroller unit (i.e., MCU) 220 is connected to the nodes (A, B, C); the address input terminal Address_IN of the addressing unit is connected to the nodes (A, B, C). The addressing unit also includes a third resistor (R7, R8, R9), a fourth resistor (R10, R11, R12), and a fifth resistor (R13, R14, R15). The control terminals of the first power switches (Q1, Q2, Q3) are connected to the first connection terminals of the second power switches (Q4, Q5, Q6) via the third resistor (R7, R8, R9). The control terminals of the second power switches (Q4, Q5, Q6) are connected to the second signal terminal MCU_SW of the microcontroller unit (i.e., MCU) 220 via the fourth resistor (R10, R11, R12). One end of the fifth resistor (R13, R14, R15) is connected to the control terminal of the second power switches (Q4, Q5, Q6), and the other end is connected to the second connection terminal of the second power switches (Q4, Q5, Q6).
[0023] exist Figure 3In the illustrated embodiment, the address input terminal Address_IN of the addressing unit in LED Controller No.2 (or the second controller) is connected to the address output terminal Address_OUT of the addressing unit in LED Controller No.1 (or the first controller); the address input terminal Address_IN of the addressing unit in LED Controller No.3 (or the third controller) is connected to the address output terminal Address_OUT of the addressing unit in LED Controller No.2 (or the second controller); the address input terminal Address_IN of the addressing unit in LED Controller No.4 (or the fourth controller) is connected to the address output terminal Address_OUT of the addressing unit in LED Controller No.3 (or the third controller); ...; the address input terminal Address_IN of the addressing unit in LED Controller No.×× (or the ××th controller) is connected to the address output terminal Address_OUT of the addressing unit in LED Controller No.(××-1) (or the (××-1)th controller), that is, the addressing units in all controllers are connected in series. In addition, the address input terminal Address_IN of the addressing unit in LEDController No.1 (or the first controller) is left floating; the address output terminal Address_OUT of the addressing unit in LEDController No.×× (or the ××th controller) is left floating.
[0024] In other words, except for the first controller, the address input terminal Address_IN of the addressing unit in each controller is connected to the address output terminal Address_OUT of the addressing unit in the previous controller, and the address input terminal Address_IN of the addressing unit in the first controller is left floating, while the address output terminal Address_OUT of the addressing unit in the last controller is left floating.
[0025] When the CAN bus (e.g., CAN_H and CAN_L) sends an addressing command, in each controller, the microcontroller unit (MCU) 220 parses the addressing command and generates control signals to make its first signal terminal MCU_UP output a constant level signal and its second signal terminal MCU_SW output the first logic level of the switch signal, thereby turning off the first power switch (Q1, Q2, Q3) and the second power switch (Q4, Q5, Q6). At this time, if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 is greater than a predetermined voltage value, the controller where the microcontroller unit (MCU) 220 is located is numbered; if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 is less than the predetermined voltage value, the controller where the microcontroller unit (MCU) 220 is located is not numbered.
[0026] Once a controller is numbered, in the numbered controller, the first signal terminal MCU_UP of the microcontroller unit (MCU) 220 continues to output a constant level signal, and the second signal terminal MCU_SW outputs a switching signal at the second logic level, thereby turning on both the first power switches (Q1, Q2, Q3) and the second power switches (Q4, Q5, Q6). In the unnumbered controller, the first signal terminal MCU_UP of the microcontroller unit (MCU) 220 continues to output a constant level signal, and the second signal terminal MCU_SW continues to output a switching signal at the first logic level, so that both the first power switches (Q1, Q2, Q3) and the second power switches (Q4, Q5, Q6) are turned off. At this time, if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 is greater than a predetermined voltage value, then the controller containing the microcontroller unit (MCU) 220 is numbered; if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 is less than the predetermined voltage value, then the controller containing the microcontroller unit (MCU) 220 is not numbered.
[0027] exist Figure 3 In the specific embodiment shown, the first power switches (Q1, Q2, Q3) are PNP transistors, and their first connection terminal, second connection terminal, and control terminal are the emitter, collector, and base of the PNP transistors, respectively. The second power switches (Q4, Q5, Q6) are NMOS transistors, and their first connection terminal, second connection terminal, and control terminal are the drain, source, and gate of the NMOS transistors, respectively. The constant-level signal output by the first signal terminal MCU_UP is high; the first logic level of the switch signal output by the second signal terminal MCU_SW is low, and its second logic level is high.
[0028] exist Figure 3 In the specific embodiment shown, the resistance values of the fourth resistor (R10, R11, R12) and the fifth resistor (R13, R14, R15) are selected to satisfy the following: when the switch signal output by the second signal terminal MCU_SW is high, the voltage division value on the fifth resistor (R13, R14, R15) is greater than the turn-on voltage threshold of the second power switch (Q4, Q5, Q6), so that the second power switch (Q4, Q5, Q6) is in the on state.
[0029] To facilitate understanding of this utility model, the following is based on... Figure 2 and Figure 3 Detailed introduction Figure 1 The working principle of the multi-product automatic addressing circuit based on the CAN bus is shown.
[0030] When the CAN bus (e.g., CAN_H and CAN_L) sends an addressing command, in each controller, the CAN transceiver 210 converts the differential signal of the CAN bus into a digital signal and sends it to the microcontroller unit (MCU) 220. At this time, the first signal terminal MCU_UP is high (which can be called a constant level signal), and the second signal terminal MCU_SW is low (which can be called the first logic level of the switch signal). For the sake of convenience, the high level of the first signal terminal MCU_UP is tentatively set to 5V. Since LED Controller No.1 (which can be called the first controller) is in the starting position, the address input terminal Address_IN of LED Controller 1 has no input (or is floating), so the voltage of node A is high, and the voltage value is approximately 5V. That is, the voltage value sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 in LED Controller No.1 is 5V (which is greater than the predetermined voltage value). Since the second signal terminal MCU_SW is low, MOSFET Q4 is turned off, so transistor Q1 is turned off. The address output terminal Address_OUT of the addressing unit in LED Controller No.1 and the address input terminal Address_IN of the addressing unit in LED Controller No.2 are connected via a wiring harness. Therefore, the voltage at node B is approximately the voltage division value of resistors R2 and R4. For ease of description, resistors R2 and R4 are chosen to have the same resistance value; the actual resistance value can be selected according to the specific case. Since the first signal terminal MCU_UP of the microcontroller unit (MCU) 220 in LED Controller No.2 is high (approximately 5V) after the CAN bus sends the addressing command, the voltage at node B is approximately 2.5V (less than the predetermined voltage value). This means that the voltage value sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (MCU) 220 in LED Controller No.2 is 2.5V (less than the predetermined voltage value). The other principles are the same as above. In LED Controller No.2, the second signal terminal MCU_SW of the microcontroller unit (i.e., MCU) 220 is at a low level, MOSFET Q5 is turned off, transistor Q2 is turned off, the address output terminal Address_OUT of the addressing unit in LED Controller No.2 and the address input terminal Address_IN of the addressing unit in LED Controller No.3 are connected by a wiring harness, and the voltage sampling terminal MCU_ADC of the microcontroller unit (i.e., MCU) 220 in LED Controller No.3 collects a voltage value of 2.5V (which is less than the predetermined voltage value).Similarly, except for the voltage value of 5V collected by the voltage sampling terminal MCU_ADC of the microcontroller unit (i.e., MCU) 220 of LED Controller No.1 located at the starting position, the voltage value collected by the voltage sampling terminal MCU_ADC of the microcontroller unit (i.e., MCU) 220 of other LED Controllers is 2.5V. Therefore, based on the ADC sampling, LED Controller No.1 with a sampling voltage of 5V can be numbered as 1.
[0031] After LED Controller No.1 is numbered, the first signal terminal MCU_UP of the microcontroller unit (i.e. MCU) 220 in LED Controller No.1 remains at a high level (which can be called a constant level signal), and its second signal terminal MCU_SW changes from a low level to a high level (which can be called the second logic level of the switching signal). The selection of resistors R10 and R13 needs to meet the requirement that when MCU_SW is at a high level, the voltage division of resistor R13 is greater than the turn-on voltage of MOSFET Q4, and the same applies to resistors R11 and R14. At this moment, MOSFET Q4 is turned on, and the base of transistor Q1 is at a low level, thus transistor Q1 is turned on. The voltage at the address output terminal Address_OUT of the addressing unit in LED Controller No.1 is the voltage at node A minus the voltage drop across the collector and emitter of transistor Q1. Since the voltage drop across the collector and emitter of transistor Q1 is very small, it can be ignored. Therefore, the address output terminal Address_OUT of the addressing unit in LED Controller No.1 is approximately 5V. As a result, the voltage at node B changes from 2.5V to 5V. That is, the voltage value sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit (i.e., MCU) 220 of LED Controller No.2 is 5V. Therefore, based on the ADC sampling, LED Controller No.2 with a sampled voltage of 5V can be numbered as 2.
[0032] After LED Controller No.2 is numbered, the first signal terminal MCU_UP of the microcontroller unit (i.e. MCU) 220 in LED Controller No.2 remains at a high level (which can be called a constant level signal), and its second signal terminal MCU_SW changes from a low level to a high level (which can be called the second logic level of the switching signal). Similarly, all LED Controllers can be numbered one by one to achieve the function of automatic addressing.
[0033] In summary, the multi-product automatic addressing circuit based on the CAN bus provided by this utility model has the following beneficial effects:
[0034] 1. The design scheme of this utility model can realize the automatic addressing function of CAN bus.
[0035] 2. The solution designed in this utility model can realize automatic addressing of multiple products, and the number of addresses is not limited by the hardware circuit.
[0036] It should be noted that any modifications made by those skilled in the art to the specific embodiments of this utility model do not depart from the scope of the claims of this utility model. Accordingly, the scope of the claims of this utility model is not limited to the foregoing specific embodiments.
Claims
1. A multi-product automatic addressing circuit based on CAN bus, characterized in that, It includes multiple controllers, each connected to a corresponding product to control that product. The controller includes a CAN transceiver, a microcontroller unit, and an addressing unit. The CAN transceiver is connected to the CAN bus and the microcontroller unit. The CAN transceiver is used to convert the differential signals of the CAN bus into digital signals and provide them to the microcontroller unit. The microcontroller unit is connected to the corresponding product and the addressing unit. In each controller, the addressing unit includes a first resistor, a second resistor, a first power switch, and a second power switch. One end of the first resistor is connected to the node, and the other end is connected to the first signal terminal MCU_UP of the microcontroller unit. The first connection terminal of the first power switch is connected to the node, and its second connection terminal is connected to the address output terminal Address_OUT of the addressing unit. Its control terminal is connected to the first connection terminal of the second power switch. The second connection terminal of the second power switch is grounded, and its control terminal is connected to the second signal terminal MCU_SW of the microcontroller unit. The voltage sampling terminal MCU_ADC of the microcontroller unit is connected to the node. The address input terminal Address_IN of the addressing unit is connected to the node. Except for the first controller, the address input terminal Address_IN of the addressing unit in each controller is connected to the address output terminal Address_OUT of the addressing unit in the previous controller.
2. The multi-product automatic addressing circuit based on CAN bus according to claim 1, characterized in that, The addressing unit further includes a third resistor, a fourth resistor, and a fifth resistor. The control terminal of the first power switch is connected to the first connection terminal of the second power switch via the third resistor. The control terminal of the second power switch is connected to the second signal terminal MCU_SW of the microcontroller unit via the fourth resistor. One end of the fifth resistor is connected to the control terminal of the second power switch, and the other end is connected to the second connection terminal of the second power switch.
3. The multi-product automatic addressing circuit based on CAN bus according to claim 1, characterized in that, The address input terminal Address_IN of the addressing unit in the first controller is left floating; The address output terminal Address_OUT of the addressing unit in the last controller is left floating.
4. The multi-product automatic addressing circuit based on CAN bus according to any one of claims 1-3, characterized in that, When the CAN bus sends an addressing command, in each controller, the microcontroller unit parses the addressing command and generates a control signal, causing its first signal terminal MCU_UP to output a constant level signal and its second signal terminal MCU_SW to output a first logic level of a switch signal, thereby turning off both the first and second power switches. At this time, if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit is greater than a predetermined voltage value, the controller containing the microcontroller unit is numbered; if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit is less than the predetermined voltage value, the controller containing the microcontroller unit is not numbered. Once a controller is numbered, in the numbered controller, the first signal terminal MCU_UP of the microcontroller unit still outputs the constant level signal, and its second signal terminal MCU_SW outputs the second logic level of the switch signal, thereby turning on both the first power switch and the second power switch. In the unnumbered controller, the first signal terminal MCU_UP of the microcontroller unit still outputs the constant level signal, and its second signal terminal MCU_SW still outputs the first logic level of the switch signal, so that both the first power switch and the second power switch are turned off. At this time, if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit is greater than a predetermined voltage value, the controller containing the microcontroller unit is numbered; if the voltage sampled by the voltage sampling terminal MCU_ADC of the microcontroller unit is less than the predetermined voltage value, the controller containing the microcontroller unit is not numbered.
5. The multi-product automatic addressing circuit based on CAN bus according to claim 2, characterized in that, The first power switch is a PNP transistor, and the first connection terminal, the second connection terminal, and the control terminal of the first power switch are the emitter, collector, and base of the PNP transistor, respectively. The second power switch is an NMOS transistor, and the first connection terminal, the second connection terminal, and the control terminal of the second power switch are the drain, source, and gate of the NMOS transistor, respectively.
6. The multi-product automatic addressing circuit based on CAN bus according to claim 2, characterized in that, The resistance values of the fourth and fifth resistors are selected to satisfy the following: When the switch signal output by the second signal terminal MCU_SW is high, the voltage division value on the fifth resistor is greater than the turn-on voltage threshold of the second power switch, so that the second power switch is in the on state.
7. The multi-product automatic addressing circuit based on CAN bus according to claim 1, characterized in that, The product in question is an LED; The controller is an LED controller.
8. The multi-product automatic addressing circuit based on CAN bus according to claim 7, characterized in that, The controller also includes anti-reverse and filtering circuits, DC-DC circuits, and a low-dropout regulator. The input terminal of the anti-reverse and filtering circuit is connected to the power interface Vbat, and its output terminal is connected to the input terminal of the DC-DC circuit. The output terminal of the DC-DC circuit is connected to the input terminal of the low dropout regulator. The output terminal of the low-dropout regulator is connected to the power supply terminal of the CAN transceiver and the microcontroller unit. The output terminal of the DC-DC circuit is connected to the power supply terminal of the corresponding LED. The R-Control, G-Control, and B-Control terminals of the microcontroller are all connected to the corresponding LEDs.