How does the battery level detection work?

Updated on technology 2024-06-10
3 answers
  1. Anonymous users2024-02-11

    With the inverse algorithm, the AD reference reference is set to the power supply VDD, and the forward voltage drop of the diode is measured, and the power supply voltage is calculated backwards, which is the lowest cost.

    vdd/vf=1024/ad

    vdd=1024*vf/ad

    In the above equation, vf = the forward voltage drop of the diode is basically constant.

    VDD = supply voltage.

    AD--- AD sampled value.

    The general way to measure the power supply voltage is to use one pin of the PIC as the reference voltage input, connect an external reference such as TL431, and use the other pin to measure the power supply voltage after voltage division, which is of course the easiest way to achieve.

    Here is the method of using only one AD pin to measure the VDD of the MCU power supply

    vi=ad*vdd/1024

    However, the battery power supply VDD is unstable, which is exactly what we measure, so can we let the VI remain unchanged as a reference voltage and calculate the power supply VDD? In fact, it is doable. We measure a fixed voltage vi with one pin, so that we can deduce:

    vdd=vi*1024/ad

    We can find all kinds of fixed voltage devices, voltage regulators, reference power supplies, etc. Accuracy can be guaranteed with a single diode as long as 4 bars of power supply are displayed. If the forward voltage drop of the diode used is, the above equation can be written as:

    vdd=717/ad

    This implements the method of measuring the power supply with one pin.

    The above-mentioned method is only effective for the PIC microcomputer that is directly powered by the battery, and the above-mentioned method cannot be used for the single-chip microcomputer after voltage stabilization. I haven't tried other microcontrollers.

  2. Anonymous users2024-02-10

    Do you mean batteries? It is detected according to the differential voltage of the voltage.

  3. Anonymous users2024-02-09

    There are usually two ways to test whether the power of ordinary zinc-manganese dry batteries is sufficient. The first method is to estimate the internal resistance of the battery by measuring the instantaneous short-circuit current of the battery, and then judge whether the battery is sufficient; The second method is to use an ammeter to connect a resistor with an appropriate resistance value in series, and calculate the internal resistance of the battery by measuring the discharge current of the battery, so as to judge whether the battery is sufficient. The biggest advantage of the first method is that it is simple, and the power of the dry battery can be directly judged by the high current of the multimeter, and the disadvantage is that the test current is very large, far exceeding the limit value of the allowable discharge current of the dry battery, which affects the service life of the dry battery to a certain extent.

    The advantage of the second method is that the test current is small, the safety is good, and it generally does not have a bad impact on the service life of the dry battery, and the disadvantage is that it is more troublesome. The author used MF47 multimeter to test and compare a new No. 2 dry cell and an old No. 2 dry cell with the above two methods. Assuming that RO is the internal resistance of the dry cell and RO is the internal resistance of the ammeter, when using the second test method, RF is the additional series resistance, the resistance value is 3, and the power is 2W.

    The measured results are as follows. The new No. 2 battery E = measured with DC voltage gear), the internal resistance of the voltmeter is 50K, which is much greater than RO, so it can be approximated as the electromotive force of the battery, or the open-circuit voltage. When using the first method, the multimeter is set to 5A DC current gear, the internal resistance of the meter RO=, and the measured current is.

    So ro+ro=,ro=. When using the second method, the measured current is , RF+RO+RO=, and the internal resistance of the current 500mA is , so RO=. When the old No. 2 battery is measured by the first method, the open-circuit voltage e=, the internal resistance of the meter RO=6, and the reading is, the multimeter is set to 50mA DC current gear, RO+RO=, RO=.

    In the second method, the measured current is , RO+RO+RF=, RO=. Obviously, the results of the two test methods are basically the same. The slight difference in the final calculation result is caused by many factors such as reading error, resistance RF error, and contact resistance, and this small error does not affect the judgment of battery power.

    If the capacity of the battery under test is small and the voltage is high (e.g., 15V, 9V tandem battery), the resistance of the RF should be increased adaptively. When the old No. 2 battery is measured by the first method, the open-circuit voltage e=, the internal resistance of the meter RO=6, and the reading is, the multimeter is set to 50mA DC current gear, RO+RO=, RO=. In the second method, the measured current is , RO+RO+RF=, RO=.

    Obviously, the results of the two test methods are basically the same. The slight difference in the final calculation result is caused by many factors such as reading error, resistance RF error, and contact resistance, and this small error does not affect the judgment of battery power.

Related questions
13 answers2024-06-10

The dangerous area intrusion detection system is based on intelligent analysis and automatically analyzes and identifies image information without manual intervention; Timely detect the entry and intrusion of personnel in the monitoring area, give early warning in the fastest and best way, effectively assist management personnel to deal with it, and minimize false alarms and false negatives; At the same time, you can also view the on-site video, which is convenient for post-event management and inquiry.

6 answers2024-06-10

My current ideal is to want you and my answers, so I want you, and only by taking action can I realize my ideal.

13 answers2024-06-10

Personally, I think it should be a unified empire, and the Yuan Dynasty is the largest dynasty in Chinese history. According to the map of the Yuan Dynasty in middle school history textbooks, the territory of the Yuan Dynasty stretched from Sakhalin Island and the Sea of Japan in the east, to the South China Sea in the south, to the Tianshan Mountains in the west, and to the Arctic Ocean in the north, with a total area of more than 20 million square kilometers.

8 answers2024-06-10

Saliva sampling and testing method is more convenient, fast and easy to operate. The process is as follows: >>>More

6 answers2024-06-10

To identify how to be a mobile phone, it's very simple. There are a lot of refurbished machines on the market right now, but you have to pay attention. Refurbished machine,It's rare to be able to match three yards.。。 >>>More