Pages: [1] 2   Go Down
Author Topic: Reading battery  (Read 3326 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
I would make something like battery indicator. How can I read the low variance of the voltage battery? (I need to measure differences from 0,1 v or less)
Because I need to report this to a little graphic on a display.
Logged

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

The typical method is to wire a two series resistor network called a voltage divider and then read the voltage on an arduino analog input pin. What kind of battery is it and what is it's voltage range? How is your arduino board powered with this battery?

Lefty
 
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I know the voltage divider method. Because I need to read a Vin=7,2v nominal... It's a Ni-MH battery pack and it's wired to Vin and GND pins of arduino (and some other hardware, like motor, display, sensors, timers..)
With the voltage divider, I still can't appreciate a little variance. My actual voltage reader, is very inaccurate, with dozen of calibrations... I mean, this work with a middle charged battery; but if I make a full charge, I need to reset every variables (which are my "battery segments" on the display), until goes down to a middle charge...
« Last Edit: March 05, 2011, 02:33:03 pm by thexeno » Logged

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

and some other hardware, like motor
If you're trying to measure with the motor on, there's a good chance that the electrical noise it generates is causing variations in your readings.  Also,  if the motor is drawing a lot of current, the battery pack voltage will sag significantly.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 30
Posts: 2602
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get precision of measurements 4.9mV = 0.0049 V
with voltage divider by 2 (so 7.2 and plus would be in the limits 0 - 5 V)
precision still be better than your requirements 0.1, approximately
10 times better = 0.0098
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can switch scales to multiply the bits in the reading... You'll need some relays or analog muxes to switch between resistors that will give different voltage ranges. That works best with an operational amplifier so that you get some isolation between the batery and the analog input on the arduino. That way you can also add offsets to the reading. It is, however, fairly complicated to achieve. :\
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Poland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So for example I have 9V battery and I want to read it in 11 degrees how to do that ?
LM 358 is good amplifier ?
Logged

I have solution !
But it involves spherical chickens in frictionless vacuum...

Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

reading voltages when there's not activated load (like motors) I can read with precision. But how can I read with the same precision also when motors will be on? Like iRobot, the little vacuum cleaner... I mean, how a cellular, and other electronics can be read battery with precision also with heavy load?

It's a theory:
Maybe, they build a projection of battery life, and it's possible which when an heavy load became on, there's a measure of variance of the potential compared to stand-by mode, and extrapolate the approximate remaining life. That because from a fully charged battery and low battery the REALLY difference is ita ability to keep voltage near to nominal value. Yea, I know that the cell when is low it's 1,2 v and 1,34 viceversa; but when I'll connect a simple led+resistance, the low battery will fall down to 0,5 or little more. And, will fall down at little more than 1,3v, viceversa.

It's a correct intuition?
« Last Edit: March 06, 2011, 02:32:12 pm by thexeno » Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 30
Posts: 2602
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

LM358 is good:

"General Description
• The LM358A/B series consist of two independent, high gain
and internally frequency compensated operational amplifiers.
They can specifically designed to operate from a single power
supply. Operation from split power supply is also possible and
the low power supply current drain is independent of the magnitude
of the power supply voltages.

• The LM358A/B is available in SOP-8 and DIP-8 packages.
Features
Applications
• Internally frequency compensated for unity gain
• Large DC voltage gain: 100dB Typical
• Wide power supply range:
Single Supply: 3V to 36 V
Dual Supplies: ±1.5V to ±18V
• Battery Charger
• Cordless Telephone
• Switching Power Supply
• Input common-mode voltage range include ground
• RoHS Compliance"

But you don't need them.
Answering to bubulindo, yes, you can solder chips, mux and resistors to improve ADC.
It's all depends how high precision you'd like to get.
Arduino  provide 10bits, or with 9V battery precision  = 9/1024 = 0.008789062 V.
If you would like better, just buy an external ADC chip, there are 12-bits, 14- ... and higher


In other words, it's not reasonable to solder new circuits (chips, mux and resistors)
if you can buy one for 0.5 $
Only if you enjoy, and like to know how ADC works from inside.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Up!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But how can I read with the same precision also when motors will be on?
The precision of the reading will be the same if the motors are on or off unless you are affected by noise.
Did you mean to say how can you estimate the battery life with precision when it is under load?

Well have you noticed how they do it in commercial equipment? That is not very well.
You could measure the current at the same time as you measure the voltage, in that way you could get a better indication of the state of the battery, but you would need to calibrate the readings to extend that to charge state. Then the problem would be that as the battery ages those calibration figures drift.

I have yet to see an accurate measure of battery life in a varying load environment, just look how accurate the average lap top is.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy, I'm not sure about what you say about you measure. But the voltage isn't the same with motors. There's a variation of the voltage, due to internal resistance of the battery. It's not the same. For firs idea, I was started to measure only the voltage of battery and (if it's constant) I will see the remaining life of battery (according to characteristic of the battery), like exactly the system check of expensive battery chargers. But it's not constant.
Now, what did you mean when you say "Well have you noticed how they do it in commercial equipment? That is not very well."?
and
Quote
I have yet to see an accurate measure of battery life in a varying load environment, just look how accurate the average lap top is.
Sorry, I don't understand..
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 161
Hola!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The best we can do is to select some minimum battery voltage below which is not safe for the battery or not reliable for system operation. Then we can monitor the battery voltage and shut down the system at this pre-determined minimum voltage.
First of all: big companies can't make an accurately read. I don't need to make that. I need to make a roughly read, at least. Don't start from the top, but from the barn smiley-grin
After all:
Use this way it's impossible. As I say before, in according to basics of electrotechnic, I will see a voltage threshold on load that ruin all sets.. but maybe I've an idea...maybe every reads aren't completely ruined...if this work, I'll post that smiley
And so, I found that ic, recommended from the italian forum.. the bq2014
and what you think about MAX712 ?
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you were using a Li-poly battery I could offer you a decent solution.  Try searching for Ni-Mh fuel gauges.
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Going WAY back to the two resistor voltage divider....

How satisfactory that is going to be for your needs will depend on what sort of resistors you are using, if the temperature in and around them is variable. Some types of resistor are more affected by temperature than others... BUT... having said that, if BOTH of the resistors are warmed equally, which seems likely, depending on how you have things set up, the RATIO of the resistances would remain (nearly?) constant (I think!), and the effect of the heating would be irrelevant.

But I'd still plan to use temperature-stable resistors. Just one less thing to go wrong!
Logged

Pages: [1] 2   Go Up
Jump to: