Hello I'm working on a Portable project that is running off of a Double AA Battery. using a Boost converter to 3.3v for a arduino pro mini. My project almost complete. How ever i would like to monitor the battery state of it's voltage. Couple of problems I'm facing. One is i can not connect it to the Boost converter because it will always output 3.3v so it will always say 100% charge. So how to do i connect it to the battery without drawing a lot of power because it is a AA battery? Second thing I'm trying to use what i got here and not be ordering more and more parts. Sense this is a one time project of mine I don't want to add more cost to it. Can someone please help me out? Thank you.
Read the input to the boost converter, not it's output.
Analog input only draws 1uA, that won't drain the battery.
Hello crossroads thank you for that information. Right now it goes AA battery to boost converter from boost converter to the Pro mini board. Now there is a common ground between them so that is okay. So if i put a voltage divider and bring it down to the 1.5v that might work. But wouldn't that Eat a lot of power Or not? Right now i can not buy ant new parts for a while so I'm trying to use what i got. I have resistors caps and some other parts.
Just connect the battery to an analogue pin via a 10k resistor.
The resistor is for safety in case the 3.3volt on the ProMini is missing.
This is possible, because battery voltage in this case is lower than Arduino's supply.
There is no extra current draw from the battery, because there is no voltage divider.
A/D value will be about 310 if the battery is 1volt.
Leo..
Hello Leo thank you. a 10k resistor will be added. Most of the time it is in sleep most so won't draw any current only for about 1 to 2 seconds it will be awake at a time.
josephchrzempiec:
Hello Leo thank you. a 10k resistor will be added. Most of the time it is in sleep most so won't draw any current only for about 1 to 2 seconds it will be awake at a time.
I think you mean the Arduino is in sleep most of the time. Unless you have a more expensive DC-DC module that I use (I am so cheap, about $0.50 on AliExpress) these units are only about 95% efficient on good day. So, you are always wasting some battery energy even if the Arduino is sleeping. Again, there are DC-DC units that understand loading and are far more efficient when the load is sleeping, but the bottom line is that Vcc must be present on the output all of the time and this process is not 100% efficient.
Ray
Hi josephchrzempiec,
Have a look on this board: Whisper Node - AVR - Wisen, it has designed to run from AA batteries as well (single or double) and counts with two voltage dividers to monitor the Battery and Power Supply inputs.
As rule of thumb, when you setup a voltage divider you always going to have some current flowing to ground as you basically have two resistors in series connected from VCC to GND. The first important thing is to get some larger resistors, well over 100K. You can find some details here: Bitbucket
Additionally, for the board I mentioned above, it counts with a N+P mosfet circuit for the Battery's voltage divider, working as a high-side switch. In this case the current only flow through the voltage divider when you enable the switch via a Digital Pin, which you only do before performing an Analog Read. This helps preserving the battery energy and reducing the overall current consumption of the board.
For low-power circuits, every detail counts, and can be very tricky finding all those little current leaks.
For low power circuits that sleep most of the time, a boost converter is a bad idea. It will waste a large amount of power.
Instead use two AA cells and run the Pro Mini on 3V, 8MHz clock speed. Remove the regulator on the Pro Mini board, and power it via the Vcc pin. Those batteries could last for years.
The problem is that after while the battery voltage starts to drop...
Alkaline cells finish their life with as little as 0.8v . If you drain down to 1.2v only for example (2.4v a pair), you'll be discarding around 1/3 of the battery capacity. Also many devices and sensors don't like to run at low voltage.
Sure, if you can run everything from 3.2V down to 1.8V, a regulator might not be necessary... Just run at low speeds: 4MHz should be OK for an AtMega328p.
Another option is to use non-recheageable Lithium cells as only 10% of the capacity lived below 1.2V... they're just a bit more expensive to run.
Hello right now I been running this setup for almost 5 months and I'm at 1.387v as my meter is telling me. I would think the boost converter is not a problem. Problem I'm having is monitoring that voltage using the example analog voltage sketch. Reason is that the Pro mini was programmed and setup for 5v and it is running at 3.3v. And when the pro mini wakes up and displays the voltage it says 4.36v which is in correct because i think the reference is also off.
Maybe I'm wrong about some of this or all of it. But this is what i got to work with. I can not go out and buy new parts at the moment. So I'm stuck with what i got to use.
Connect the battery the way I told you in post#3.
Then this maths line will display the right voltage.
It assumes that the battery is connected to A0, and the voltage of the boost converter (and Aref) is 3.3volt.
float voltage = (analogRead(A0) * 3.3) / 1024;
Calibrate by changing 3.3 slightly, e.g. 3.36 or 3.27.
Leo..
Hello Leo honestly i didn't understand it my apologies. I will do that. first change i get. i was thinking of that as well.
Hello wawa I have a question. The aref pin that is on the uno board is not broken out of the pro mini board. Not sure what to do for that?
Try using the internal bandgap reference of 1.1V instead. Scale down your input signal accordingly.
Hello crossroads Funny you was talking about internal reference i was looking around online on this subject and found This.
It was used for a mega 2560 but i think i can adapt it for my pro mini
I think it's not wise to use 1.1volt Aref in this case.
Because your battery is normally higher than 1volt.
If you do want to use 1.1volt Aref, then you have to use a voltage divider to drop e.g. 1.5volt to 1volt. And that voltage divider uses some current.
Default Aref is the supply voltage (~3.3volt).
The battery can be connected directly (via 10k resistor) to the pin (no divider, no current draw).
Default Aref (= boost converter voltage) is likely good enough to measure the state of a battery.
Leo..