SUMMERY OF THE UTILITY MODEL
The application provides a be applied to power quality device's battery power detection circuitry to solve the portability that generally needs power quality device at some remote scene, use the inside battery of device to supply power, battery power detects the life-span and the charge management of battery especially important. The conventional battery power detection needs a special power management IC, so that a new, lower-cost and reliable battery power detection circuit is needed.
The application provides a be applied to power quality device's battery power detection circuitry includes: a battery voltage acquisition circuit, an analog output circuit, a threshold output circuit, an LDO power supply circuit and a CPU circuit module, wherein,
the battery voltage acquisition circuit comprises a battery to be detected and two resistors, the battery voltage acquisition circuit is connected with the analog output circuit and the threshold output circuit, and the battery voltage acquisition circuit is configured to convert the battery voltage into a voltage signal and transmit the voltage signal to the analog output circuit and the threshold output circuit;
the analog output circuit is connected with the CPU circuit module and is configured to follow and reduce the voltage signal and output a signal CPU _ AD to an analog-to-digital conversion pin of the CPU circuit module;
the threshold output circuit is connected with the CPU circuit module and is configured to convert the voltage signal into a high level and a low level CPU _ TH and output the high level and the low level CPU _ TH to a GPIO pin of the CPU circuit module; when the battery voltage is too low due to insufficient battery power, outputting a low level to a GPIO pin of the CPU;
the LDO power supply circuit is connected with the threshold output circuit and the CPU circuit module, and is configured to provide power for the CPU circuit module and provide a comparison reference for the threshold output circuit;
the CPU circuit module is connected with the analog output circuit, the threshold output circuit and the LDO power circuit, and is configured to measure the converted voltage signal, convert the current battery voltage and the residual capacity and generate a low-capacity alarm.
Optionally, battery voltage acquisition circuit includes first battery, first resistance and third resistance, first battery is surveyed the battery, the positive end of first battery is connected with the first end of first resistance, the second end of first resistance parallel connection have the first end of third resistance with battery voltage acquisition circuit's output, the second end of third resistance is connected with the negative terminal of first battery, first resistance and third resistance are for establishing ties.
Optionally, the analog output circuit includes a second chip, a second resistor, a fourth resistor, and a battery voltage VBAT, where pin 3 of the second chip is configured to input a voltage signal, pin 8 of the second chip is connected to the battery voltage VBAT, pin 4 of the second chip is connected to ground, pin 2 of the second chip is connected to pin 1 of the second chip, pin 1 of the second chip is further connected to a first end of the second resistor, a second end of the second resistor is connected to a first end of the fourth resistor and an AD input pin of the CPU circuit module, and a second end of the fourth resistor is connected to ground.
Optionally, the threshold output circuit includes a second chip, a fifth resistor, a sixth resistor and a power VCC _3V3, the 5 pins of the second chip are configured as input voltage signals, the 6 pins of the second chip are connected with the power VCC _3V3, the 7 pins of the second chip are connected with the first end of the fifth resistor, the second end of the fifth resistor is connected with the first end of the sixth resistor and a GPIO input pin of the CPU circuit module, and the second end of the sixth resistor is connected to ground.
Optionally, the LDO power supply circuit includes first chip, first electric capacity, second electric capacity and power VCC _3V3, 3 feet of first chip are connected with battery voltage VBAT, 1 foot of first chip is connected to ground, 2 feet and 4 feet of first chip are connected with power VCC _3V3 jointly, the first end of first electric capacity is connected with battery voltage VBAT, the second end of first electric capacity is connected to ground, the first end of second electric capacity is connected with power VCC _3V3, the second end of second electric capacity is connected to ground.
This application is so realized, use battery voltage acquisition circuit to convert the battery voltage into lower voltage signal, voltage signal is carried for analog output circuit and threshold value output circuit simultaneously, analog output circuit carries the analog-to-digital conversion pin to CPU circuit module with the signal, threshold value output circuit carries voltage signal to CPU circuit module's GPIO pin, LDO power supply circuit provides CPU circuit module's power and threshold value output circuit's threshold value reference.
According to the technical scheme, the battery power detection circuit applied to the electric energy quality device comprises a battery voltage acquisition circuit, an analog output circuit, a threshold output circuit, an LDO power supply circuit and a CPU circuit module, wherein the battery voltage acquisition circuit comprises a battery to be detected and two resistors and is connected with the analog output circuit and the threshold output circuit; the analog output circuit is connected with the CPU circuit module and is configured to follow and reduce the voltage signal and output a signal CPU _ AD to an analog-to-digital conversion pin of the CPU circuit module; the threshold output circuit is connected with the CPU circuit module; the LDO power supply circuit is connected with the threshold output circuit and the CPU circuit module.
The utility model provides a purpose provides a battery power detection circuitry for power quality device, aims at realizing the battery power detection of device, uses two kinds of modes to detect battery power simultaneously for detect reliable and stable. The application is used for using the electric energy quality device of the built-in battery, and has the following advantages: the battery capacity information is acquired by adopting a dual way, the battery low capacity warning function is realized, and the battery overdischarge can be effectively prevented.
Detailed Description
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following examples do not represent all embodiments consistent with the present application. But merely as exemplifications of systems and methods consistent with certain aspects of the application, as recited in the claims.
Referring to fig. 1, a schematic diagram of a battery power detection circuit applied to a power quality device includes: a battery voltage acquisition circuit 1, an analog output circuit 2, a threshold output circuit 3, an LDO power supply circuit 4 and a CPU circuit module 5, wherein,
the battery voltage acquisition circuit 1 comprises a battery to be tested and two resistors, the battery voltage acquisition circuit 1 is connected with the analog output circuit 2 and the threshold output circuit 3, and the battery voltage acquisition circuit 1 is configured to convert the battery voltage into a voltage signal and transmit the voltage signal to the analog output circuit 2 and the threshold output circuit 3;
the analog output circuit 2 is connected with the CPU circuit module 5, and the analog output circuit 2 is configured to follow and reduce the voltage signal and output a signal CPU _ AD to an analog-to-digital conversion pin of the CPU circuit module 5;
the threshold output circuit 3 is connected with the CPU circuit module 5, and the threshold output circuit 3 is configured to convert the voltage signal into a high-low level CPU _ TH and output the high-low level CPU _ TH to a GPIO pin of the CPU circuit module 5; when the battery voltage is too low due to insufficient battery power, outputting a low level to a GPIO pin of the CPU;
the LDO power circuit 4 is connected with the threshold output circuit 3 and the CPU circuit module 5, and the LDO power circuit 4 is configured to provide power for the CPU circuit module 5 and provide a comparison reference for the threshold output circuit 3;
the CPU circuit module 5 is connected with the analog output circuit 2, the threshold output circuit 3 and the LDO power circuit 4, and the CPU circuit module 5 is configured to measure the converted voltage signal, convert the current battery voltage and the residual capacity, and generate a low-capacity alarm.
Further, battery voltage acquisition circuit 1 includes first battery, first resistance and third resistance, first battery is surveyed the battery, the positive end of first battery is connected with the first end of first resistance, the second end of first resistance parallelly connected have the first end of third resistance with battery voltage acquisition circuit 1's output, the second end of third resistance is connected with the negative terminal of first battery, first resistance and third resistance are for establishing ties.
The battery voltage acquisition circuit 1 is a voltage division circuit, the voltage division principle of the voltage division circuit means that in a series circuit, currents on all resistors are equal, and the sum of voltages at two ends of all resistors is equal to the total voltage of the circuit.
The battery voltage acquisition circuit 1 divides the voltage of the battery BAT1 by using R1 and R3, and converts the battery level signal into a voltage signal.
Further, the analog output circuit 2 includes a second chip, a second resistor, a fourth resistor and a battery voltage VBAT, pin 3 of the second chip is configured to input a voltage signal, pin 8 of the second chip is connected with the battery voltage VBAT, pin 4 of the second chip is connected to ground, pin 2 of the second chip is connected to pin 1 of the second chip, pin 1 of the second chip is further connected with a first end of the second resistor, a second end of the second resistor is connected with a first end of the fourth resistor and an AD input pin of the CPU circuit module 5, and a second end of the fourth resistor is connected to ground.
The analog output circuit 2 is a follower circuit of an operational amplifier. The operational amplifier is a circuit unit with very high amplification factor, an amplifier with a special coupling circuit and feedback, in an actual circuit, a feedback network is usually combined to form a certain functional module, and an output signal of the operational amplifier can be a result of mathematical operations such as addition, subtraction, differentiation and integration of an input signal. An op-amp is a circuit element named from a functional point of view, which may be implemented by discrete devices or in a semiconductor chip. The following circuit of the operational amplifier plays roles of buffer amplification, isolation and impedance conversion, namely small-amplitude current amplification, isolation and further output impedance reduction by utilizing the high common mode rejection ratio of the operational amplifier, and load carrying capacity is improved.
The analog output circuit 2 comprises a general operational amplifier and two resistors, and scales and transmits the voltage signal to an analog-to-digital conversion pin of the CPU circuit module 5.
Further, the threshold output circuit 3 includes a second chip, a fifth resistor, a sixth resistor and a power VCC _3V3, the 5 pins of the second chip are configured as input voltage signals, the 6 pins of the second chip are connected with the power VCC _3V3, the 7 pins of the second chip are connected with the first end of the fifth resistor, the second end of the fifth resistor is connected with the first end of the sixth resistor and the GPIO input pin of the CPU circuit module 5, and the second end of the sixth resistor is connected to the ground.
The threshold output circuit 3 is an open-loop amplifier circuit of an operational amplifier, in order to output stably, the operational amplifier generally introduces a signal at an output end to feed back to an input end, which is called a closed loop, so that a small part of gain is not output but returns to the input end, and the open loop means that the gain without feedback is all output to a load.
The threshold output circuit 3 comprises a general operational amplifier and two resistors, and converts a voltage signal into a high level and a low level and transmits the high level and the low level to a GPIO pin of the CPU circuit module 5.
Further, LDO power supply circuit 4 includes first chip, first electric capacity, second electric capacity and power VCC _3V3, 3 feet of first chip are connected with battery voltage VBAT, 1 foot of first chip is connected to ground, 2 feet and 4 feet of first chip are connected with power VCC _3V3 jointly, the first end of first electric capacity is connected with battery voltage VBAT, the second end of first electric capacity is connected to ground, the first end of second electric capacity is connected with power VCC _3V3, the second end of second electric capacity is connected to ground.
The LDO power supply circuit 4 is a circuit that generates VCC _3V3 power, and implements voltage conversion from VBAT to 3.3V. 3V3 is 3.3V, and since some software considers the use of dots in the network name to be illegal due to unclear dot printing, 3.3V is also often labeled VCC _3V3, VDD, etc., and VCC _3V3A is also commonly used to represent 3.3V analog power supplies, etc.
The LDO power supply circuit provides power for CPU circuit module 5 and a threshold reference for threshold output circuit 3.
Referring to fig. 2, a schematic diagram of a module structure of a battery power detection circuit applied to an electric energy quality device includes a battery voltage acquisition circuit 1, an analog output circuit 2, a threshold output circuit 3, an LDO power circuit 4, and a CPU circuit module 5. Battery voltage acquisition circuit 1 converts battery power into voltage signal and carries to analog output circuit 2 and threshold value output circuit 3, analog output circuit 2 carries the analog-to-digital conversion pin of CPU circuit module 5 after zooming with voltage signal, threshold value output circuit 3 converts voltage signal into the GPIO pin that high-low level carried to CPU circuit module 5, LDO power supply circuit 4 provides CPU circuit module 5's working power supply and threshold value output circuit 3's reference standard.
In this embodiment, the battery voltage collecting circuit 1 divides the voltage of the battery BAT1 by using R1 and R3, the divided voltage output is connected to 3 pins of a general operational amplifier U2A of the analog output circuit 2 and 5 pins of a general operational amplifier U2B of the threshold output circuit 3, 2 pins and 1 pin of a general operational amplifier U2A of the analog output circuit 2 are connected, 1 pin output of the general operational amplifier U2A is divided by R2 and R4 and then fed to an analog-to-digital conversion pin of the CPU circuit module 5, 6 pins of a general operational amplifier U2B of the threshold output circuit 3 are connected to a power VCC _3V3, 7 pin output of the general operational amplifier U2B is divided by R5 and R6 and then fed to a GPIO pin of the CPU circuit module 5, 3 pin of a LDO chip U48 of the LDO power supply circuit 4 is connected to a battery voltage VBAT, 1 pin of the LDO chip is grounded, 2 pin/4 pin of the LDO chip is connected to a power supply VCC _3V3, and a bypass capacitor U1 and a bypass capacitor pin of the LDO chip is connected in parallel with the LDO chip 1, the C2 is used as a bypass capacitor and is connected in parallel with pins 2/4 and pin 1 of the LDO chip U1.
The battery voltage acquisition circuit 1 converts the battery power into a voltage signal, and since the battery power and the battery voltage are approximately in a linear relationship, the battery power can be known only by measuring the battery voltage, the battery voltage is applied to the resistors R1 and R3, and after voltage division, the output of the circuit is V1 ═ VBAT × R3/(R1+ R3).
The analog output circuit 2 is a follower circuit of an operational amplifier, the voltage of the output pin 1 of the operational amplifier U2A is equal to the voltage of the input pin 3 of the positive terminal of the operational amplifier U2A, the output voltage of the operational amplifier U2A is applied to R2 and R4, and after the voltage division by R2 and R4, the output of the circuit is V2-V1-R4/(R2 + R4).
The threshold output circuit 3 is an open-loop amplifying circuit of an operational amplifier, the output voltage of the operational amplifier U2B outputs 0V or VBAT along with the voltage difference between the positive terminal input and the negative terminal input, when the input pin 5 voltage of the positive terminal of the operational amplifier U2B is greater than the input pin 6 voltage of the negative terminal of the operational amplifier U2B, the output pin 7 voltage of the operational amplifier U2B is VBAT, when the input pin 5 voltage of the positive terminal of the operational amplifier U2B is less than the input pin 6 voltage of the negative terminal of the operational amplifier U2B, the output pin 7 voltage of the operational amplifier U2B is 0V, the output pin U2B is divided by resistors R5 and R6 and converted into TTL level to be transmitted to the GPIO pin of the CPU circuit module 5.
The LDO power supply circuit 4 is a circuit for generating a VCC _3V3 power supply, realizes voltage conversion from VBAT to 3.3V, and has pins 3 and 1 of the LDO chip as VBAT voltage input, pins 2/4 and 1 of the LDO chip as 3.3V voltage output, and the output of the circuit provides working voltage for the CPU circuit module 5 and provides reference voltage for the threshold output circuit 3.
In summary, the battery voltage acquisition circuit 1 converts the battery capacity signal into a voltage signal as the input of the analog output circuit 2 and the threshold output circuit 3, the analog output circuit 2 scales the voltage signal as the input of the analog-to-digital conversion pin of the CPU, the threshold output circuit 3 converts the voltage signal into a level signal as the input of the GPIO pin of the CPU, and the LDO power supply circuit 4 provides a working voltage and a reference for the CPU and the threshold output circuit 3, so that the battery capacity detection circuit of the present application has the following advantages in the power quality device: the battery electric quantity information is obtained by using a low-cost device through a dual way, and the battery overdischarge can be effectively prevented by using a battery low-electric-quantity warning function.
The technical scheme is as follows: the utility model provides a be applied to battery power detection circuitry of power quality device, battery voltage acquisition circuit 1 is including being surveyed battery and two resistances, analog output circuit 2 includes that a general fortune is put and two resistances, carries the analog-to-digital conversion pin of CPU circuit module 5 with voltage signal scaling, threshold output circuit 3 includes that a general fortune is put and two resistances, converts voltage signal into the GPIO pin that high-low level carried to CPU circuit module 5, LDO power supply circuit provides CPU circuit module 5's power and threshold value output circuit 3's threshold value reference.
When the power quality device normally works, the outputs of the battery voltage acquisition circuit 1 and the analog output circuit 2 are transmitted to an analog-to-digital conversion pin of the CPU circuit module 5, the CPU circuit module 5 can complete the voltage measurement after conversion and convert the current battery voltage, because the battery voltage and the battery power can be close by a linear function, the residual power of the current battery can be converted by the current battery voltage, the threshold output circuit 3 is used as a threshold warning output, when the battery voltage is too low due to insufficient battery power, a low level is output to a GPIO pin of the CPU circuit module 5, and the CPU circuit module 5 can process low power warning in time.
The application provides a pair of be applied to battery power detection circuitry of electric energy quality device for use the electric energy quality device of built-in battery, including battery voltage acquisition circuit 1, analog output circuit 2, threshold output circuit 3, LDO power supply circuit 4 and CPU circuit module 5, battery voltage acquisition circuit 1 converts battery voltage into lower voltage and carries to analog output circuit 2 and threshold output circuit 3, analog output circuit 2's output is connected to CPU circuit module 5's analog-to-digital conversion AD pin, threshold output circuit 3's output is connected to a GPIO pin of CPU circuit module 5, LDO power supply circuit 4 also is as threshold output circuit 3's input when for CPU circuit module 5 supplies power, CPU circuit module 5 has two inputs simultaneously, thereby make this battery current detection circuitry have following advantage: the battery capacity information is acquired by adopting a dual way, the battery low capacity warning function is realized, and the battery overdischarge can be effectively prevented.
While there have been shown and described what are at present considered the fundamental principles and essential features of the application, and advantages thereof, it will be apparent to those skilled in the art that the application is not limited to the details of the foregoing exemplary embodiments, but is capable of other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
The embodiments provided in the present application are only a few examples of the general concept of the present application, and do not limit the scope of the present application. Any other embodiments extended according to the scheme of the present application without inventive efforts will be within the scope of protection of the present application for a person skilled in the art.