Current sampling circuit, device and equipment
Through the current sampling circuit composed of the sampling module, amplification module and control module of the current sampling circuit, high-precision current measurement within a wide range under high voltage is achieved, and the problem of large current acquisition accuracy error in the prior art is solved, which reduces costs.
Patent Information
- Application Number
- CN202510622577.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-01
AI Technical Summary
The prior art cannot achieve adaptability in a wide current range and has large acquisition accuracy errors, which cannot meet the needs of high-precision acquisition.
The current sampling circuit consisting of a sampling module, amplification module and a control module is used to amplify the voltage through series connection and a differential amplifier, and combine the MCU chip to calculate the current value and adaptive shifting, so as to achieve high-precision current measurement using low-cost devices.
A wide range of high-precision current sampling is achieved at high voltages, with the accuracy of each gear reaching below 0.5%, which is suitable for multiple scenarios and reduces costs.
Smart Images

Figure CN120405219A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit technology, and particularly to a current sampling circuit, device and equipment. Background Art
[0002] Since current electronic systems have relatively high requirements for stable and safe operation as a whole, high-precision measurement within a wide current range has become one of the key factors. Implementing wide-range high-precision current measurement within a very high voltage range and being able to achieve an adaptive current sampling circuit can provide strong guarantee for the operation of the system.
[0003] Whether in the fields of power management, motor control, etc., very wide current ranges and very high-precision sampling technologies are required to ensure the stable operation of the system. Wide-range and high-precision current sampling can provide such measurement technology, effectively preventing the situation of system damage caused by overcurrent.
[0004] In summary, the wide-range, high-precision and adaptive current sampling technology is a technology developed under the background of the increasing development of electronic systems, and it is committed to providing more stable security and reliability for the system.
[0005] Currently, the prior art cannot achieve the adaptability of a wide current range, and the technical acquisition accuracy error is large, and it cannot be applied to high-precision acquisition scenarios. Summary of the Invention
[0006] This application provides a current sampling circuit, which is characterized by including:
[0007] A sampling module, connected in series with the load, for generating a circuit voltage and outputting a voltage value;
[0008] An amplification module, connected in series with the sampling module, for amplifying the output voltage of the sampling module;
[0009] A control module, for collecting the output voltage of the sampling module amplified by the amplification module after sampling starts, and controlling the acquisition gear used by the sampling module according to the analysis result of the output voltage.
[0010] Optionally, the current sampling circuit is characterized in that:
[0011] The sampling module is respectively connected to the load output end and the input end of the control module;
[0012] The amplification module is used to amplify the voltage generated by the sampling module through a differential amplifier and output it to the control module;
[0013] The control module is used to calculate the current value based on the sampled voltage after the sampling starts, and adaptively adjust the sampling range by software judgment until it switches to the actual current range;
[0014] Optionally, the current sampling circuit is characterized in that:
[0015] The sampling module includes a sampling resistor, a zener diode, a fuse, a MOS transistor, and a four-terminal optocoupler;
[0016] The sampling resistors are connected in parallel with each other, and the zener diode, the fuse, the MOS transistor, and the four-terminal optocoupler are only connected in parallel with the sampling resistor that bears the large current;
[0017] The amplification module includes a differential amplifier;
[0018] The differential amplifier is respectively connected to the output end of the sampling module and the input end of the MCU chip.
[0019] Optionally, the current sampling circuit is characterized in that:
[0020] The control module includes an MCU chip and a relay;
[0021] The MCU chip and the relay are connected in series;
[0022] The MCU chip is respectively connected to the output end of the differential amplifier, the input end of the four-terminal optocoupler, and the input end of the relay;
[0023] The relay is respectively connected to the IO port of the MCU chip and the output end of the sampling resistor of the sampling resistor circuit that bears a current not exceeding 1A;
[0024] Optionally, the sampling module includes:
[0025] The sampling module is a circuit composed of parallel-connected sampling resistors with different resistances, and bears different ranges of current according to the resistance values;
[0026] The sampling resistor circuit that bears a current not exceeding 1A is composed of a single sampling resistor. One end of the sampling resistor is connected to the output end of the load module and the input end of the differential amplifier, and the other end is connected to the input end of the relay;
[0027] The sampling resistor circuit that bears a current exceeding 1A is composed of the sampling resistor, a load resistor, a zener diode, a fuse, a MOS transistor, and a four-terminal optocoupler. One end of the sampling resistor is connected to the output end of the load module, and the other end is connected to the input end of the MOS transistor.
[0028] The input port of the four-terminal optocoupler is connected to the IO port of the MCU chip, and the output ports are respectively connected to a zener diode and a MOS transistor.
[0029] Optionally, the sampling resistor circuit includes:
[0030] According to the instruction of the control module, the corresponding sampling resistor circuits are sequentially used from large to small based on the current range of the sampling resistor circuit to generate the voltage of the current sampling resistor circuit, and the amplifier circuit amplifies this voltage.
[0031] Optionally, the control module includes:
[0032] The control module calculates the current value based on the amplified voltage of the sampling resistor circuit and compares the current value with the maximum value of the current range of the used sampling resistor circuit;
[0033] If the comparison result is that the current value is less than the maximum value of the current range, the control module controls the sampling module to use the sampling resistor circuit of the next range until the opposite comparison result is obtained or the range is exhausted to obtain the actual current range.
[0034] This application also provides a current sampling circuit device, which is characterized in that the device includes: a sampling resistor, a differential amplifier, a zener diode, a fuse, and an MCU chip.
[0035] Optionally, for the current sampling circuit device, it is characterized in that: the MCU chip is used to store and run current calculation and judgment software, the zener diode and the fuse are used for circuit protection, and the sampling resistor and the differential amplifier are used to amplify and obtain the voltage value.
[0036] This application also provides an electronic device, which is characterized in that it includes:
[0037] An MCU chip, which is used to collect the amplified voltage and calculate the current, and the collection of the amplified voltage and the calculation of the current implement any one of the steps of the current sampling circuit.
[0038] The beneficial effects of this application are as follows: This method can meet the current sampling requirements for a wide range under high voltage, and the MCU can be used to collect data to control the relay, realizing the adaptability between the current collections of 7 gears, being applicable to most scenarios, and each gear can achieve an extremely high collection accuracy of less than 0.5%. The cost of the components used in this method is extremely low, and it is applicable to product designs with high cost requirements. Description of the Drawings
[0039] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.
[0040] Figure 1 Flowchart showing a current sampling circuit disclosed in the present application;
[0041] Figure 2 Schematic diagram showing a current sampling circuit disclosed in the present application;
[0042] Figure 3 Circuit diagram showing a current sampling circuit disclosed in the present application. Detailed implementation manners
[0043] The following will detail various exemplary embodiments, features, and aspects of the present application with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings do not have to be drawn to scale unless otherwise specified.
[0044] Among them, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, "a plurality" means two or more unless otherwise specifically defined.
[0045] The special term "exemplary" here means "serving as an example, an embodiment, or an illustration". Any embodiment described as "exemplary" here does not have to be construed as superior to or better than other embodiments.
[0046] In addition, to better illustrate the present application, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present application can also be implemented without some specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail to highlight the gist of the present application.
[0047] The present application is a current sampling circuit. In this method, a power supply, a load, a sampling resistor, a differential amplifier, and an MCU are connected in series. A relay controls the switching of the sampling resistor, and the software in the MCU is used to achieve adaptive switching of the current range to improve the measurement accuracy and efficiency. Finally, the collected data is transmitted out through CAN communication, and this method uses low-cost but demand-satisfying devices to meet the user's need to reduce costs.
[0048] As Figure 1 shown, it is a flowchart of a current sampling circuit according to an embodiment of the present application, which specifically includes the following:
[0049] A sampling module 100, an amplification module 200, and a control module 300. The sampling module 100 is used to generate a circuit voltage and output a voltage value. Specifically, through the set acquisition gear, according to the used acquisition channel, the current generates a voltage across the sampling resistor, and the sampling module reduces the voltage to an acceptable range of the sampling module in the high-voltage power supply loop by using a voltage division circuit. Based on this method, the power supply voltage can reach 60V. The amplification module 200 is used to amplify the output voltage of the sampling module. Specifically, the two ends of the sampling resistor used in the sampling module 100 are respectively connected to the input ends of the differential amplifier to amplify the voltage difference across the sampling resistor. The control module 300 is used to collect the output voltage of the sampling module amplified by the amplification module after sampling starts, and control the acquisition gear used by the sampling module according to the analysis result of the output voltage.
[0050] Specifically, the voltage value amplified by the differential amplifier is collected and calculated by the MCU chip. The current value is calculated based on the amplified voltage and the resistance value of the sampling resistor at the current acquisition gear, and the current at the current gear is compared with the maximum value of the gear current. Calculate and compare in sequence for all 7 gears according to this process. By analyzing the comparison results, it can be obtained which gear current range the current in the current power supply channel is located in. Finally, the MCU chip sends out the current value at this time in the form of a CAN message through CAN communication.
[0051] For the setting of the gears, more than 2 gears can be set according to requirements, and each gear corresponds to a resistance value of a sampling resistor. For example, 2 gears or 3 gears can be set, or the specific number of gears can be set according to actual requirements. As an implementable manner, for example, 7 gears can be set to achieve self-adaptation between current acquisitions of up to 7 gears of 0~100uA, 100uA~1mA, 1mA~10mA, 10mA~100mA, 100mA~1A, 1A~10A, and 10A~50A, which can be applied to most scenarios.
[0052] In summary, this method controls the relay by sampling resistor parallel connection and using the data collected by the MCU. And the system leakage current of this method is extremely small, and the extremely high acquisition accuracy of below 0.5% can be achieved for each gear. At the same time, the power supply input of 0~60V is supported by the way of parallel connection of the load and the sampling resistor, which can meet the wide-range current sampling requirements under high voltage. In addition, since the number of IOs used in this method is small, the requirement for MCU resources is low, achieving the purpose of cost reduction.
[0053] As shown Figure 2 in the figure, the schematic diagram of the current sampling circuit includes the following:
[0054] The current is generated from the power supply, first passes through the load, then generates a voltage through the sampling resistor, and then the differential amplifier amplifies the voltage difference across the sampling resistor. Finally, the amplified voltage is collected by the MCU chip and the current value is calculated using software. After the calculation is completed, the MCU chip controls the relay through the IO port to change the resistance value of the sampling resistor, realizing the change of the current sampling range.
[0055] Specifically, the current flows out from the power supply, passes through the load and the sampling resistor to generate a voltage, and then the voltage across the sampling resistor is amplified by the differential amplifier and then sent to the MCU for collection. During this process, the withstand voltage capabilities of the load, the sampling resistor, and the differential amplifier are improved to bear a higher power supply voltage, and a wider current range is achieved through the differential amplifier with adjustable current magnitude and the parallel-arranged sampling resistors. By setting the unit of the sampling resistor, the voltage generated by the current across the sampling resistor is amplified by the differential amplifier and collected and calculated by the MCU chip. The current value at the current moment is calculated based on the collected voltage and the resistance value of the sampling resistor, and the current at the current range and the maximum value of the current at the range are compared. The above method is used to calculate and compare all 7 ranges in sequence. By analyzing the 7 comparison results, it can be obtained which range of current the current in the current power supply channel is located in. Finally, the MCU chip sends out the current value at this time in the form of a CAN message through CAN communication.
[0056] Specifically, the measurement range is improved based on the differential amplifier and the parallel multi-range sampling resistors in the sampling circuit, and a larger supply voltage is borne based on the load and the parallel multi-range sampling resistor circuit.
[0057] Among them, under the action of the load and the parallel multi-range sampling resistor circuit, the power supply voltage can reach 60V during actual use.
[0058] Specifically, based on the differential amplifier, the voltage across the sampling resistor at the current range is amplified, and the MCU is used to collect the amplified voltage. Based on the amplified voltage and the range where the current sampling resistor is located, the current value at each range is calculated.
[0059] Among them, when the power supply is turned on, the highest gear of the acquisition channel is defaultly turned on. At this time, the voltage is acquired, and the current value is calculated through software. And the software adaptively adjusts the gear within the current range (0 - 50A) in sequence through the judgment logic. The gear is based on the current range of 0 - 50A and is divided into 7 non-overlapping current intervals with different current values. The 7 gears are 10A - 50A, 1A - 10A, 100mA - 1A, 10mA - 100mA, 1mA - 10mA, 100uA - 1mA, and 0 - 100uA respectively.
[0060] Specifically, based on the current value and the current extreme values of each gear, the gear is switched in sequence, the magnitude relationship between the current value and the current extreme values of each gear is judged, and the current interval is confirmed. The current gears are arranged in descending order.
[0061] Among them, if the current value is greater than the current extreme values of all gears, then the current is greater than 50A and does not belong to any gear. If the current value is less than the current extreme values of all gears, then the current is less than 1mA and belongs to the 100uA - 1mA gear. If the situation that the current value is both greater than and less than the current extreme values of the gear exists at the same time, then the current belongs to the last gear that is less than the current extreme value of the gear.
[0062] Specifically, for example, when we use a 12V power supply to supply power to a load with a resistance of 24K, the actual current in the circuit is 500uA at this time;
[0063] Then the voltage difference on the sampling resistor in the 10A - 50A gear is ΔV 50A , then the current calculated through software is:
[0064] I = 500uA = ΔV 50A / 0.235 * 24 < 50A;
[0065] The gear is switched to the 1A - 10A gear, and the current calculated by the software is:
[0066] I = 500uA = ΔV 1A-10A / 0.47 * 10 < 10A;
[0067] The gear is switched to 100mA - 1A, and the current calculated by the software is:
[0068] ]>I = 500uA = ΔV 100mA-1A / 0.47 * 1 < 1A;
[0069] The gear is switched to 10mA - 100mA, and the current calculated by the software is:
[0070] I = 500uA = ΔV 10mA-100mA / 0.47 * 0.1 < 100mA;
[0071] Switch the gear to the 1 mA - 10 mA range. The current calculated by the software is:
[0072] I = 500 μA = ΔV 1mA-10mA / 0.47 * 0.01 < 10 mA;
[0073] Switch the gear to the 100 μA - 1 mA range. The current calculated by the software is:
[0074] I = 500 μA = ΔV 100uA-1mA / 0.47 * 0.001 < 1 mA;
[0075] At this time, the current in the power supply channel is in the range of 100 μA - 1 mA. Finally, through the CAN communication method, the collected information is sent out in the form of CAN messages to complete the final current acquisition, meeting the user's requirements for wide-range and high-precision acquisition.
[0076] As Figure 3 shown, the circuit diagram of the current sampling circuit includes: a sampling module and an amplification module.
[0077] Among them, the sampling module is respectively connected to the output end of the load module and the input end of the control module. The differential amplifier is used to amplify the voltage difference across the sampling resistor.
[0078] Specifically, the sampling module includes a sampling resistor, a load resistor, a zener diode, a fuse, a MOS transistor, and a four-terminal optocoupler.
[0079] Among them, the sampling module is a circuit composed of parallel-connected sampling resistors with different resistance values, which carry currents in different ranges according to the resistance values.
[0080] Specifically, the sampling resistor circuit carrying a current exceeding 1 A is composed of the sampling resistor, the load resistor, the zener diode, the fuse, the MOS transistor, and the four-terminal optocoupler. One end of the sampling resistor is connected to the output end of the load module, and the other end is connected to the input end of the MOS transistor.
[0081] In the 50 A gear circuit, the MCU chip is connected to the input port 1 of the four-terminal optocoupler through the IO port 1 to realize the transmission of control commands. After the output port 4 of the four-terminal optocoupler is connected to the load resistor, it is respectively connected in parallel with the load resistor, the cathode of the zener diode, and the gate of the MOS transistor. The other end of the load resistor, the anode of the zener diode, and the drain of the MOS transistor are connected to the fuse. The source of the MOS transistor is connected to the sampling resistor R1.
[0082] In the gear 10A circuit, the MCU chip transmits control commands by connecting to the input port 1 of the four-terminal optocoupler through the IO port 2. After the output port 4 of the four-terminal optocoupler is connected to the load resistor, the load resistor, the cathode of the zener diode, and the gate of the MOS transistor are connected in parallel respectively. The other end of the load resistor, the anode of the zener diode, and the drain of the MOS transistor are connected to the fuse tube. The source of the MOS transistor is connected to the sampling resistor R2.
[0083] Specifically, the sampling resistor circuit that can carry a current of no more than 1A is composed of a single said sampling resistor. One end of the sampling resistor is connected to the output end of the load module and the input end of the differential amplifier, and the other end is connected to the input end of the relay.
[0084] In the gear 1A circuit, one end of the sampling resistor R3 is connected to the load module, and the other end is connected to the relay.
[0085] In the gear 100mA circuit, one end of the sampling resistor R4 is connected to the load module, and the other end is connected to the relay.
[0086] In the gear 10mA circuit, one end of the sampling resistor R5 is connected to the load module, and the other end is connected to the relay.
[0087] In the gear 1mA circuit, one end of the sampling resistor R6 is connected to the load module, and the other end is connected to the relay.
[0088] In the gear 100uA circuit, one end of the sampling resistor R7 is connected to the load module, and the other end is connected to the relay.
[0089] Specifically, the differential amplifier circuit of the amplification module is as Figure 3 shown. One end of the load resistor R8 is connected to BAT, and the other end is respectively connected to the load resistor R9 and the positive input pin of the differential amplifier; one end of the load resistor R9 is respectively connected to the load resistor R8 and the positive input pin of the differential amplifier, and the other end is grounded; one end of the load resistor R10 is connected to the sampling circuit, and the other end is respectively connected to the load resistor R11 and the negative input pin of the differential amplifier; one end of the load resistor R11 is respectively connected to the load resistor R10 and the negative input pin of the differential amplifier, and the other end is connected to the output pin of the differential amplifier; the positive input pin of the differential amplifier is respectively connected to the load resistors R8 and R9, the negative input pin is respectively connected to the load resistors R10 and R11, the output pin is connected to the load resistor R11, the positive side power supply pin is respectively connected to the power supply and the capacitor, and the negative side power supply pin is grounded.
[0090] Specifically, the control module is used to calculate the current value based on the collected voltage after the sampling starts, and the software judges and adaptively adjusts the sampling gear in sequence until it switches to the actual current range.
[0091] Among them, the control module includes an MCU chip and a relay. The MCU chip is respectively connected to the output end of the differential amplifier, the input end of the four-terminal optocoupler, and the input end of the relay. The relay is respectively connected to the IO port of the MCU chip and the output end of the sampling resistor of the sampling resistor circuit carrying a current not exceeding 1A.
[0092] Specifically, in this solution, all electronic components use devices with very low costs, meeting the low-cost usage requirements of users. Moreover, this solution uses a small number of IOs and has low requirements for the resources of the MCU.
[0093] A current sampling circuit device used in the above steps, characterized in that the device includes: a sampling resistor, a differential amplifier, a zener diode, a fuse, and an MCU chip. The MCU chip is used to store and run current calculation and judgment software, the zener diode and the fuse are used for circuit protection, and the sampling resistor and the differential amplifier are used to amplify and obtain voltage values.
[0094] An electronic device used in the above steps, characterized in that it includes: an MCU chip, and the MCU chip is used to collect the amplified voltage and calculate the current, wherein the step of collecting the amplified voltage and calculating the current implements any one of the steps of the current sampling circuit.
[0095] The embodiments of the present application have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technologies in the market, or to enable other ordinary technical personnel in the technical field to understand the embodiments disclosed herein.
Claims
1. A current sampling circuit, characterized in that, Including: A sampling module, connected in series with the load, for generating a circuit voltage and outputting a voltage value; An amplification module, connected in series with the sampling module, for amplifying the output voltage of the sampling module; A control module, for collecting the output voltage of the sampling module amplified by the amplification module after sampling starts, and controlling the acquisition gear used by the sampling module according to the analysis result of the output voltage.
2. The current sampling circuit according to claim 1, characterized in that: The sampling module is respectively connected to the load output end and the input end of the control module; The amplification module is used to amplify the voltage generated by the sampling module through a differential amplifier and output it to the control module; The control module is used to calculate the current value based on the collected voltage after sampling starts, and software judges to perform acquisition gear self-adaptation in sequence until it switches to the actual current range.
3. The current sampling circuit according to claim 2, characterized in that: The sampling module includes a sampling resistor, a zener diode, a fuse, a MOS transistor, and a four-terminal optocoupler; The sampling resistors are connected in parallel with each other, and the zener diode, the fuse, the MOS transistor, and the four-terminal optocoupler only exist in parallel with the sampling resistor that bears a large current; The amplification module includes a differential amplifier; The differential amplifier is respectively connected to the output end of the sampling module and the input end of the MCU chip.
4. The current sampling circuit according to claim 2, characterized in that: The control module includes an MCU chip and a relay; The MCU chip and the relay are connected in series; The MCU chip is respectively connected to the output end of the differential amplifier, the input end of the four-terminal optocoupler, and the input end of the relay; The relay is respectively connected to the IO port of the MCU chip and the output end of the sampling resistor of the sampling resistor circuit that bears a current not exceeding 1A.
5. The current sampling circuit according to claim 3, wherein The sampling module includes: The sampling module is a circuit composed of parallel-connected sampling resistors with different resistance values, and bears different ranges of current according to the resistance value; The sampling resistor circuit that bears a current not exceeding 1A is composed of a single sampling resistor. One end of the sampling resistor is connected to the output end of the load module and the input end of the differential amplifier, and the other end is connected to the input end of the relay; The sampling resistor circuit that bears a current exceeding 1A is composed of the sampling resistor, a load resistor, a zener diode, a fuse, a MOS transistor, and a four-terminal optocoupler. One end of the sampling resistor is connected to the output end of the load module, and the other end is connected to the input end of the MOS transistor. The input port of the four-terminal optocoupler is connected to the IO port of the MCU chip, and the output port is respectively connected to the zener diode and the MOS transistor.
6. The current sampling circuit according to claim 5, wherein The sampling resistor circuit includes: According to the instruction of the control module, the corresponding sampling resistor circuits are used in sequence from large to small based on the current range of the sampling resistor circuit to generate the voltage of the current sampling resistor circuit, and the voltage is amplified by the amplification circuit.
7. The current sampling circuit according to claim 6, wherein The control module includes: The control module calculates the current value based on the amplified voltage of the sampling resistor circuit, and compares the current value with the maximum value of the current range of the sampling resistor circuit used. If the comparison result is that the current value is less than the maximum value of the current range, the control module controls the sampling module to use the sampling resistor circuit of the next range until the opposite comparison result is obtained or the range is exhausted, so as to obtain the actual current range.
8. A current sampling circuit device, characterized in that, The device includes: a sampling resistor, a differential amplifier, a voltage stabilizing diode, a fuse, and an MCU chip.
9. The current sampling circuit device according to claim 8, wherein: The MCU chip is used to store and run current calculation and judgment software, the voltage stabilizing diode and the fuse are used for circuit protection, and the sampling resistor and the differential amplifier are used to amplify and obtain the voltage value.
10. An electronic device, characterized in that, Comprising: An MCU chip, which is used to collect the amplified voltage and calculate the current, wherein the step of collecting the amplified voltage and calculating the current implements the current sampling circuit steps described in any one of claims 1 to 7.
Citation Information
Cited By
Wide-range current measuring device and measuring method
CN120610052A
A wide-range current measurement device and a measurement method
CN120610052B