Current sampling system and method, electronic equipment and storage medium
By introducing a common-mode signal acquisition and processing strategy into the current sampling system, using independent acquisition units and amplification units, and combining the difference processing of the controller, the problem of inaccurate current sampling results is solved and higher measurement accuracy is achieved.
Patent Information
- Application Number
- CN202511189099.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-23
AI Technical Summary
The current sampling method in the prior art has the problem of inaccurate results, especially the deviation of the sampling results caused by the superposition of common-mode signals.
A common-mode signal acquisition and processing strategy is adopted to accurately capture the common-mode voltage through an independent acquisition unit and a first amplification unit, and the sampled signal is processed by a second amplification unit, and a controller is used to perform difference processing to separate a pure differential-mode signal.
The current sampling accuracy is improved, the influence of common-mode voltage fluctuation is eliminated, and the accuracy of charging current measurement is ensured.
Smart Images

Figure CN120685959A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage servers, and in particular to a current sampling system, method, electronic device, and storage medium. Background Art
[0002] In the field of storage servers, when charging the battery backup unit (BBU), it is necessary to obtain the charging current. In related technologies, current sampling resistors are usually used to obtain the charging current. For example, Figure 1 As shown, when the charging control unit charges the battery, the charging current flowing through the sampling resistor R generates a voltage drop. This voltage drop is amplified by the differential amplifier circuit and sent to the analog-to-digital converter (ADC) for analog-to-digital conversion. The signal amplified by the differential amplifier circuit is expected to be a differential-mode signal, namely, the voltage difference across the sampling resistor R. This signal is proportional to the charging current and can be sampled by the ADC to reveal the true charging current. However, the differential amplifier circuit also has limited amplification capability for common-mode signals. This common-mode voltage signal is the battery voltage itself. After differential amplification, this common-mode signal is superimposed on the ADC sampling signal, causing deviations in the sampling result.
[0003] It can be seen that the current sampling method in the related art has the problem of inaccurate results. Summary of the Invention
[0004] The present application provides a current sampling system, method, electronic device and storage medium to at least solve the problem of inaccurate results in current sampling methods in related technologies.
[0005] The present application provides a current sampling system, comprising: a charging control unit, a collection unit, a first amplifying unit, a second amplifying unit, and a controller; a sampling resistor is connected between the charging control unit and a battery, and two ends of the sampling resistor are connected to an input end of the collection unit and an input end of the second amplifying unit; the first amplifying unit is connected to the collection unit; wherein the charging control unit is used to charge the battery; the collection unit is used to collect a common-mode signal between the charging control unit and the battery; the first amplifying unit is used to amplify the common-mode signal; the second amplifying unit is used to amplify the sampling signal, wherein the sampling signal is generated based on a voltage difference between the two ends of the sampling resistor and the voltage of the battery; and the controller is used to perform difference processing on the amplified common-mode signal and the amplified sampling signal to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current used by the charging control unit to charge the battery.
[0006] The present application also provides a current sampling method, including: being applied to a current sampling system, the current sampling system including: a charging control unit, an acquisition unit, a first amplifying unit, a second amplifying unit, and a controller; a sampling resistor being connected between the charging control unit and the battery, the two ends of the sampling resistor being connected to an input end of the acquisition unit and an input end of the second amplifying unit; the first amplifying unit being connected to the acquisition unit; wherein the charging control unit is configured to charge the battery, the method including: acquiring a common-mode signal between the charging control unit and the battery by the acquisition unit; amplifying the common-mode signal by the first amplifying unit; amplifying the sampling signal by the second amplifying unit, wherein the sampling signal is generated based on a voltage difference between the two ends of the sampling resistor and the voltage of the battery; and performing difference processing on the amplified common-mode signal and the amplified sampling signal by the controller to obtain a differential-mode signal, wherein the differential-mode signal is configured to reflect the charging current used by the charging control unit to charge the battery.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned current sampling methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned current sampling methods are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above current sampling methods when executed by a processor.
[0010] Through the present application, due to the adoption of a common-mode signal acquisition and processing strategy, the common-mode voltage between the charging control unit and the battery can be accurately captured and amplified through an independent acquisition unit and a first amplification unit. At the same time, the second amplification unit focuses on the amplification processing of the sampling signal, allowing the controller to separate a pure differential-mode signal from the two amplified signals through difference processing, directly reflecting the charging current of the battery charged by the charging control unit without being affected by common-mode voltage fluctuations. Therefore, it can solve the technical problem of inaccurate results in the current sampling method in the related art, and achieve the technical effect of improving the accuracy of current sampling. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 This is a schematic diagram of a current sampling system in related technology.
[0013] Figure 2 This is a structural block diagram of a current sampling system according to an embodiment of the present application.
[0014] Figure 3 This is a schematic diagram of an optional collection unit according to an embodiment of the present application.
[0015] Figure 4 This is a schematic diagram of an optional first amplification unit according to an embodiment of the present application.
[0016] Figure 5 3 is a schematic diagram of another optional first amplification unit according to an embodiment of the present application.
[0017] Figure 6 This is a schematic diagram of another optional first amplification unit according to an embodiment of the present application.
[0018] Figure 7 is a schematic diagram of an optional follower according to an embodiment of the present application.
[0019] Figure 8 This is a schematic diagram of an optional second amplification unit according to an embodiment of the present application.
[0020] Figure 9is a schematic diagram of another optional second amplification unit according to an embodiment of the present application.
[0021] Figure 10 is a schematic diagram of another optional second amplification unit according to an embodiment of the present application.
[0022] Figure 11 is a schematic diagram of an optional controller according to an embodiment of the present application.
[0023] Figure 12 It is a flowchart of an optional current sampling method according to an embodiment of the present application.
[0024] Figure 13 is a circuit diagram of an optional sampling system according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0027] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0028] According to one aspect of an embodiment of the present application, a current sampling system is provided. Optionally, in this embodiment, the current sampling system can be applied to the field of storage server technology, and applied to the scenario of monitoring the current of a charging circuit.
[0029] In this embodiment, if Figure 2The current sampling system shown includes: a charging control unit 201, a collection unit 202, a first amplifying unit 203, a second amplifying unit 204 and a controller 205; a sampling resistor R1 is connected between the charging control unit 201 and the battery, and the two ends of the sampling resistor are connected to the input end of the collection unit 202 and the input end of the second amplifying unit 204; the first amplifying unit 203 is connected to the collection unit 202.
[0030] The charging control unit 201 is used to charge the battery.
[0031] The acquisition unit 202 is used to acquire the common mode signal between the charging control unit 201 and the battery.
[0032] The first amplifying unit 203 is configured to amplify the common-mode signal.
[0033] The second amplifying unit 204 is configured to amplify the sampling signal, wherein the sampling signal is generated based on the voltage difference between the two ends of the sampling resistor and the voltage of the battery.
[0034] The controller 205 is used to perform difference processing on the amplified common-mode signal and the amplified sampling signal to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current used by the charging control unit 201 to charge the battery.
[0035] In related technologies, charging current measurements are required when charging certain batteries, such as the BBU in storage server technology. A BBU, or battery backup unit, uses its internal battery to provide temporary power to the Redundant Array of Independent Disks (RAID) controller in the event of a sudden power outage. This ensures the RAID controller can complete writing cached data to the hard disk, preventing data loss due to power outages and ensuring data integrity and system recovery speed. To monitor battery status, prevent excessive current from affecting battery safety, and prevent malfunctions, the charging current measurement is required when charging the BBU battery.
[0036] In the related art, the charging current is usually obtained by sampling the resistor, for example, Figure 1As shown, the charging control unit charges the battery. The charging current flowing through the sampling resistor R generates a voltage drop. This voltage drop is amplified by the differential amplifier circuit and sent to the analog-to-digital converter (ADC) for analog-to-digital conversion. The signal amplified by the differential amplifier circuit is expected to be a differential-mode signal, i.e., the voltage difference across the sampling resistor R. This signal is proportional to the charging current and can be restored to its true value after sampling by the ADC. However, the differential amplifier circuit also has a very low amplification capability for common-mode signals. This common-mode voltage signal is the battery voltage itself. After differential amplification, this common-mode signal is superimposed on the ADC sampling signal, causing deviations in the sampling result.
[0037] In addition, the battery voltage changes nonlinearly with the amount of charge. When the charge is high, the battery voltage is also high, and when the charge is low, the battery voltage is also low. As a result, the common-mode voltage signal is not constant and changes nonlinearly with the amount of charge. This makes it impossible to subtract a fixed offset from the ADC sampling result to eliminate common-mode interference, making it difficult to obtain accurate current.
[0038] In order to at least partially solve the above technical problems, in this embodiment, by combining the charging control unit, the acquisition unit, the first amplification unit, the second amplification unit and the controller, the acquisition unit is used to obtain the common-mode signal, and the controller performs difference processing on the amplified common-mode signal and the amplified sampling signal, so as to achieve the purpose of eliminating common-mode interference, and obtain an accurate differential-mode signal, thereby obtaining an accurate current size.
[0039] In this embodiment, the charging control unit is responsible for controlling the charging process and outputting a certain voltage to the battery. When passing through the sampling resistor, a voltage difference proportional to the charging current is generated, i.e., a differential-mode signal. Optionally, the charging control unit can use a variety of voltage or current sources, including but not limited to linear power supplies, switching power supplies, or constant current power supplies.
[0040] The acquisition unit can collect the common-mode signal between the charging control unit and the battery. The common-mode signal reflects the change in the battery voltage itself, and the battery voltage changes nonlinearly with the charge level. Optionally, the acquisition unit can use a specially structured resistor network to collect the common-mode signal.
[0041] The first amplifying unit can amplify the common-mode signal acquired by the acquisition unit. The amplified result is used for subsequent difference processing to eliminate common-mode interference.
[0042] The second amplifier unit amplifies the voltage difference across the sampling resistor, i.e., the sampling signal. The sampling signal includes a differential-mode signal reflecting the current magnitude and a common-mode signal causing interference. The amplification factors of the first and second amplifier units can be determined based on the voltage drop across the resistor and the input voltage range of the charging control unit.
[0043] The controller may include at least one ADC module, which can be used to convert analog signals (common-mode signals, sampling signals, etc. are all analog signals) into digital signals. The controller eliminates the interference of common-mode signals through differential processing and obtains differential-mode signals that can accurately reflect the charging current.
[0044] According to an embodiment of the present application, a current sampling system includes: a charging control unit, a collection unit, a first amplifying unit, a second amplifying unit, and a controller; a sampling resistor is connected between the charging control unit and the battery, and the two ends of the sampling resistor are connected to the input end of the collection unit and the input end of the second amplifying unit; the first amplifying unit is connected to the collection unit; wherein the charging control unit is used to charge the battery; the collection unit is used to collect a common-mode signal between the charging control unit and the battery; the first amplifying unit is used to amplify the common-mode signal; the second amplifying unit is used to amplify the sampling signal, wherein the sampling signal is generated based on the voltage difference between the two ends of the sampling resistor and the voltage of the battery; the controller is used to perform difference processing on the amplified common-mode signal and the amplified sampling signal to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current of the charging control unit charging the battery. By collecting the common-mode signal through the sampling unit in the present application and performing difference processing on the amplified common-mode signal and the amplified sampling signal through the controller to obtain an accurate differential-mode signal, the technical problem of inaccurate results existing in current sampling methods in the related art can be solved, thereby achieving the technical effect of improving the accuracy of current sampling.
[0045] In an exemplary embodiment, in order to accurately collect common-mode signals, the collection unit includes a voltage divider network connected in parallel across the sampling resistor, and the resistance of the voltage divider resistor in the voltage divider network is greater than the resistance of the sampling resistor.
[0046] Correspondingly, the voltage divider network includes at least two voltage divider resistors, and the at least two voltage divider resistors are connected in series.
[0047] In one example, if Figure 3 As shown, the voltage divider network can include two voltage divider resistors, R2 and R3, connected in parallel across the sampling resistor R1. R2 and R3 are connected in series. Here, the resistance values of R2 and R3 can be equal and much greater than that of R1, so that the current flowing through R2 and R3 is negligible. The acquisition unit can output a common-mode signal Vcm, which can be amplified by the first amplification unit to eliminate the common-mode signal in the sampled signal. Here, Vcm is the common-mode input voltage range (Vcm).
[0048] Through this embodiment, the voltage divider network of the acquisition unit is formed by two voltage divider resistors, which can effectively isolate and independently acquire the common mode signal, ensuring that the controller can obtain the accurate charging current.
[0049] In an exemplary embodiment, the first amplification unit includes a first input network, a first feedback network and a first operational amplifier; the first input network is connected to the non-inverting input terminal of the first operational amplifier and the inverting input terminal of the first operational amplifier; one end of the first feedback network is connected to the output terminal of the first operational amplifier, and the other end of the first feedback network is connected to the inverting input terminal of the first operational amplifier; the first input network is used to receive the common-mode signal collected by the collection unit and send the common-mode signal to the first operational amplifier; the first operational amplifier is used to amplify the common-mode signal; and the first feedback network is used to control the amplification gain of the first operational amplifier.
[0050] For example, the first amplification unit is Figure 4 As shown, it includes a first input network, a first feedback network, and a first operational amplifier Opa1. The first input network is connected to the non-inverting input terminal of the first operational amplifier Opa1 and the inverting input terminal of the first operational amplifier Opa1. One end of the first feedback network is connected to the output terminal of the first operational amplifier Opa1, and the other end of the first feedback network is connected to the inverting input terminal of the first operational amplifier Opa1. The first operational amplifier Opa1 can output an amplified common-mode signal VOUT. Here, Opa stands for operational amplifier (OPA), and VOUT stands for output voltage (VOUT).
[0051] Here, the first input network is used to receive the common-mode signal collected by the acquisition unit and send the common-mode signal to the first operational amplifier. The first input network can receive the common-mode signal from the acquisition unit and evenly feed it into the non-inverting input and inverting input of the first operational amplifier. The first feedback network, connected to the output and inverting input of the operational amplifier, can regulate the gain of the first operational amplifier to ensure that the common-mode signal is output at the desired amplification factor.
[0052] Alternatively, the first input network can be composed of multiple resistor groups, with one end of each resistor group connected to the non-inverting input and inverting input of the operational amplifier, respectively, and the other end receiving the common-mode signal source. This ensures that the common-mode signal is properly distributed before entering the first operational amplifier, avoiding signal distortion in the initial stage.
[0053] Optionally, the first feedback network can be composed of at least one resistor. The resistor in the first feedback network can control the gain of the amplifier by adjusting the resistance value. In order to ensure good linearity and stability, the resistor in the first feedback network can use a relatively large resistance and form a certain proportion with the resistance value in the first input network, which can not only ensure the amplification effect, but also reduce the nonlinear distortion of the signal.
[0054] Through this embodiment, the first amplifying unit can stably and controllably amplify the common-mode signal, and can reduce nonlinear distortion during the amplification process, maintain the original characteristics of the signal, and improve measurement accuracy.
[0055] In an exemplary embodiment, the first input network includes a first input resistor and a second input resistor, the first input resistor is connected to the inverting input terminal of the first operational amplifier, the second input resistor is connected to the non-inverting input terminal of the first operational amplifier, the first input resistor and the second input resistor are short-circuited, the resistance value of the first input resistor is equal to the resistance value of the second input resistor, and the resistance value of the first feedback resistor in the first feedback network is greater than the resistance value of the first input resistor.
[0056] In one example, if Figure 5 As shown, the first input network may include a first input resistor R4 and a second input resistor R5, the first input resistor R4 is connected to the inverting input terminal of the first operational amplifier, the second input resistor R5 is connected to the non-inverting input terminal of the first operational amplifier, and the first input resistor R4 and the second input resistor R5 are short-circuited, and the first feedback network includes a first feedback resistor R6.
[0057] Here, because the first input resistor is short-circuited with the second input resistor and has the same resistance as the second input resistor, the common-mode signal is evenly distributed between the two input terminals of the first operational amplifier, avoiding signal skew at the input stage, enhancing the symmetry and linearity of signal processing, and ensuring that the voltage difference between the two input terminals of the first operational amplifier is zero, thereby allowing the first operational amplifier to primarily amplify the common-mode signal. Furthermore, the resistance of the first feedback resistor is greater than that of the first input resistor. The high-value feedback resistor not only helps reduce circuit power consumption but also optimizes the amplifier's gain control, ensuring that the common-mode signal is amplified to an appropriate level while reducing signal distortion and noise.
[0058] Through this embodiment, the first input resistor and the second input resistor are short-circuited and have equal resistance values, ensuring that the common-mode signal can be evenly distributed before entering the first operational amplifier, reducing deviations in signal processing, and improving the consistency and linearity of the amplified signal; the high resistance value setting of the first feedback resistor can improve the precise control of the gain of the first operational amplifier, enabling it to stably amplify the common-mode signal while reducing signal distortion and maintaining signal purity.
[0059] In an exemplary embodiment, the first amplifying unit further includes a first reference resistor, one end of the first reference resistor is connected to the non-inverting input terminal of the first operational amplifier, the other end of the first reference resistor is grounded, and the resistance of the first reference resistor is equal to the resistance of the first feedback resistor.
[0060] For example, Figure 6 As shown, one end of the first reference resistor R7 is connected to the non-inverting input terminal of the first operational amplifier, and the other end of the first reference resistor is grounded. The resistance of the first reference resistor is equal to the resistance of the first feedback resistor.
[0061] In this embodiment, the first reference resistor can be used to set the circuit's DC operating point. The DC operating point, also known as the bias point, refers to the stable values of DC voltage and DC current at various points in an electronic circuit when no AC signal is input. In amplifier circuit design, the DC operating point ensures stable and accurate operation in complex and changing signal environments.
[0062] The resistance of the first reference resistor may be equal to the resistance of the first feedback resistor, and the resistance of the first feedback resistor may be greater than the resistance of the first input resistor. Therefore, the resistance of the first reference resistor may be greater than the resistance of the first input resistor.
[0063] According to this embodiment, by setting the first reference resistor with a resistance equal to the resistance of the first feedback resistor, the DC operating point of the first operational amplifier can be ensured to be stable, thereby reducing the risks of signal offset and gain fluctuation.
[0064] In an exemplary embodiment, the above system also includes: a follower, the follower includes a second operational amplifier, the non-inverting input terminal of the second operational amplifier is connected to the acquisition unit, the inverting input terminal of the operational amplifier is connected to the first input resistor, and the output terminal of the operational amplifier is connected to the first input resistor and the second input resistor.
[0065] In one example, if Figure 7 As shown, the current sampling system also includes a follower, which includes a second operational amplifier opa2. The non-inverting input terminal of the second operational amplifier opa2 is connected to the acquisition unit to receive the output Vcm of the acquisition unit. The inverting input terminal of the operational amplifier is connected to the first input resistor R4. The output terminal of the operational amplifier is connected to the first input resistor R4 and the second input resistor R5, and outputs the amplified Vcm1.
[0066] In this embodiment, the second operational amplifier opa2 functions as a voltage follower, and its output Vcm1 is equal to its input Vcm. The input impedance of the second operational amplifier opa2 is very large and does not affect the voltage division of the resistors R2 and R3.
[0067] Through this embodiment, by providing a follower between the acquisition unit and the first amplification unit, the acquisition unit and the first amplification unit can be effectively isolated, protecting the signal source from the load effect while ensuring high-quality transmission of the signal in the circuit.
[0068] In an exemplary embodiment, the second amplification unit includes a second input network, a second feedback network and a third operational amplifier; the second input network is connected to the non-inverting input terminal of the third operational amplifier and the inverting input terminal of the third operational amplifier, the second input network is also connected to a sampling resistor, one end of the second feedback network is connected to the output terminal of the third operational amplifier, and the other end of the second feedback network is connected to the inverting input terminal of the third operational amplifier; the second input network is used to receive a current sampling signal and send the current sampling signal to the third operational amplifier; the third operational amplifier is used to amplify the current sampling signal to obtain an amplified current sampling signal; the second feedback network is used to control the amplification gain of the third operational amplifier.
[0069] In one example, if Figure 8 As shown, the second amplification unit includes a second input network, a second feedback network, and a third operational amplifier, opa3. The second input network is connected to the non-inverting input of the third operational amplifier, opa3, and the inverting input of the third operational amplifier, opa3. The second input network is also connected to a sampling resistor. The second output network can receive the input voltage VIN and the battery voltage VBAT on both sides of the sampling resistor, respectively. One end of the second feedback network is connected to the output of the third operational amplifier, opa3, and the other end of the second feedback network is connected to the inverting input of the third operational amplifier, opa3. The third operational amplifier, opa3, can output the amplified common-mode signal, VOUT. Here, VIN stands for input voltage (VIN), and VBAT stands for battery voltage (V-Battery, VBAT).
[0070] Similar to the first amplification unit in the aforementioned embodiment, the second input network is used to receive the current sampling signal and send it to the third operational amplifier. The second input network can receive the input voltage and battery voltage from both sides of the sampling resistor of the acquisition unit and send them to the non-inverting input and inverting input of the third operational amplifier in a balanced manner. The second feedback network can be connected to the output and inverting input of the operational amplifier to adjust the gain of the third operational amplifier, ensuring that the common-mode signal can be output according to the expected amplification factor.
[0071] Optionally, the second feedback network can be composed of resistors. The resistors in the second feedback network can control the gain of the amplifier by adjusting the resistance value. In order to ensure good linearity and stability, the resistors in the second feedback network can use relatively large resistances and form a certain proportion with the resistance value in the second input network, which can not only ensure the amplification effect, but also reduce the nonlinear distortion of the signal.
[0072] It should be noted that the first amplifying unit and the second amplifying unit have similar structures. The first operational amplifier and the third operational amplifier can select operational amplifiers of the same signal and maintain the same parameters, or can select operational amplifiers of different models. This is not limited in this embodiment.
[0073] Through this embodiment, the second amplifying unit can stably and controllably amplify the sampling signal, and can reduce nonlinear distortion during the amplification process, maintain the original characteristics of the signal, and improve measurement accuracy.
[0074] In an exemplary embodiment, the second input network includes a third input resistor and a fourth input resistor, one end of the third input resistor is connected to the inverting input terminal of the third operational amplifier, the other end of the third input resistor is connected to the sampling resistor, one end of the fourth input resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the fourth input resistor is connected to the other end of the sampling resistor, the resistance value of the third input resistor is equal to the resistance value of the fourth input resistor, the resistance value of the second feedback resistor in the second feedback network is greater than the resistance value of the third input resistor; the ratio of the resistance value of the second feedback resistor to the resistance value of the third input resistor is equal to the ratio of the resistance value of the first feedback resistor to the resistance value of the first input resistor.
[0075] In one example, if Figure 9 As shown, one end of the third input resistor R8 is connected to the inverting input terminal of the third operational amplifier opa3, the other end of the third input resistor R8 is connected to the sampling resistor R1, one end of the fourth input resistor R9 is connected to the non-inverting input terminal of the third operational amplifier opa3, the other end of the fourth input resistor R9 is connected to the other end of the sampling resistor R1, and the second feedback network includes a first feedback resistor R10.
[0076] Here, similar to the first amplifying unit in the aforementioned embodiment, the resistance of the third input resistor is equal to the resistance of the fourth input resistor, and the resistance of the second feedback resistor in the second feedback network is greater than the resistance of the third input resistor. Furthermore, the ratio of the resistance of the second feedback resistor to the resistance of the third input resistor is equal to the ratio of the resistance of the first feedback resistor to the resistance of the first input resistor, that is, R4 / R5=R8 / R9.
[0077] Through this embodiment, the resistance value of the third input resistor is equal to the resistance value of the fourth input resistor, which can ensure that the input voltage from both sides of the sampling resistor and the battery voltage can be accurately input into the third operational amplifier, maintaining the symmetry of the input signal; the high resistance value setting of the second feedback resistor can improve the precise control of the gain of the third operational amplifier, enabling it to stably amplify the sampling signal while reducing signal distortion and maintaining signal purity.
[0078] In an exemplary embodiment, the second amplification unit further includes a second reference resistor, one end of the second reference resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the second reference resistor is grounded, and the resistance of the second reference resistor is equal to the resistance of the second feedback resistor.
[0079] In one example, if Figure 10 As shown, one end of the second reference resistor R11 is connected to the non-inverting input terminal of the third operational amplifier opa3, and the other end of the second reference resistor R11 is grounded. The resistance of the second reference resistor R11 is equal to the resistance of the second feedback resistor R10. In this embodiment, similar to the first reference resistor in the previous embodiment, the second reference resistor can be used to set the DC operating point of the circuit.
[0080] Similar to the first reference resistor in the aforementioned embodiment, the resistance of the second reference resistor can be equal to the resistance of the second feedback resistor, and the resistance of the second feedback resistor can be greater than the resistance of the third input resistor, so the resistance of the second reference resistor is greater than the resistance of the third input resistor.
[0081] According to this embodiment, by setting the second reference resistor with a resistance equal to the resistance of the second feedback resistor, the DC operating point of the third operational amplifier can be ensured to be stable, thereby reducing the risks of signal offset and gain fluctuation.
[0082] In an exemplary embodiment, the controller includes a first sampling unit, a second sampling unit, and a processing unit; the first sampling unit is used to receive the amplified common-mode signal, perform analog-to-digital conversion on the amplified common-mode signal, and obtain a digital signal of the common-mode signal; the second sampling unit is used to receive the amplified current sampling signal, perform analog-to-digital conversion on the amplified current sampling signal, and obtain a digital signal of the current sampling signal; the processing unit is used to subtract the digital signal of the common-mode signal from the digital signal of the current sampling signal to obtain a differential-mode signal, and determine the actual charging current based on the differential-mode signal.
[0083] For example, Figure 11As shown, the controller includes a first sampling unit, a second sampling unit and a processing unit. The first sampling unit can receive the amplified common-mode signal VOUT1 from the first amplifying unit, and the second sampling unit can receive the amplified current sampling signal VOUT2 from the second amplifying unit. The first sampling unit and the second sampling unit can respectively perform analog-to-digital conversion on VOUT1 and VOUT2 to obtain digital signals, and the processing unit further processes the digital signals.
[0084] In this embodiment, the processing unit may subtract the digital signal of the common mode signal from the digital signal of the current sampling signal, thereby eliminating the influence of the common mode signal to obtain an accurate differential mode signal, and determine the actual charging current based on the differential mode signal.
[0085] Optionally, after determining the actual charging current, the processing unit can determine whether the charging current is abnormal, and control the disconnection of the charging circuit when the charging current is too small or too small, and control the corresponding sound and light module to issue a warning to prevent damage caused by abnormal current.
[0086] According to this embodiment, the sampling unit performs analog-to-digital conversion, and the processing unit then uniformly processes the digital signal, thereby achieving accurate measurement of the circuit.
[0087] In an exemplary embodiment, the controller further includes: a synchronization unit configured to control the first sampling unit and the second sampling unit to perform synchronous sampling at a preset sampling frequency.
[0088] Since the processing unit needs to perform calculations based on the outputs of the first sampling unit and the second sampling unit, the first sampling unit and the second sampling unit need to perform synchronous sampling. In this embodiment, the synchronization unit in the controller can control the first sampling unit and the second sampling unit to perform synchronous sampling at a preset sampling frequency. Here, the preset sampling frequency can be set according to experience, for example, it can be 30Hz, 60Hz or other frequencies. Optionally, the synchronization unit can control the first sampling unit and the second sampling unit to perform sampling at a specified sampling frequency when the battery is not in a charging state, wherein, in order to save unnecessary resource consumption, the specified sampling frequency is a sampling frequency lower than the aforementioned preset sampling frequency.
[0089] Furthermore, when it is determined that there is current in the charging circuit based on the sampling results of the first sampling unit and the second sampling unit, the processing unit can promptly control the corresponding sound and light module to issue a warning reminder.
[0090] According to this embodiment, the synchronization unit controls the first sampling unit and the second sampling unit to perform synchronous sampling, which can reduce the timing error in the sampling process and ensure data consistency.
[0091] According to another aspect of the embodiment of the present application, a current sampling method is also provided. The current sampling method can be applied to Figure 2 The current sampling system shown here has already been described and will not be repeated here. The current sampling system includes: a charging control unit 201, a collection unit 202, a first amplification unit 203, a second amplification unit 204, and a controller 205. A sampling resistor is connected between the charging control unit 201 and the battery, with its two ends connected to the input of the collection unit 202 and the input of the second amplification unit 204. The first amplification unit 203 is connected to the collection unit 202. The charging control unit 201 is used to charge the battery.
[0092] Figure 12 FIG. 1 is a flow chart of an optional current sampling method according to an embodiment of the present application, such as Figure 12 As shown, the process of the method may include the following steps:
[0093] Step S1202: collecting a common mode signal between the charging control unit and the battery through a collection unit.
[0094] Step S1204: amplify the common-mode signal through the first amplifying unit.
[0095] Step S1206 : amplifying the sampling signal by a second amplifying unit, wherein the sampling signal is generated based on the voltage difference between the two ends of the sampling resistor and the voltage of the battery.
[0096] Step S1208 : performing difference processing on the amplified common-mode signal and the amplified sampling signal through the controller to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current used by the charging control unit to charge the battery.
[0097] The embodiments provided herein utilize an acquisition unit to acquire a common-mode signal between a charging control unit and a battery; a first amplification unit to amplify the common-mode signal; and a second amplification unit to amplify the sampled signal, where the sampled signal is generated based on the voltage difference across a sampling resistor and the battery voltage. A controller then performs differential processing on the amplified common-mode signal and the amplified sampled signal to generate a differential-mode signal, where the differential-mode signal reflects the charging current used by the charging control unit to charge the battery. This solves the technical problem of inaccurate results in current sampling methods in related technologies, achieving the technical effect of improving current sampling accuracy.
[0098] In an exemplary embodiment, the acquisition unit includes a voltage divider network connected in parallel at both ends of the sampling resistor, and the resistance of the voltage divider resistor in the voltage divider network is greater than the resistance of the sampling resistor.
[0099] In an exemplary embodiment, the voltage dividing network includes at least two voltage dividing resistors, and the at least two voltage dividing resistors are connected in series.
[0100] In an exemplary embodiment, the first amplification unit includes a first input network, a first feedback network and a first operational amplifier; the first input network is connected to the non-inverting input terminal of the first operational amplifier and the inverting input terminal of the first operational amplifier; one end of the first feedback network is connected to the output terminal of the first operational amplifier, and the other end of the first feedback network is connected to the inverting input terminal of the first operational amplifier; the above method also includes: receiving the common-mode signal collected by the collection unit through the first input network, and sending the common-mode signal to the first operational amplifier; amplifying the common-mode signal through the first operational amplifier; and controlling the amplification gain of the first operational amplifier through the first feedback network.
[0101] In an exemplary embodiment, the first input network includes a first input resistor and a second input resistor, the first input resistor is connected to the inverting input terminal of the first operational amplifier, the second input resistor is connected to the non-inverting input terminal of the first operational amplifier, the first input resistor and the second input resistor are short-circuited, the resistance value of the first input resistor is equal to the resistance value of the second input resistor, and the resistance value of the first feedback resistor in the first feedback network is greater than the resistance value of the first input resistor.
[0102] In an exemplary embodiment, the first amplifying unit further includes a first reference resistor, one end of the first reference resistor is connected to the non-inverting input terminal of the first operational amplifier, the other end of the first reference resistor is grounded, and the resistance of the first reference resistor is equal to the resistance of the first feedback resistor.
[0103] In an exemplary embodiment, the current sampling system further includes: a follower, the follower including a second operational amplifier, the non-inverting input terminal of the second operational amplifier is connected to the acquisition unit, the inverting input terminal of the operational amplifier is connected to the first input resistor, and the output terminal of the operational amplifier is connected to the first input resistor and the second input resistor.
[0104] In an exemplary embodiment, the second amplification unit includes a second input network, a second feedback network and a third operational amplifier; the second input network is connected to the non-inverting input terminal of the third operational amplifier and the inverting input terminal of the third operational amplifier, the second input network is also connected to a sampling resistor, one end of the second feedback network is connected to the output terminal of the third operational amplifier, and the other end of the second feedback network is connected to the inverting input terminal of the third operational amplifier; the above method also includes: receiving a current sampling signal through the second input network and sending the current sampling signal to the third operational amplifier; amplifying the current sampling signal through the third operational amplifier to obtain an amplified current sampling signal; and controlling the amplification gain of the third operational amplifier through the second feedback network.
[0105] In an exemplary embodiment, the second input network includes a third input resistor and a fourth input resistor, one end of the third input resistor is connected to the inverting input terminal of the third operational amplifier, the other end of the third input resistor is connected to the sampling resistor, one end of the fourth input resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the fourth input resistor is connected to the other end of the sampling resistor, the resistance value of the third input resistor is equal to the resistance value of the fourth input resistor, the resistance value of the second feedback resistor in the second feedback network is greater than the resistance value of the third input resistor; the ratio of the resistance value of the second feedback resistor to the resistance value of the third input resistor is equal to the ratio of the resistance value of the first feedback resistor to the resistance value of the first input resistor.
[0106] In an exemplary embodiment, the second amplification unit further includes a second reference resistor, one end of the second reference resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the second reference resistor is grounded, and the resistance of the second reference resistor is equal to the resistance of the second feedback resistor.
[0107] In an exemplary embodiment, the controller includes a first sampling unit, a second sampling unit, and a processing unit; the above method further includes: receiving an amplified common-mode signal through the first sampling unit, performing analog-to-digital conversion on the amplified common-mode signal, and obtaining a digital signal of the common-mode signal; receiving an amplified current sampling signal through the second sampling unit, performing analog-to-digital conversion on the amplified current sampling signal, and obtaining a digital signal of the current sampling signal; and subtracting the digital signal of the common-mode signal from the digital signal of the current sampling signal through the processing unit to obtain a differential-mode signal, and determining the actual charging current based on the differential-mode signal.
[0108] In an exemplary embodiment, the method further includes: controlling the first sampling unit and the second sampling unit to perform synchronous sampling at a preset sampling frequency through a synchronization unit.
[0109] The current sampling method in the embodiment of the present application is explained below with reference to an optional example. In this optional example, the current sampling method can be applied to Figure 13 As shown in the circuit diagram.
[0110] The charging control unit outputs a voltage, VIN, which flows through the sampling resistor R1 to charge the battery, VBAT. To reduce power loss, the resistor R1 can be selected in the milliohm range. For example, taking R1 = 25mV / Imax as an example, when the charging current reaches the maximum Imax, the current flowing through the sampling resistor R1 generates a 25mV voltage drop. VIN is connected to the non-inverting input of the op amp, opa3, after being divided by resistors R9 and R11. VBAT is connected to the non-inverting input of the op amp, opa3, through resistor R8. VBAT is connected to the inverting input of the op amp, opa3, through resistor R8. The inverting input of opa3 is connected to the output, VOUT2, through resistor R10. Here, the operational amplifier, opa3, and resistors R8, R9, R10, and R11 form a differential amplifier circuit, i.e., the second amplifier unit. Assume R8=R9=Rx, R10=R11=Ry, then the function of the differential amplifier is to amplify the differential-mode signal VIN-VBAT by Ry / Rx times and output it. For example, take R8=R9=10kΩ, R10=R11=A*10kΩ as an example. Here, A is the amplification factor. A can be selected according to the differential-mode voltage across the sampling resistor R1 and the input voltage range of the ADC. For example, the maximum differential-mode voltage across the sampling resistor R1 is 25mV, and the input voltage range of the ADC is 0-2.5V. To avoid a differential-mode voltage exceeding 25mV in extreme cases, thereby exceeding the ADC's range, the 25mV input can be amplified to produce a 2V output voltage. In this case, A=2V / 25mV=80, and R10=R11=80kΩ.
[0111] Here, the differential amplifier amplifies the common-mode component while amplifying the differential-mode signal, that is, (VIN+VBAT) / 2. The common-mode rejection ratio of the operational amplifier opa3 is represented by CMRR1. The output VOUT2 after considering the common-mode component is shown in formula (1):
[0112] ; (1)
[0113] Among them, CMRR1 is the common-mode rejection ratio of the operational amplifier opa3. It can be seen that the output voltage VOUT1 consists of two parts: differential-mode component and common-mode component. Although the CMRR is relatively large and can reach tens of dB or even more than 100 dB, which greatly attenuates the common-mode component, the sampling resistor is very small and the battery voltage is high. Therefore, VIN-VBAT is much smaller than (VIN+VBAT) / 2, so the influence of the common-mode component cannot be ignored.
[0114] Resistors R2 and R3 are first connected in series and then in parallel across sampling resistor R1. Here, R2 equals R3, and its resistance is much greater than R1. This results in negligible current flowing through R2 and R3. Vcm equals (VIN + VBAT) / 2, the common-mode input voltage of the opa3 differential amplifier circuit. Op amp OPA2 acts as a voltage follower, with its output Vcm1 equal to the input Vcm. The input impedance of op amp OPA2 is very large and does not affect the voltage divider between resistors R2 and R3.
[0115] Operational amplifier opa1 and resistors R4, R5, R6, and R7 also form a differential amplifier circuit, with R4 = R5 = Rx, and R6 = R7 = Ry. For example, similar to R8, R9, R10, and R11, R4 = R5 = 10kΩ, and R6 = R7 = A*10kΩ can be used. Alternatively, resistors with different values from those of R8, R9, R10, and R11 can be selected, with the corresponding ratios satisfying R6 / R4 = R10 / R8, that is, the same amplification factor A is selected.
[0116] Here, since R4 and R5 are short-circuited together, the differential-mode input voltage of this differential amplifier is 0, and the common-mode input voltage is Vcm1. The common-mode rejection ratio of the operational amplifier opa1 is represented by CMRR2, and the output VOUT1 is shown in formula (2):
[0117] ; (2)
[0118] Where CMRR2 is the common-mode rejection ratio of the operational amplifier opa1. It can be seen that formula (2) only has common-mode components and no differential-mode components. Moreover, when CMRR1 and CMRR2 are equal, formula (2) is exactly equal to the common-mode component in formula (1).
[0119] If op amps opa3 and opa1 are the same model and have the same parameters, CMRR1 equals CMRR2. Then, equation 2 represents the common-mode component in equation 1. Subtracting equation 2 from equation 1 eliminates the common-mode component, leaving only the differential-mode component.
[0120] VOUT1 is connected to the controller's second sampling unit, and VOUT2 is connected to the controller's first sampling unit. By controlling the first and second sampling units to perform synchronous sampling at the same sampling frequency, the controller subtracts the first sampling unit's sampling result from the second sampling unit's sampling result to eliminate the common-mode component and obtain the true charging current value.
[0121] In this optional example, because the differential amplifier circuit amplifies both differential-mode and common-mode signals, especially when the common-mode input voltage is variable, it is impossible to eliminate common-mode interference by subtracting a fixed offset from the ADC sampling result. This optional example eliminates common-mode interference by subtracting the common-mode component from the ADC sampling result, retaining only the differential-mode component, thereby achieving accurate current measurement.
[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a read-only memory (ROM) / random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0123] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above current sampling method embodiments.
[0124] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned current sampling method embodiments when running.
[0125] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0126] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above current sampling method embodiments are implemented.
[0127] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned current sampling method embodiments are implemented.
[0128] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0129] The above is a detailed introduction to a current sampling system, method, electronic device and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only applicable to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A current sampling system, characterized in that: The system includes: a charging control unit, a collection unit, a first amplifying unit, a second amplifying unit and a controller; a sampling resistor is connected between the charging control unit and the battery, and the two ends of the sampling resistor are connected to the input end of the collection unit and the input end of the second amplifying unit; the first amplifying unit is connected to the collection unit; wherein, The charging control unit is used to charge the battery; The acquisition unit is used to acquire the common mode signal between the charging control unit and the battery; The first amplifying unit is configured to amplify the common-mode signal; The second amplifying unit is configured to amplify a sampling signal, wherein the sampling signal is generated based on a voltage difference between two ends of the sampling resistor and the voltage of the battery; The controller is used to perform difference processing on the amplified common-mode signal and the amplified sampling signal to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current used by the charging control unit to charge the battery.
2. The system according to claim 1, wherein: The acquisition unit includes a voltage divider network connected in parallel at both ends of the sampling resistor, and the resistance of the voltage divider resistor in the voltage divider network is greater than the resistance of the sampling resistor.
3. The system according to claim 2, characterized in that The voltage dividing network includes at least two voltage dividing resistors, and the at least two voltage dividing resistors are connected in series.
4. The system according to claim 1, wherein: The first amplification unit includes a first input network, a first feedback network, and a first operational amplifier; the first input network is connected to the non-inverting input terminal of the first operational amplifier and the inverting input terminal of the first operational amplifier; one end of the first feedback network is connected to the output terminal of the first operational amplifier, and the other end of the first feedback network is connected to the inverting input terminal of the first operational amplifier; The first input network is configured to receive the common-mode signal collected by the collection unit and send the common-mode signal to the first operational amplifier; The first operational amplifier is used to amplify the common-mode signal; The first feedback network is used to control the amplification gain of the first operational amplifier.
5. The system according to claim 4, characterized in that The first input network includes a first input resistor and a second input resistor, the first input resistor is connected to the inverting input terminal of the first operational amplifier, the second input resistor is connected to the non-inverting input terminal of the first operational amplifier, the first input resistor and the second input resistor are short-circuited, the resistance value of the first input resistor is equal to the resistance value of the second input resistor, and the resistance value of the first feedback resistor in the first feedback network is greater than the resistance value of the first input resistor.
6. The system according to claim 5, characterized in that The first amplifying unit further includes a first reference resistor, one end of the first reference resistor is connected to the non-inverting input terminal of the first operational amplifier, the other end of the first reference resistor is grounded, and the resistance of the first reference resistor is equal to the resistance of the first feedback resistor.
7. The system according to claim 5, characterized in that The system also includes: a follower, the follower includes a second operational amplifier, the non-inverting input terminal of the second operational amplifier is connected to the acquisition unit, the inverting input terminal of the operational amplifier is connected to the first input resistor, and the output terminal of the operational amplifier is connected to the first input resistor and the second input resistor.
8. The system according to claim 6, wherein: The second amplification unit includes a second input network, a second feedback network, and a third operational amplifier; the second input network is connected to the non-inverting input terminal of the third operational amplifier and the inverting input terminal of the third operational amplifier, the second input network is also connected to the sampling resistor, one end of the second feedback network is connected to the output terminal of the third operational amplifier, and the other end of the second feedback network is connected to the inverting input terminal of the third operational amplifier; The second input network is configured to receive the current sampling signal and send the current sampling signal to the third operational amplifier; The third operational amplifier is used to amplify the current sampling signal to obtain the amplified current sampling signal; The second feedback network is used to control the amplification gain of the third operational amplifier.
9. The system of claim 8, wherein: The second input network includes a third input resistor and a fourth input resistor, one end of the third input resistor is connected to the inverting input terminal of the third operational amplifier, the other end of the third input resistor is connected to the sampling resistor, one end of the fourth input resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the fourth input resistor is connected to the other end of the sampling resistor, the resistance of the third input resistor is equal to the resistance of the fourth input resistor, and the resistance of the second feedback resistor in the second feedback network is greater than the resistance of the third input resistor; The ratio of the resistance of the second feedback resistor to the resistance of the third input resistor is equal to the ratio of the resistance of the first feedback resistor to the resistance of the first input resistor.
10. The system according to claim 9, characterized in that The second amplifying unit further includes a second reference resistor, one end of the second reference resistor is connected to the non-inverting input terminal of the third operational amplifier, the other end of the second reference resistor is grounded, and the resistance of the second reference resistor is equal to the resistance of the second feedback resistor.
11. The system according to claim 1, wherein: The controller includes a first sampling unit, a second sampling unit and a processing unit; The first sampling unit is configured to receive the amplified common-mode signal, perform analog-to-digital conversion on the amplified common-mode signal, and obtain a digital signal of the common-mode signal; The second sampling unit is configured to receive the amplified current sampling signal, perform analog-to-digital conversion on the amplified current sampling signal, and obtain a digital signal of the current sampling signal; The processing unit is configured to subtract the digital signal of the common mode signal from the digital signal of the current sampling signal to obtain the differential mode signal, and determine the actual charging current according to the differential mode signal.
12. The system according to claim 11, wherein: The controller further includes: A synchronization unit is used to control the first sampling unit and the second sampling unit to perform synchronous sampling at a preset sampling frequency.
13. A current sampling method, characterized in that: The method is applied to a current sampling system, comprising: a charging control unit, a collection unit, a first amplifying unit, a second amplifying unit, and a controller; a sampling resistor is connected between the charging control unit and the battery, and the two ends of the sampling resistor are connected to the input end of the collection unit and the input end of the second amplifying unit; the first amplifying unit is connected to the collection unit; wherein the charging control unit is used to charge the battery, and the method comprises: collecting, by the collection unit, a common-mode signal between the charging control unit and the battery; amplifying the common-mode signal by the first amplifying unit; amplifying a sampling signal by the second amplifying unit, wherein the sampling signal is generated based on a voltage difference between two ends of the sampling resistor and the voltage of the battery; The controller performs difference processing on the amplified common-mode signal and the amplified sampling signal to obtain a differential-mode signal, wherein the differential-mode signal is used to reflect the charging current used by the charging control unit to charge the battery.
14. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the current sampling method according to claim 13 when executing the computer program.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the current sampling method according to claim 13 when executed by a processor.
Citation Information
Patent Citations
High common mode storage battery monomer voltage acquisition circuit and acquisition method
CN107167650A
Current sampling circuit, switch circuit and current sampling method
CN107607770A
Differential signal sampling circuit and differential signal sampling method and device
CN114640349A
Sending circuit of controller area network (CAN) transceiver and CAN transceiver
CN116783830A
Common-mode rejection circuit and LED driving power supply
CN117119634A