Pages: [1]   Go Down
Author Topic: How to calculate for how long a battery will last with Arduino code  (Read 525 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got my Arduino Uno powered from a 3.7V battery, when I connect the Arduino to the battery the voltage from the battery drops from 3.70 to 3.69 being 0.01V of total drop.

I'm currently measuring the volts of the battery powering the Arduino with the Arduino itself. The reason is for when the battery drops to 3.0V an alarm triggers.

So, I already got the input battery voltage. How can I then calculate for how long the battery is going to last?
What other type of information/measures I need to get a 'X time left to 3.0V' ? Perhaps is only math from here?

In addition (just a note), I want the Arduino for example to calculate how long is going to last from 3.7V to 3.0V because I don't want my Arduino running lower than 3.0V.

Thanks!
Feel free to leave any questions!
« Last Edit: May 11, 2013, 07:08:27 pm by Pringles » Logged

Offline Offline
God Member
*****
Karma: 25
Posts: 526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have access to an ammeter?  If you want a good idea how much current YOUR project is drawing, go down to Harbor Freight Tools and buy a $5 multimeter.

That being said, the tests have been done by others.  If your project is similar, you could at least get a good idea.

http://www.gammon.com.au/power
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have access to an ammeter?  If you want a good idea how much current YOUR project is drawing, go down to Harbor Freight Tools and buy a $5 multimeter.

Yes, I have a multimeter. I've have measure the voltage drop of the battery when I connect Arduino and it's from 3.70V to 3.69V dropping only 0.01V.
Now that I know how much my complete project drops, what do I do next?
P.S. I edited the post above with more specific details. Thanks! 
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well you need two pieces of information to estimate or calculate the duration from the battery. First is the mAH rating specification of your battery cell and second the current consumption drawn by your arduino. You do this second reading using your meter in it's current reading function (in series) not by reading the battery voltage with the meters voltage reading function.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well you need two pieces of information to estimate or calculate the duration from the battery. First is the mAH rating specification of your battery cell and second the current consumption drawn by your arduino. You do this second reading using your meter in it's current reading function (in series) not by reading the battery voltage with the meters voltage reading function.

Lefty

My battery mAH is 1400 and 3.7V.
How do I know how much current consumption is my Arduino drowning*?
Assuming that I got those two pieces of information, what would be the arithmetic/math?

Thanks!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26287
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to measure the current draw using your ammeter.
Don't forget to start with the highest current range first,
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
God Member
*****
Karma: 25
Posts: 526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There should be a setting on your multimeter that measures milliamps.  If your meter is like mine, it's labeled DCA.  You have to wire the multimeter in series with the battery and the Arduino.  Then you turn it on and watch the meter while it runs.

Make sure you're reading in milliamps.  Once you get a reading, it is pretty simple Math.  Milliamp-hours / milliamps = hours.  If it gives you 50 milliamps, hours would be 1400/50 = 28 hours.

How that works until 3.0 volts depends on what kind of battery it is.  If it is Lithium Ion, 3.0 volts is pretty much at the end of its range.

http://johndayautomotivelectronics.com/battery-management-design-for-high-power-lithium-battery-stacks/
Logged

Pages: [1]   Go Up
Jump to: