How would you configure the ADC for 2 cell low battery

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Consider that the 2 cells could be alkaline or NiMH and that they will be fed to a boost regulator that pushes them up to 3.3V.  A fully fresh alkaline pair could also be 3.3V (1.65V each) and alkalines are generally considered dead at 0.8V, but some of the discharge graphs I've seen show a pretty significant bend at 1.0 or 1.1 even.

 

One way is to use AVCC for the reference and feed the battery voltage into ADC0, value 1023 would be 3.3V, value 511 would be 1.65V, but what value to use?  Would I need to have an option to configure different values for Alkaline vs. NiMH ?

 

What about feeding the regulated voltage into ADC0 via a voltage divider and use the internal 2.56V?  Then look for the regulated voltage to start dropping below 3.3V to some degree.  Would that be workable and not require a setting for Alkaline/NiMH?

 

I'm probably going to be using an ATMEGA1284.  The datasheet says the 2.56V is roughly +/- 9% accurate which doesn't sound that great which is why I was thinking of just feeding the battery voltage in against AVCC, but then again, if AVCC starts to fall below 3.3V, that will overstate the battery voltage...

 

An other ideas?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to monitor batteries, a good, precise, reference is needed somewhere.  Being off 100-200mv can put you over the cliff.  The internal ref is stable, but sadly, not very accurate...Of course you can cal it unit-by-unit & store some factors in the EEPROM (if avail)...this could simply be a trip value.

Sometimes using a precise Vreg, works just as well.  Perhaps you only want to monitor beginning of the ending---some regulators/converters will have a power "good"  monitor that flags when things are beginning to drift away from the desired Vout setpoint.

 

Any batt voltage divider wastes power (not sure if these are coin cells or coke can size batteries)...so that can be a concern.  A micropower opamp, allows higher ohm dividers to be used (plus the opamp power!).

There are schemes to turn the divider gnd on/off with a fet....so it is only on rarely to take a voltage sample. 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just really looking for a low battery indicator, say less than 15-20% of power left.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just really looking for a low battery indicator, say less than 15-20% of power left.

 If it's just a friendly indicator, accidentally being slightly off is not quite as bad as accidental shutdown...of course it could go the other way & miss letting you know the end is near.  Again, you need some decent accuracy, especially for any non-linear cells, having sudden drop curves.   Alkalines fall can be somewhat linear over a wide range at low discharge rates.  However, remember an efficient switcher drives a constant power load, so as the voltage falls, the current goes up...up. up---which steepens any Vdrop "cliff"

 

Also, driving a switcher when the battery is weak will generate a lot of batt voltage bounce around...so some smarts/filtering is needed by your detection scheme.  If the unit switches off automatically, the voltage recovers ...maybe the unit then sees plenty of voltage, turns on, & then back off in an endless cycle...smart software is needed here!
 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Keep in mind that your Battery remaining level is dependent on the load.

If you know when you have a high load you have to see that you can during that time do a couple of measurements.

If they go below your threshold then you have empty batteries.

 

We just say that batteries are empty when you go below 1.1V cell voltage. Rechargable batteries are not really empty then, but most AAA cells at that point get into trouble when you add a high load.

The biggest problem is that you just do not know what batteries are inserted, so you have to go for worst case.

I asume your SMPS can operate full load at 1.8V input voltage as load spikes might cause large dips on the battery output. That is what bit us in the past.

batteries at basic 1.3V start the system and it would crash as we just flipped the switch and turned everything on at once. it cause a heavy current spike on the system causing the batteries to just simply drop below 1V causing the SMSP to no longer be able to regulate. It took us a while to figure that out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alank2 wrote:
One way is to use AVCC for the reference and feed the battery voltage into ADC0

...

...

if AVCC starts to fall below 3.3V, that will overstate the battery voltage...

I did just that on one of my projects but won't be doing it again, it was unreliable for the reason you stated.

 

The silly reality is that most modern boost converters have a much better reference than most AVRs. (... I just checked AVR again; ±9% accuracy, a respectable 50ppm tempco above freezing but a laughable 450ppm below freezing).  Unfortunately for fixed O/P voltage regulators you usually can't get to the reference.

 

If you're doing any automated tests then calibrating the measurement during test is the way to go. An alternative being two resistors, a cap and a spare analogue pin to autocal it.

 

Last Edited: Tue. Jul 23, 2019 - 10:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cells will be AA, power will be physically switched on/off.  Current probably 50-150mA most of the time, maybe 200mA not so often.  I think it might be tolerable for it to run even down to 2.7V, so perhaps the output of the boost reg could be what is watched and not the battery voltage.  I don't want to add more parts except maybe a simple voltage divider like 10K+20K.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't want to add more parts

Some devices will have a status flag that shows the output voltage is deviating too much from the setpoint (no longer controllable)...maybe that would suit you well. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alank2 wrote:
Cells will be AA, power will be physically switched on/off.  Current probably 50-150mA most of the time, maybe 200mA not so often.

At that current draw your looking at 10 - 20 hrs of operation, with the alkaline having the longer duration.  Perhaps it would be easier to measure up time rather then measure the cell voltage.

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

Last Edited: Tue. Jul 23, 2019 - 02:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Current probably 50-150mA most of the time, maybe 200mA not so often

What current?  You probably mean load current.  However as the Vbatt falls, battery current will rapidly increase.   A 12V pack, that is down to 9V would see a 33% increase.  Going down to 4V, would see a 200% increase.  Of course this brings about the ending that  much quicker, so the practical effect may be going to a lower cutoff  voltage barely increased run time.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!