Switching circuit of CAN line terminal resistor and vehicle
By designing a switching circuit for CAN line termination resistors, and using the working status detection module of the battery management system and the equivalent resistance detection module to automatically switch the terminal resistors, the problem of errors in the configuration of CAN network termination resistors is solved, and the stability and development efficiency of the system are improved.
Patent Information
- Application Number
- CN202421349658.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2034-06-13
AI Technical Summary
In the prior art, the configuration of CAN network terminal resistors is prone to errors, resulting in signal interference and unstable system operation.
A switching circuit for CAN line termination resistors is designed, including a battery management system working state detection module, an equivalent resistance detection module and a terminal resistance control module. This circuit automatically switches the connection or disconnection of the terminal resistor by detecting the operating status of the battery management system and the equivalent resistance value of the CAN network.
By automatically matching the terminal resistor, the risk of errors caused by manual patch selection is avoided, and the stability and development efficiency of the system are improved.
Smart Images

Figure CN222580524U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of circuits, and in particular to a switching circuit of a CAN line terminal resistor and a vehicle. Background Art
[0002] At present, there are multiple controllers in the car that control different areas, such as the vehicle controller, high-voltage distribution box, battery management system, etc. These controllers need to communicate and coordinate with each other to ensure the normal operation of the vehicle. The mainstream communication protocol is through CAN communication. The international CAN communication standard stipulates that the CAN communication standard circuit of all controllers at both ends of the same CAN network needs to be connected with terminal resistors to achieve impedance matching, which can effectively reduce interference signals.
[0003] However, since the vehicle topologies of different customers are not exactly the same, the configuration of the terminal resistance is an uncertain factor for the battery management system, and it needs to be selected according to customer needs, which increases the risk of error. Utility Model Content
[0004] The utility model provides a switching circuit of a CAN line terminal resistor and a vehicle, which are used to solve the defect that the configuration of the CAN network terminal resistor is prone to error in the prior art.
[0005] In a first aspect, the utility model provides a switching circuit for a CAN line terminal resistor, comprising: a battery management system working state detection module, an equivalent resistance detection module and a terminal resistance control module;
[0006] The battery management system working state detection module is connected to the equivalent resistance detection module, and the equivalent resistance detection module is also connected to the terminal resistance control module;
[0007] The battery management system working state detection module is used to detect the working state of the battery management system;
[0008] The equivalent resistance detection module is used to detect the resistance value of the equivalent resistance at both ends of the CAN network when the working state is the dormant state;
[0009] The terminal resistance control module is used to switch the terminal resistance to connect or disconnect the connection with the CAN network according to the resistance value.
[0010] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the battery management system working state detection module includes: a car key signal detection unit, a charging gun detection unit and a logic operation unit;
[0011] The car key signal detection unit and the charging gun detection unit are respectively connected to the input end of the logic operation unit, and the output end of the logic operation unit is connected to the equivalent resistance detection module;
[0012] The car key signal detection unit and the charging gun detection unit are used to detect that the battery management system is in the awake state, and the logic operation unit outputs a low level;
[0013] The car key signal detection unit and the charging gun detection unit are used to detect that the battery management system is in a dormant state, and the logic operation unit outputs a high level.
[0014] According to a CAN line terminal resistor switching circuit provided by the utility model, the logic operation unit includes: a NOR gate, a filter resistor and a filter capacitor;
[0015] The input end of the NOR gate is connected to the car key signal detection unit and the charging gun detection unit respectively, and the output end of the NOR gate is connected to the equivalent resistance detection module through the filter circuit composed of the filter resistor and the filter capacitor.
[0016] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the battery management system working state detection module further includes: a first voltage-dividing resistor, a second voltage-dividing resistor, a third voltage-dividing resistor and a fourth voltage-dividing resistor;
[0017] The first voltage-dividing resistor, the second voltage-dividing resistor, the third voltage-dividing resistor and the fourth voltage-dividing resistor are used to prevent the logic operation unit from overvoltage.
[0018] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the equivalent resistance detection module includes: a fifth voltage-dividing resistor, a field effect transistor and a sixth voltage-dividing resistor;
[0019] The gate of the field effect tube is connected to the battery management system working state detection module through the fifth voltage-dividing resistor;
[0020] The drain of the field effect tube is respectively connected to the CAN network and the terminal resistance control module through a sixth voltage-dividing resistor;
[0021] The source of the field effect tube is grounded.
[0022] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the equivalent resistance detection module further includes: a constant current source unit;
[0023] The constant current source unit is connected to the CAN network;
[0024] The constant current source unit is used to input a constant current to the CAN network.
[0025] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the terminal resistor control module includes: a comparison unit, a switch unit and a terminal resistor;
[0026] The input end of the comparison unit is connected to the equivalent resistance detection module, the output end of the comparison unit is connected to the switch unit, and the switch unit is also connected to the CAN transceiver through the terminal resistor;
[0027] The comparison unit is used to output a comparison signal to control the on or off of the switch unit according to the resistance output by the equivalent resistance detection module;
[0028] The switch unit is used to control the terminal resistor to connect or disconnect with the CAN network.
[0029] According to a CAN line terminal resistor switching circuit provided by the utility model, the comparison unit is a comparator;
[0030] The input end of the comparator is connected to the equivalent resistance detection module, and the output end of the comparator is connected to the switch unit;
[0031] When the input terminal of the comparator is at a high voltage, the comparator outputs a high level, the switch unit is turned on, and the terminal resistor is connected to the CAN network;
[0032] When the input terminal of the comparator is at a low voltage, the comparator outputs a low level, the switch unit is disconnected, and the terminal resistor is disconnected from the CAN network.
[0033] According to a switching circuit of a CAN line terminal resistor provided by the utility model, the switch unit is an optical coupler relay;
[0034] The first pin of the optical coupler relay is connected to the output end of the comparator, and the fourth pin and the sixth pin of the optical coupler relay are connected to the CAN network through terminal resistors respectively;
[0035] The photocoupler relay is used to be turned on at a high level and turned off at a low level.
[0036] In a second aspect, the utility model further provides a vehicle, comprising a switching circuit of a CAN line terminal resistor as described in any one of the above items.
[0037] The utility model provides a switching circuit for a CAN line terminal resistor and a vehicle, comprising: a battery management system working state detection module, an equivalent resistance detection module and a terminal resistance control module; the battery management system working state detection module is connected to the equivalent resistance detection module, and the equivalent resistance detection module is also connected to the terminal resistance control module; the battery management system working state detection module is used to detect the working state of the battery management system; the equivalent resistance detection module is used to detect the resistance value of the equivalent resistance at both ends of the CAN network when the working state is a dormant state; the terminal resistance control module is used to switch the terminal resistance to be connected or disconnected from the CAN network according to the resistance value, and controls whether to connect the terminal resistance through the working state of the battery management system and the resistance value of the equivalent resistance, without selecting the terminal resistance, thereby effectively avoiding the problem of easy error in selecting the terminal resistance. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 It is a schematic diagram of a switching circuit of a CAN line terminal resistor provided in an embodiment of the utility model.
[0040] Reference numerals:
[0041] 1. Battery management system working status detection module; KL15, car key signal detection unit KL15; A+, charging gun detection unit; R1, first voltage-dividing resistor; R2, second voltage-dividing resistor; R3, third voltage-dividing resistor; R4, fourth voltage-dividing resistor; N, NOR gate; RL, filter resistor; CL, filter capacitor; 2. Equivalent resistance detection module; I, constant current source; R5, fifth voltage-dividing resistor; R6, sixth voltage-dividing resistor; Q, field effect tube; 3. Terminal resistance control module; U, threshold voltage; A, comparator; U1, optocoupler relay; R, terminal resistance. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the utility model clearer, the technical solution of the utility model will be described clearly and completely in conjunction with the drawings in the utility model. Obviously, the described embodiments are part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.
[0043] Figure 1 It is a schematic diagram of a switching circuit of a CAN line terminal resistor provided in an embodiment of the utility model.
[0044] like Figure 1 As shown, the switching circuit of the CAN line terminal resistance R provided by the embodiment of the utility model includes: a battery management system working state detection module 1, an equivalent resistance detection module 2 and a terminal resistance control module 3; the battery management system working state detection module 1 is connected to the equivalent resistance detection module 2, and the equivalent resistance detection module 2 is also connected to the terminal resistance control module 3; the battery management system working state detection module 1 is used to detect the working state of the battery management system; the equivalent resistance detection module 2 is used to detect the resistance value of the equivalent resistance at both ends of the CAN network when the working state is the dormant state; the terminal resistance control module 3 is used to switch the terminal resistance R to connect or disconnect the connection with the CAN network according to the resistance value.
[0045] In a specific implementation process, the function of automatically matching the terminal resistance R is realized through the logic circuit, and there is no need to change the bill of materials file according to different projects, thereby improving the development efficiency. When the controller is working, the impedance in the CAN network must be guaranteed to be about 60Ω after the 120Ω at both ends are connected in parallel. Therefore, this circuit must be connected to the battery management system (BMS) at 12V, but the BMS is detected when it is in a dormant state to prevent interference with the normal operation of the CAN network. If the battery management system is processing the working state, the terminal resistance R cannot be controlled. Therefore, only when the BMS is detected to be processing the dormant state, the equivalent resistance value at both ends of the CAN network is detected by the equivalent resistance detection module 2. When the equivalent resistance value is detected to be 60Ω, it indicates that the terminal resistance R does not need to be connected. When the equivalent resistance value is detected to be 120Ω, it indicates that the terminal resistance R needs to be connected. Therefore, the connection of the terminal resistance R is controlled according to the size of the equivalent resistance value detected by the equivalent detection module. Therefore, only when the BMS is in sleep mode and the equivalent resistance at both ends of the CAN network is 120Ω, the access of the terminal resistor R will be controlled, which effectively ensures the safe access of the terminal resistor R and the safe operation of the BMS.
[0046] The terminal resistor R is connected to both ends of the CAN network. Therefore, in the process of switching and selecting the terminal resistor R, it is only necessary to control the connection or disconnection of the terminal resistor R through the terminal resistor control module 3, so that the problem of wrong selection of the terminal resistor R when the terminal resistor R is needed will not occur, which effectively improves the overall development efficiency.
[0047] Further, based on the above embodiment, Figure 1As shown, the battery management system working state detection module 1 in this embodiment includes: a car key signal detection unit KL15, a charging gun detection unit A+ and a logic operation unit; the car key signal detection unit KL15 and the charging gun detection unit A+ are respectively connected to the input end of the logic operation unit, and the output end of the logic operation unit is connected to the equivalent resistance detection module 2; the car key signal detection unit KL15 and the charging gun detection unit A+ are used to output a low level when the battery management system is detected to be in the awake state; the car key signal detection unit KL15 and the charging gun detection unit A+ are used to output a high level when the battery management system is detected to be in the dormant state. The logic operation unit includes: a NOR gate N, a filter resistor RL and a filter capacitor CL; the input end of the NOR gate N is respectively connected to the car key signal detection unit KL15 and the charging gun detection unit A+, and the output end of the NOR gate N is connected to the equivalent resistance detection module 2 through a filter circuit composed of a filter resistor RL and a filter capacitor CL.
[0048] Specifically, the main function of the battery management system working state detection module 1 is to detect whether the BMS is in a dormant state or an awake state. Therefore, the car key signal and the charging gun signal are selected to determine whether the BMS is in a dormant state. When the car key signal and the charging gun signal are detected, it indicates that the BMS is in an awake state at this time. Therefore, the final battery management system working state detection module 1 outputs a low level, and the subsequent equivalent resistance detection module 2 cannot work. Only when the BMS is detected to be in a dormant state through the car key signal and the charging gun signal, a high level is output to control the equivalent resistance detection module 2 to work.
[0049] The relationship between the output truth table of the logic NOR gate N and the car key signal and the charging gun signal is shown in Table 1:
[0050] KL15 A+ N1 OUT 0 0 1 0 1 0 1 0 0 1 1 0
[0051] Table 1
[0052] It can be seen from Table 1 that only when the car key signal and the charging gun signal are both at low levels, the NOR gate N will output a high level, so it can be determined that the BMS is in a dormant state at this time. The BMS working state can be accurately detected through the car key signal and the charging gun signal, and the final control of the terminal resistance R can be accurately guaranteed.
[0053] The first voltage-dividing resistor R1, the second voltage-dividing resistor R2, the third voltage-dividing resistor R3 and the fourth voltage-dividing resistor R4 can prevent the logic operation unit from overvoltage and protect the NOR gate N from damage. In addition, the filter circuit composed of the filter capacitor CL and the filter resistor RL can also ensure the stability of the output. MCU_Status_MSR is the microcontroller feedback signal, which can feed back the output level of the NOR gate N to the microcontroller for the next step.
[0054] Further, based on the above embodiment, Figure 1 As shown, the equivalent resistance detection module 2 in this embodiment includes: a fifth voltage-dividing resistor R5, a field effect transistor Q and a sixth voltage-dividing resistor R6; the gate of the field effect transistor Q is connected to the battery management system working status detection module 1 through the fifth voltage-dividing resistor R5; the drain of the field effect transistor Q is respectively connected to the CAN network and the terminal resistance control module 3 through the sixth voltage-dividing resistor R6; the source of the field effect transistor Q is grounded.
[0055] Specifically, the equivalent resistance detection module 2 also includes a constant current source I unit, which is connected to the CAN network; the constant current source I unit is used to input a constant current to the CAN network. A constant current source I is used to inject a constant current into the CAN network. When the BMS needs to be used as a terminal, the equivalent resistance should be 120Ω, and the MCU_Status_MSR signal outputs a high level. At this time, as a turn-on signal of the field effect tube Q, the entire equivalent resistance detection module 2 starts to work, and the fifth resistor and the sixth resistor are used as voltage divider resistors. MCU_CANRES_MSR returns different voltage values to detect the size of the equivalent resistance in the CAN network. According to the resistance value of the equivalent resistance, determine whether to output a high level or a low level. When the resistance value of the equivalent resistance is detected to be 120Ω, it indicates that the terminal resistance R needs to be connected at this time. When the resistance value of the equivalent resistance is detected to be 60Ω, it indicates that the terminal resistance R does not need to be connected at this time.
[0056] Furthermore, the control method of connecting the terminal resistor R is as follows: Figure 1As shown, the terminal resistance control module 3 includes: a comparison unit, a switch unit and a terminal resistance R; the input end of the comparison unit is connected to the equivalent resistance detection module 2, the output end of the comparison unit is connected to the switch unit, and the switch unit is also connected to the CAN transceiver through the terminal resistance R; the comparison unit is used to output a comparison signal to control the switch unit to be turned on or off according to the resistance output by the equivalent resistance detection module 2; the switch unit is used to control the terminal resistance R to be connected or disconnected from the CAN network. The comparison unit is a comparator A; the input end of the comparator A is connected to the equivalent resistance detection module 2, and the output end of the comparator A is connected to the switch unit; when the input end of the comparator A is a high voltage, the comparator A outputs a high level, the switch unit is turned on, and the terminal resistance R is connected to the CAN network; when the input end of the comparator A is a low voltage, the comparator A outputs a low level, the switch unit is turned off, and the terminal resistance R is disconnected from the CAN network. The switch unit is an optocoupler relay U1; the first pin of the optocoupler relay U1 is connected to the output end of the comparator A, and the fourth pin and the sixth pin of the optocoupler relay U1 are respectively connected to the CAN network through the terminal resistor R; the optocoupler relay U1 is used to be turned on at a high level and turned off at a low level.
[0057] Specifically, when the equivalent resistance detection module 2 outputs a high level, it indicates that the terminal resistance R needs to be connected to the CAN network. After the high level at this time is compared with the threshold voltage U of the comparator A, a high level is output, and then the high level controls the conduction of the optocoupler relay U1, and the two 60.4Ω terminal resistances R in the loop are connected to the CAN network. If the equivalent resistance detection module 2 outputs a low level, it indicates that the terminal resistance R does not need to be connected at this time. The low level at this time is compared with the threshold voltage U of the comparator A, and a low level is output, and the closure of the optocoupler relay U1 cannot be started. Therefore, the terminal resistance R is no longer connected to the CAN network. Through the cooperation of the comparator A and the optocoupler relay U1, the connection or disconnection of the terminal resistance R can be completed accurately, and the CAN network access control of the terminal resistance R is effectively guaranteed.
[0058] By automatically detecting the circuit, automatically determining whether the terminal resistor R needs to be connected, and automatically connecting or disconnecting the terminal resistor R, it is more conducive to platform implementation, and when it needs to be connected, there is no need to select the terminal resistor R, and it can also ensure that the terminal resistor R is not selected incorrectly, and it can also reduce the workload and improve the terminal resistor R access efficiency.
[0059] Based on the same general concept, the utility model also protects a vehicle, including a switching circuit of a CAN line terminal resistor as in any of the above embodiments.
[0060] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0061] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the utility model, rather than to limit it. Although the utility model has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the utility model.
Claims
1. A switching circuit for a CAN line terminal resistor, characterized in that: include: Battery management system working status detection module, equivalent resistance detection module and terminal resistance control module; The battery management system working state detection module is connected to the equivalent resistance detection module, and the equivalent resistance detection module is also connected to the terminal resistance control module; The battery management system working state detection module is used to detect the working state of the battery management system; The equivalent resistance detection module is used to detect the resistance value of the equivalent resistance at both ends of the CAN network when the working state is the dormant state; The terminal resistance control module is used to switch the terminal resistance to connect or disconnect the connection with the CAN network according to the resistance value.
2. The switching circuit of the CAN line terminal resistor according to claim 1, characterized in that: The battery management system working state detection module includes: a car key signal detection unit, a charging gun detection unit and a logic operation unit; The car key signal detection unit and the charging gun detection unit are respectively connected to the input end of the logic operation unit, and the output end of the logic operation unit is connected to the equivalent resistance detection module; The car key signal detection unit and the charging gun detection unit are used to detect that the battery management system is in the awake state, and the logic operation unit outputs a low level; The car key signal detection unit and the charging gun detection unit are used to detect that the battery management system is in a dormant state, and the logic operation unit outputs a high level.
3. The switching circuit of the CAN line terminal resistor according to claim 2, characterized in that: The logic operation unit includes: a NOR gate, a filter resistor and a filter capacitor; The input end of the NOR gate is connected to the car key signal detection unit and the charging gun detection unit respectively, and the output end of the NOR gate is connected to the equivalent resistance detection module through the filter circuit composed of the filter resistor and the filter capacitor.
4. The switching circuit of the CAN line terminal resistor according to claim 2, characterized in that: The battery management system working state detection module further includes: a first voltage-dividing resistor, a second voltage-dividing resistor, a third voltage-dividing resistor and a fourth voltage-dividing resistor; The first voltage-dividing resistor, the second voltage-dividing resistor, the third voltage-dividing resistor and the fourth voltage-dividing resistor are used to prevent the logic operation unit from overvoltage.
5. The switching circuit of the CAN line terminal resistor according to claim 1, characterized in that: The equivalent resistance detection module includes: a fifth voltage-dividing resistor, a field effect transistor and a sixth voltage-dividing resistor; The gate of the field effect tube is connected to the battery management system working state detection module through the fifth voltage-dividing resistor; The drain of the field effect tube is respectively connected to the CAN network and the terminal resistance control module through a sixth voltage-dividing resistor; The source of the field effect tube is grounded.
6. The switching circuit of the CAN line terminal resistor according to claim 5, characterized in that: The equivalent resistance detection module further includes: a constant current source unit; The constant current source unit is connected to the CAN network; The constant current source unit is used to input a constant current to the CAN network.
7. The switching circuit of the CAN line terminal resistor according to claim 1, characterized in that: The terminal resistance control module includes: a comparison unit, a switch unit and a terminal resistance; The input end of the comparison unit is connected to the equivalent resistance detection module, the output end of the comparison unit is connected to the switch unit, and the switch unit is also connected to the CAN transceiver through the terminal resistor; The comparison unit is used to output a comparison signal to control the on or off of the switch unit according to the resistance output by the equivalent resistance detection module; The switch unit is used to control the terminal resistor to connect or disconnect with the CAN network.
8. The switching circuit of the CAN line terminal resistor according to claim 7, characterized in that: The comparison unit is a comparator; The input end of the comparator is connected to the equivalent resistance detection module, and the output end of the comparator is connected to the switch unit; When the input terminal of the comparator is at a high voltage, the comparator outputs a high level, the switch unit is turned on, and the terminal resistor is connected to the CAN network; When the input terminal of the comparator is at a low voltage, the comparator outputs a low level, the switch unit is disconnected, and the terminal resistor is disconnected from the CAN network.
9. The switching circuit of the CAN line terminal resistor according to claim 8, characterized in that: The switch unit is a photocoupler relay; The first pin of the optical coupler relay is connected to the output end of the comparator, and the fourth pin and the sixth pin of the optical coupler relay are connected to the CAN network through terminal resistors respectively; The photocoupler relay is used to be turned on at a high level and turned off at a low level.
10. A vehicle, characterized in that: A switching circuit comprising a CAN line terminal resistor as described in any one of claims 1 to 9.