ActivityBot Detecting Battery Level
Hi everybody.
In the tutorial for the activity board (http://learn.parallax.com/propeller-c-simple-circuits/measure-volts) it says :
Voltage is like a measure of electrical pressure, and measuring voltage answers questions like: How much life is left in this battery ?
I'd like to add a battery level indicator to my robot (activityBot), but there is no details on this tutorial for that.
I can measure voltage from the 3.3v or 5v, but it seems that it just answers the question : "is there sufficient voltage or not ?".
At what voltage must i consider that the battery level is low ?
The integrated components transform the 5x1.5v (7.5v) in 5v or 3.3v, so it's difficult for me to understand.
So, does anybody know if it's possible to have a battery level indicator : in percentage for example, and how to do this in this case.
Thanks in advance.
In the tutorial for the activity board (http://learn.parallax.com/propeller-c-simple-circuits/measure-volts) it says :
Voltage is like a measure of electrical pressure, and measuring voltage answers questions like: How much life is left in this battery ?
I'd like to add a battery level indicator to my robot (activityBot), but there is no details on this tutorial for that.
I can measure voltage from the 3.3v or 5v, but it seems that it just answers the question : "is there sufficient voltage or not ?".
At what voltage must i consider that the battery level is low ?
The integrated components transform the 5x1.5v (7.5v) in 5v or 3.3v, so it's difficult for me to understand.
So, does anybody know if it's possible to have a battery level indicator : in percentage for example, and how to do this in this case.
Thanks in advance.
Comments
If i understand : my rechargeable battery is a 7.4v 4000 mA/h : so i don't matter about the 4000 mA/h but just the voltage.
the schemas should be that :
I must start to test my battery (with a volt-meter) when it's completely charged (to know the exactly max voltage because i know that some battery give more that is indicated when it is charged).
i make the hypothese that the max voltage is 8v
If i use R1=470ohms and R2=470ohms -> the max voltage i read is 470/(470+470) x 8 = 4v. (or 3.7v if the max is 7.4v instead of 8v)
I know that the minimum voltage for the motors for the activityboy is 6v (we have problems when we drop below 6 V) -> so i can consider minimum read voltage = 3v (low battery).
And i can have a percentage : (read voltage - 3) / (max read voltage - 3) * 100.
Exemple : 3.8v -> 80 % (if the battery max is 8v)
Exemple : 3.9v -> 90 % (if the batttery max is 8v)
Exemple : 3.5v -> 72.42 % (if the battery max is 7.4v)
Do you think i'm right ? Sorry to ask you to confirm, but i'm a beginner in electronic and robotic, and i don't want to crash my robot.
And sorry for my approximate english.
See you soon.
Hi everybody no response. For everybody that is interresting about that, the solution is working fine.
I used 2 x 20 KOhm resistors.
See you soon.
PS : if you want to see my bot (in construction), you must go there :https://djgsi974.wordpress.com/
At 40K Ohms Total for your divider you're voltage at the ADC is generated by about 200 microamps of current. That's likely to mean that even small amounts of local noise can swamp out the signal. I would prefer about a 10X stronger source. Even small changes in voltage there can make it appear that battery is several percent more or less charged. I'd prefer 2K resistors in that case. It's a mostly static signal so averaging can clean up the numbers a lot if you only are reading voltage every few seconds or minutes.
I'm assuming that you are using a LiPO/LiON battery based on the 7.4v @ 4000 mAH. So don't base 100% on the max a battery might show right off the charger. That will skew your percentages badly because that voltage only lasts a very short time. Base it on the conservative 7.4 to 7.6V instead. The discharge graph between 7.4 and 6.3 will be fairly flat and predictable. Outside that it gets very steep and difficult to accurately show percentage. Don't play around too close to the 6.0V level. The additional runtime gained is short and not worth the hazard of over-discharging the cells.
If you are using NiMH batteries the discharge graph is even worse. It's very difficult to present a percentage for those batteries based on voltage. Instead it's easier to just have Full / Partial / Low set points and react accordingly. They are a serious pain though. The voltage is 'springy', in that it bounces up.... by a lot when the load is removed and even really dead cells will build back up enough to seem useable when they sit for a while so make your set points one way traps. Once the "low" point is reached don't reset to "partial". Instead It has to reach "full" again to reset.
-Phil
Thank you for you responses.
For information photomankc, the battery is a Li-ion one, and thank you for you explanation for the usage of it (min, max etc...).
So, what is the better solution for you : i prefer to have a low level consumption for the current.
I can change the resistors, and add a capacitor if it is necessary : but what should be the model, and what should be the value of it, or how to calculate it ? I suppose that i must connect the first pin to the output of the divider, but the second pin : must i connect it to Ground of the battery (-) ?
Sorry, my question certainly seems stupid, but i'm a beginner (and sorry too for my poor english, i'm french).
See you soon.
You are correct on the placement. One lead (+) goes to the divider output and the other (-) to ground. Electrolytic capacitors, as I understand it, are not good for this application.
Thanks a lot, it's perfect. I finaly use a 10uf capacitor (have nothing else in stock).
bye.