Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Single AA Battery Low Detection

Status
Not open for further replies.
I had a problem like this on a (different) PIC where the supply was not well-regulated (it didn't need to be!) and I used a bandgap voltage reference diode - essentially a 1.2 volt Zener, although they come in different voltages and are well-behaved with respect to temperature. It was connected like a Zener, with a resistor at the "top" end but the "bottom" end of this diode was connected to an I/O input of the PIC that, when not in use, was set high so that the diode did not conduct current, reducing battery drain. The problem with these devices is that they are not necessarily "dirt cheap."

In theory, one could use an ordinary diode for this, but these drift all over the place with temperature. Similarly, a cheap, old-fashioned "dim" red LED will have a fairly consistent voltage drop as well (1.8 volts or so, varying with the device) - a bit less temperature dependent than a normal diode, but still pretty bad - but it may be "good enough." (And before anyone asks, no, it won't be affected by ambient light by more than a couple A/D counts...)

Knowing the voltage across the diode, an A/D reading was made of this diode, then an A/D reading made of the voltage source and the actual voltage of that source determined ratiometrically.

Many newer PICs (but not the one that you chose - at least as far as I can tell from a quick review of the data sheet) have these bandgap references built into them already, to allow one to do exactly this, saving the need to tie up a few I/O pins in the process!
 
Last edited:
Many newer PICs (but not the one that you chose - at least as far as I can tell from a quick review of the data sheet) have these bandgap references built into them already, to allow one to do exactly this, saving the need to tie up a few I/O pins in the process!

The 18F1220 does have a 1.2V reference built in for the LVD. Chapter 18 of the data sheet.
 
From what I can tell from the data sheet, the PIC18F1220's 1.2 volt reference is not accessible to the user in any direct way - that is, it cannot be routed to an A/D input for a ratiometric reading.

If one wants to read the output voltage of the converter, the LVDIN could be useful, but if the stated intent is to detect when the voltage of the single AA/AAA cell powering the entire device is <= 1.25 volts, I don't see how the LVD helps: As noted in a previous posting its range (1.99V-5.15V) is wholly outside the range of a single typical Alkaline/NiMH cell.

True enough, the output of the boost converter will start to sag when its input voltage gets low, but this is a bit of a "cheesy" way to ascertain a cell's voltage as this will vary tremendously with the load on the converter's output once it drops out of regulation, also varying with temperature of the device itself and unit-to-unit variation.

One possible point of concern of measuring accurately is that if the cell's voltage is too low when the converter starts to drop out, there is the chance that it will be unable to reliably start again, once powered down, if called on to do so as the voltage of the cell decreases and its impedance increases, but this may not be of critical importance in this application: A cell voltage of 1.25 volts (for Alkaline) represents a reasonably healthy amount of remaining energy/low impedance whereas 0.9 volts does not.
 
HI, i found this clever little circuit helped me with a similar project, cause a diode always stays at 0.7v, but beware as vcc goes down adc goes up!
Also i forget what i used for R1, somewhere between 1-10k i think
 

Attachments

  • Document (3).pdf
    7.7 KB · Views: 185
upload_2015-4-15_21-51-51.png


I use a sawtooth to represent a battery from 1 to 1.6V and set the threshold with Rb ratio to just below 1.2V

How do you want to indicate ok?
 

Attachments

  • upload_2015-4-15_21-51-19.png
    upload_2015-4-15_21-51-19.png
    86 bytes · Views: 169
Status
Not open for further replies.

Latest threads

Back
Top