Hi,
I have no real idea of how to tackle that subject so i would like to ask you how this is doable - if at all.
I plan to attach my arduino on a battery and as it is a rechargeble one i would like to track its power status somehow (like 89% full etc).
Is there some way this is at all doable?
Yes, it's doable. Batteries tend to change in voltage as they discharge. A fully charged lead acid 12V might actually be about 13.4V. As it discharges it goes down. Usually a 12V battery is considered dead when it hits about 10.5V. So you can test the incoming voltage. Having said that you need to keep a few other things in mind:
- The discharge curve is not necessarily linear. It might drop off a lot for a while then level out (or opposite)
- The more load there is on the battery the more potential for sagging the voltage. This isn't a problem if you stay way under the battery's maximum discharge rate (if you stay a few orders away from it's internal resistance)
- Different battery technologies have different discharge curves. Some batteries maintain their nominal voltage until almost the end.
You basically have to know your discharge curve and then probably occassionally calibrate if you want accurate readings.
so practically it woul;d be doable to 'record' a whole disccharge, or several and then make a model of it to calculate the % of power?
Yes, in fact that is pretty much what laptops do when you run the calibration routine.
For two popular battery types, Ni-cads and Nimh, this would be harder then it might appear. Both types are known for having pretty 'flat' discharge voltage, after the initial leveling off after a charge, of 1.25vdc. However the exact voltage will vary somewhat with temperature and the amount of current being drawn at any given time. You can probably get a pretty reliable 'early warning' as the end of discharge voltage starts to dip at with maybe 5-10% capacity left.
Lead acid and lithium batteries have a better terminal voltage Vs capacity slope so maybe worth the effort with these types.
The best capacity measurement method is to measure the actual current being drawn and integrate that to compute a amp/hour (or milliamp/hour) consumed variable. I think that is how the better lap top battery gauges work, however at least on the laptop I owned it was not a real reliable indicator unless you went through the calibration routine often. Remember that batteries do lose capacity as they age (# of charge/discharge cycles) and that temperature also effects capacity (cold batteries suck).
Good luck and keep us posted if you come up with anything interesting.
Lefty
Alright.. i think i will give that a try.. on a side idea i have not only left a few batteries from various equipment but also a few spares of my old Bluetooth GPS Dongle.. it uses the same Battery as does most of the NOKIA cellphones.. i tried to connect that one to the arduino once and it worked - but now i wonder why this thing has 3 contacts. + and - are marked, yet the third isnt... i have been told that certain laptop batteries even 'tell' their percentage.. i wonder if it is that way with those..
" i wonder if it is that way with those.. "
Most likely not. The extra wire from a single cell cell-phone battery (Li type) is usually a temperature sensor wire to aid the charging process.
Lefty
ok, thank you.
Lead acid and lithium batteries have a better terminal voltage Vs capacity slope
Funny, I've always decribed it as a worse slope for that exact reason. In actual use, you want it to be as flat as possible, though it certainly makes it a lot harder to gauge how much power is left.
Yes, technically the V slope of LA and LIon batteries is worse but it does make measuring easier. And, in some cases it's not a big deal. If you are powering an arduino through a LM317 or LM7805 then the extra voltage is dissipated as heat anyway so the lower the voltage the less heat needs to be removed.
Funny, I've always decribed it as a worse slope for that exact reason. In actual use, you want it to be as flat as possible, though it certainly makes it a lot harder to gauge how much power is left.
Well in the case of Li batteries it's a good thing as there must be some kind of over discharge battery disconnect or low voltage warning used when the Li battery terminal voltage approaches 3-2.5vdc per cell (depending on who you listen to) as permanent damage can result to the battery if over discharged.
Lefty