Bus resistance adaptive circuit and electronic equipment
By dynamically configuring the resistance value through the bus resistor adaptive circuit, the problems of high process complexity and inventory accumulation of terminal resistors in CAN bus equipment are solved, achieving efficient production and simplified processes.
Patent Information
- Application Number
- CN202422782942.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2034-11-14
AI Technical Summary
The existing technology for adding terminal resistors to CAN bus devices is highly complex and inefficient, and the differences in terminal resistor configurations lead to product inventory accumulation.
The bus resistance adaptive circuit is adopted, the switch module and the preset resistor are controlled by the main control unit, and the resistance value is dynamically configured according to the voltage status of the bus device to achieve adaptive terminal resistance configuration.
It reduces the process difficulty, improves production efficiency, avoids product inventory differences, and simplifies the production process.
Smart Images

Figure CN223348741U_ABST
Abstract
Description
Technical Field
[0001] The embodiment of the utility model relates to the technical field of bus resistance self-adaptation, and in particular to a bus resistance self-adaptation circuit and electronic equipment. Background Art
[0002] Currently, CAN (Controller Area Network) devices are widely used in the new energy industry, resulting in many CAN devices integrated on the bus. To improve the CAN bus's anti-interference capabilities, ensure the bus quickly enters the recessive state, and improve signal quality, the bus impedance is generally maintained at 60Ω. Therefore, it is generally required to configure a 120Ω resistor between the two most distant devices to maintain the bus impedance at 60Ω.
[0003] The current approach is to confirm the number of CAN devices in the early stages of design and then add terminal resistors to the wiring harness to ensure the bus impedance remains at 60Ω. This approach has three drawbacks: First, the terminal resistors must be soldered onto the wiring harness, which can easily lead to poor welding. Second, the wiring harness processing is complex, requiring additional welding equipment and equipment for welding quality inspection, which increases production steps and reduces efficiency. Third, products with or without 120Ω terminal resistors must be prepared based on demand. This requires stocking based on whether or not terminal resistors are required, resulting in product differences and a buildup of inventory. Utility Model Content
[0004] The purpose of the embodiments of the present utility model is to at least provide a bus resistance adaptive circuit and electronic equipment, which can at least solve the problems of high process complexity, low efficiency and high cost of adding terminal resistors to bus wiring harnesses, at least achieve the ability to configure the resistance value according to different terminal requirements, effectively reduce the process difficulty and improve production efficiency, and at least solve the problem of product inventory accumulation caused by differences in terminal resistor configuration.
[0005] To solve the above technical problems, at least one embodiment of the present application provides a bus resistance adaptive circuit, including a main control unit, a first switch module, a second switch module, a first preset resistor, and a second preset resistor;
[0006] The first signal output terminal of the main control unit is connected to the control terminal of the first switch module, the first terminal of the first switch module is used to connect to the low-level interface or the high-level interface of the bus chip, the second terminal of the first switch module is connected to the first terminal of the first preset resistor, and the second terminal of the first preset resistor is used to connect to a power supply or a ground;
[0007] The signal acquisition end of the main control unit is connected to the first end of the first preset resistor;
[0008] The second signal output end of the main control unit is connected to the control end of the second switch module, the first end and the second end of the second switch module are respectively connected to the low-level interface and the high-level interface of the bus chip, and the first end and / or the second end of the second switch module are connected in series with the second preset resistor.
[0009] In one embodiment, a third switch module is further included, wherein the third signal output end of the main control unit is connected to the control end of the third switch module, the first end of the third switch module is used to connect to the power supply module, and the second end of the third switch module is connected to the high-level interface of the bus chip.
[0010] In one embodiment, the main control unit includes a control module and an analog sampling module;
[0011] The first signal output end of the control module is connected to the control end of the first switch module, and the second signal output end of the control module is connected to the control end of the second switch module;
[0012] The signal acquisition end of the analog sampling module is connected to the first end of the first preset resistor.
[0013] In one embodiment, a voltage sampling module is further included, wherein the signal acquisition end of the analog sampling module is connected to the first end of the voltage sampling module, and the second end of the voltage sampling module is connected to the first end of the first preset resistor.
[0014] In one embodiment, a first capacitor is further included, wherein a first end of the first capacitor is connected to a second end of the voltage sampling module, and a second end of the first capacitor is connected to a second end of the first preset resistor.
[0015] In one embodiment, the resistance value of the first preset resistor is equal to the resistance value of the second preset resistor.
[0016] In one embodiment, the resistance of the second preset resistor is 120 ohms.
[0017] In one embodiment,
[0018] The first switch module includes a first optical coupler;
[0019] and / or
[0020] The second switch module includes a second optical coupler.
[0021] In one embodiment, a fourth switch module is further included, wherein the fourth signal output end of the main control unit is connected to the control end of the fourth switch module, the first end of the fourth switch module is used to connect to the power module, and the second end of the fourth switch module is connected to the power input end of the bus chip.
[0022] At least one embodiment of the present application further provides an electronic device, comprising the bus resistance adaptive circuit described in any of the above embodiments.
[0023] In the above-mentioned bus resistance adaptive circuit, the main control unit samples the voltage at both ends of the first preset resistor. When the voltage of the first preset resistor is half of the voltage of the power module, the second switch module is controlled to be turned on so that the second preset resistor is connected to the bus. If the voltage of the first preset resistor is two-thirds of the voltage of the power module at this time, the bus device terminal is successfully adapted to the resistor; when the voltage of the first preset resistor is zero, the second switch module is controlled to be turned on so that the second preset resistor is connected to the bus. If the voltage of the first preset resistor is half of the voltage of the power module at this time, the bus device terminal is successfully adapted to the resistor; when the voltage of the first preset resistor is two-thirds of the voltage of the power module, it indicates that the bus device terminal has been configured with a resistor and does not need to be adapted for it, and there is no need to control the second switch module to be turned on. In this way, the bus device terminal is adaptively configured with resistors, and the resistance value of the resistor can be configured according to different terminal requirements. There is no need to additionally weld resistors, nor is there a need to configure resistors of different resistance values for different products, effectively reducing process difficulty and improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0025] Figure 1 This is a circuit logic block diagram of a bus resistance adaptive circuit provided in one embodiment;
[0026] Figure 2 is a circuit schematic diagram of part of a bus resistance adaptive circuit provided by one embodiment;
[0027] Figure 3 This is a control logic flow chart of a bus resistance adaptive circuit provided by one embodiment. DETAILED DESCRIPTION
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more apparent, the following detailed description of the various embodiments of the present invention is provided in conjunction with the accompanying drawings. However, those skilled in the art will appreciate that many technical details are provided in the various embodiments of the present invention to facilitate a better understanding of the present invention. However, even without these technical details and the various variations and modifications based on the following embodiments, the technical solutions claimed in the present invention can be achieved.
[0029] Example 1
[0030] In this embodiment, Figure 1 and Figure 2 As shown, a bus resistance adaptive circuit is provided, including a main control unit, a first switch module, a second switch module, a first preset resistor R1 and a second preset resistor R2;
[0031] The first signal output end of the main control unit is connected to the control end of the first switch module, the first end of the first switch module is used to connect to the low-level interface CANL or the high-level interface CANH of the bus chip, the second end of the first switch module is connected to the first end of the first preset resistor R1, and the second end of the first preset resistor R1 is used to connect to the power supply or ground;
[0032] The signal acquisition end of the main control unit is connected to the first end of the first preset resistor R1;
[0033] The second signal output end of the main control unit is connected to the control end of the second switch module, the first end and the second end of the second switch module are respectively connected to the low-level interface CANL and the high-level interface CANH of the bus chip, and the first end and / or the second end of the second switch module are connected in series with the second preset resistor R2, wherein the resistance value of the first preset resistor R1 is equal to the resistance value of the second preset resistor R2.
[0034] In this embodiment, the main control unit is configured to collect the voltage across the first switch module via the signal acquisition terminal, thereby determining whether a 120Ω resistor is configured in the bus. Based on the determination result, the main control unit controls whether the second switch module is conductive or non-conductive, thereby connecting or disconnecting the second preset resistor R2 from the bus. In this embodiment, the bus is a CAN bus, and the bus chip is a CAN chip.
[0035] Specifically, the first switch module can be connected to the low-level interface CANL of the bus chip, or to the high-level interface CANH, and can be configured according to specific needs. For example, the first switch module can be configured such that: the first end of the first switch module is used to connect to the low-level interface CANL of the bus chip, the second end of the first switch module is connected to the first end of the first preset resistor R1, and the second end of the first preset resistor R1 is used to be grounded. In this way, the voltage at the first end of the first preset resistor R1 collected by the signal acquisition end is the voltage difference between the first preset resistor R1 and the ground, that is, the voltage across the first preset resistor R1.
[0036] For example, the first switch module can be set as follows: the first end of the first switch module is used to connect to the high-level interface CANH of the bus chip, the second end of the first switch module is connected to the first end of the first preset resistor R1, and the second end of the first preset resistor R1 is used to connect to the power supply module. In this way, the voltage of the first end of the first preset resistor R1 collected by the signal acquisition end is the voltage difference between the power supply module and the first preset resistor R1, that is, the voltage across the first preset resistor R1.
[0037] The circuit where the second switch module and the second preset resistor R2 are located is connected in parallel with the low-level interface CANL and the high-level interface CANH of the bus chip. Specifically, the second preset resistor R2 can be a single resistor or multiple resistors, and its total resistance is equal to the first preset resistor R1. For example, the second preset resistor R2 can be set as: the first end of the second switch module is connected to the low-level interface CANL of the bus chip through the second preset resistor R2. For example, the second preset resistor R2 can be set as: the second end of the second switch module is connected to the high-level interface CANH of the bus chip through the second preset resistor R2. For another example, the second preset resistor R2 can be set as: the second preset resistor R2 includes a first sub-resistor and a second sub-resistor, the first end of the second switch module is connected to the low-level interface CANL of the bus chip through the first sub-resistor, and the second end of the second switch module is connected to the high-level interface CANH of the bus chip through the second sub-resistor, and the sum of the resistance values of the first sub-resistor and the second sub-resistor is equal to the resistance value of the first preset resistor R1. In this way, the second preset resistor R2 is connected in series with the first and second ends of the second switch module. When the first and second ends of the second switch module are connected, the second preset resistor R2 is connected in parallel with the low-level interface CANL and the high-level interface CANH of the bus chip.
[0038] In this embodiment, the main control unit outputs a switch control signal 1 to the control end of the first switch module through the first signal output end to control the conduction between the first end and the second end of the first switch module, and the main control unit outputs a switch control signal 2 to the control end of the second switch module through the second signal output end to control the conduction between the first end and the second end of the second switch module.
[0039] In one embodiment, the first end of the first switch module is used to connect to the low-level interface CANL of the bus chip, the second end of the first switch module is connected to the first end of the first preset resistor R1, and the second end of the first preset resistor R1 is used to be grounded.
[0040] In this embodiment, by sampling the voltage at the first end of the first preset resistor R1 , the voltage across the first preset resistor R1 can be measured, thereby determining whether a 120Ω resistor has been configured in the bus.
[0041] In one embodiment, the bus resistance adaptive circuit also includes a third switch module, the third signal output end of the main control unit is connected to the control end of the third switch module, the first end of the third switch module is used to connect to the power supply module, and the second end of the third switch module is connected to the high-level interface CANH of the bus chip.
[0042] In this embodiment, the main control unit outputs a switch control signal 3 to the control end of the third switch module through the third signal output end to control the conduction between the first end and the second end of the third switch module, thereby controlling the power supply module to access the bus and controlling the power supply module to supply power to the bus.
[0043] In this embodiment, the resistance of the first preset resistor R1 and the resistance of the second preset resistor R2 are both 120Ω. Figure 3 When the voltage of the first preset resistor R1 is half of the voltage of the power module, the second switch module is controlled to be turned on so that the second preset resistor R2 is connected to the bus. If the voltage of the first preset resistor R1 is two-thirds of the voltage of the power module at this time, the resistance is successfully adapted for the bus device terminal; when the voltage of the first preset resistor R1 is zero, the second switch module is controlled to be turned on so that the second preset resistor R2 is connected to the bus. If the voltage of the first preset resistor R1 is half of the voltage of the power module at this time, the resistance is successfully adapted for the bus device terminal; when the voltage of the first preset resistor R1 is two-thirds of the voltage of the power module, it indicates that the bus device terminal has been configured with a resistor and there is no need to adapt the resistor for it, so there is no need to control the second switch module to be turned on.
[0044] It should be understood that the first switch module, the second switch module and the third switch module are electronic switch tubes that are turned on or off using control signals. For example, the first switch module, the second switch module and the third switch module can be transistors. In some embodiments, the first switch module, the second switch module and the third switch module are on-board relays or optical MOS. The selection of the switch module can be set according to the specific circumstances of the circuit. It is a technology that can be known to those skilled in the art and is not described in detail in this embodiment.
[0045] In order to better control the first switch module and achieve isolation between the control signal and the circuit in which the switch module is located, in one embodiment, the first switch module includes a first optocoupler. In this embodiment, the first signal output end of the main control unit is connected to the positive electrode of the light-emitting diode of the first optocoupler, the negative electrode of the light-emitting diode of the first optocoupler is used for grounding, the first end of the light receiver of the first optocoupler is used to connect to the low-level interface CANL or the high-level interface CANH of the bus chip, and the second end of the light receiver of the first optocoupler is connected to the first end of the first preset resistor R1. By setting the first switch module as an optocoupler, optical isolation of the control signal and the circuit can be achieved, thereby improving safety and control accuracy.
[0046] In one embodiment, the second switch module includes a second optocoupler. In one embodiment, the third switch module includes a third optocoupler. In the above embodiment, the second and third switch modules are implemented using optocouplers, which can achieve optical isolation between the control signal and the circuit, thereby improving safety and control accuracy. In addition, in the following embodiments, the fourth switch module can also be implemented using a transistor or MOS tube, or an optocoupler, which will not be described in detail.
[0047] In order to control the switch module and sample the voltage, in one embodiment, the main control unit includes a control module and an analog sampling module; the first signal output end of the control module is connected to the control end of the first switch module, and the second signal output end of the control module is connected to the control end of the second switch module; the signal acquisition end of the analog sampling module is connected to the first end of the first preset resistor R1.
[0048] In this embodiment, the main control unit includes a single-chip microcomputer, which includes a control module and an analog sampling module. The control module is used to control the conduction of the first and second switch modules. In some other embodiments, the control module is also connected to the control terminals of the third and fourth switch modules to control the conduction of the third and fourth switch modules. The analog sampling module is used to collect analog voltage signals. Specifically, the signal collection terminal of the analog sampling module is connected to the first end of the first preset resistor R1, and the analog sampling module is used to collect the voltage signal across the first preset resistor R1.
[0049] In order to collect the voltage across the first preset resistor R1, in one embodiment, the bus resistance adaptive circuit further includes a voltage sampling module, the signal collection end of the analog sampling module is connected to the first end of the voltage sampling module, and the second end of the voltage sampling module is connected to the first end of the first preset resistor R1.
[0050] In one embodiment, Figure 2 As shown, the bus resistance adaptive circuit further includes a first capacitor, a first end of the first capacitor is connected to the second end of the voltage sampling module, and a second end of the first capacitor is connected to the second end of the first preset resistor R1.
[0051] In one embodiment, the bus resistance adaptive circuit also includes a fourth switch module, the fourth signal output end of the main control unit is connected to the control end of the fourth switch module, the first end of the fourth switch module is used to connect to the power module, and the second end of the fourth switch module is connected to the power input end of the bus chip.
[0052] In this embodiment, the main control unit outputs a switch control signal 4 to the control end of the fourth switch module through the fourth signal output end to control the conduction between the first end and the second end of the fourth switch module. When the first end and the second end of the fourth switch module are conductive, the power supply module outputs power to the power input end of the bus chip, and the bus chip is powered on.
[0053] Example 2
[0054] In this embodiment, an electronic device is provided, including the bus resistance adaptive circuit described in any one of the above embodiments.
[0055] Example 3
[0056] In this embodiment, a control method for a bus resistance adaptive circuit is provided. Please refer to Figure 3 :
[0057] In the initial state, the switch control signals 1-4 of the control module of the main control unit are all 0V by default. 0V cannot turn on the optocoupler. Therefore, the first switch module, the second switch module, the third switch module, and the fourth switch module are cut off, and the voltage difference across the first preset resistor is zero. Therefore, the sampling module samples 0V.
[0058] The control module of the main control unit outputs switch control signal 1 and switch control signal 3; the first switch module and the third switch module are closed and turned on, the sampling module collects the voltage, and the main control unit performs the following control process after determining the voltage:
[0059] 1. When the voltage of the first preset resistor R1 is half of the voltage VCC of the power module, that is, VCC / 2, the second switch module is controlled to be turned on, so that the second preset resistor R2 is connected to the bus. The voltage of the first preset resistor R1 is further collected and determined to be two-thirds of the voltage VCC of the power module. When the voltage of the first preset resistor R1 is VCC*2 / 3, it indicates that the bus device terminal adaptation resistor is successful. The CAN device terminal resistor 120Ω is successfully adapted. The current bus impedance is 60Ω, and the reported bus impedance is 60Ω. When the voltage of the first preset resistor R1 is not VCC*2 / 3, it indicates that a fault exists. Therefore, a fault is reported and manual intervention is requested to troubleshoot the problem.
[0060] 2. When the voltage of the first preset resistor R1 is zero, the second switch module is controlled to be turned on, so that the second preset resistor R2 is connected to the bus. The voltage of the first preset resistor R1 is further collected and determined to be half of the voltage VCC of the power module. When the voltage of the first preset resistor R1 is VCC / 2, it indicates that the CAN device terminal resistance of 120Ω is successfully adapted. The current bus impedance is 120Ω, and the reported bus impedance is 120Ω. A 120Ω resistor needs to be configured on another device to achieve the bus impedance requirement of 60Ω. When the voltage of the first preset resistor R1 is not VCC / 2, it indicates that a fault exists. Therefore, a fault report is issued and manual intervention is requested to troubleshoot the problem.
[0061] 3. When the voltage of the first preset resistor R1 is two-thirds of the voltage VCC of the power module, that is, the voltage of the first preset resistor R1 is VCC*2 / 3, it indicates that the bus device terminal has been configured with a resistor and there is no need to adapt the resistor for it, so there is no need to control the second switch module to be turned on.
[0062] 4. When the voltage collected across the first preset resistor R1 is not one of the above three conditions, it indicates that a fault exists. Therefore, a fault is reported and manual intervention is requested to troubleshoot the problem.
[0063] It should be understood that the expressions "mechanism", "device", "component" and the like used in this application are merely a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other expressions can achieve the same purpose, they may be replaced by other expressions.
[0064] Those skilled in the art will understand that the above-mentioned embodiments are specific examples for realizing the present invention, and in actual applications, the technical features of the above-mentioned embodiments can be arbitrarily combined. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification, and various changes can be made to them in form and details without departing from the spirit and scope of the present invention.
Claims
1. A bus resistance adaptive circuit, characterized in that: include: A main control unit, a first switch module, a second switch module, a first preset resistor and a second preset resistor; The first signal output terminal of the main control unit is connected to the control terminal of the first switch module, the first terminal of the first switch module is used to connect to the low-level interface or the high-level interface of the bus chip, the second terminal of the first switch module is connected to the first terminal of the first preset resistor, and the second terminal of the first preset resistor is used to connect to a power supply or a ground; The signal acquisition end of the main control unit is connected to the first end of the first preset resistor; The second signal output end of the main control unit is connected to the control end of the second switch module, the first end and the second end of the second switch module are respectively connected to the low-level interface and the high-level interface of the bus chip, and the first end and / or the second end of the second switch module are connected in series with the second preset resistor.
2. The bus resistance adaptive circuit according to claim 1, wherein: It also includes a third switch module, the third signal output end of the main control unit is connected to the control end of the third switch module, the first end of the third switch module is used to connect to the power supply module, and the second end of the third switch module is connected to the high-level interface of the bus chip.
3. The bus resistance adaptive circuit according to claim 1, wherein: The main control unit includes a control module and an analog sampling module; The first signal output end of the control module is connected to the control end of the first switch module, and the second signal output end of the control module is connected to the control end of the second switch module; The signal acquisition end of the analog sampling module is connected to the first end of the first preset resistor.
4. The bus resistance adaptive circuit according to claim 3, wherein: It also includes a voltage sampling module, the signal acquisition end of the analog sampling module is connected to the first end of the voltage sampling module, and the second end of the voltage sampling module is connected to the first end of the first preset resistor.
5. The bus resistance adaptive circuit according to claim 4, characterized in that: It also includes a first capacitor, a first end of the first capacitor is connected to the second end of the voltage sampling module, and a second end of the first capacitor is connected to the second end of the first preset resistor.
6. The bus resistance adaptive circuit according to claim 1, wherein: The resistance value of the first preset resistor is equal to the resistance value of the second preset resistor.
7. The bus resistance adaptive circuit according to claim 1, wherein: The resistance of the second preset resistor is 120 ohms.
8. The bus resistance adaptive circuit according to claim 1, wherein: The first switch module includes a first optical coupler; and / or The second switch module includes a second optical coupler.
9. The bus resistance adaptive circuit according to any one of claims 1 to 8, characterized in that: It also includes a fourth switch module, the fourth signal output end of the main control unit is connected to the control end of the fourth switch module, the first end of the fourth switch module is used to connect to the power module, and the second end of the fourth switch module is connected to the power input end of the bus chip.
10. An electronic device, characterized in that: The method comprises the bus resistance adaptive circuit described in any one of claims 1 to 9.