Go Down

Topic: Using analog pins as voltage sensors, need separate grounds? (Read 97 times) previous topic - next topic

ram_ses

I'm using an arduino nano to read some info such as voltage, temperature, current from a small battery pack consisting of three 18650 batteries in series to hit 12V.

I want to be measuring the voltage of each 18650 battery at all times and since their voltage go from 2.5 to 4.2 V, it's safe to connect it directly to the analog pins. 

So I would connect the positive of each battery to pins A0, A1 and A2, but the problem comes when connecting the negatives to ground; since they are in series, if I connect all three negatives to the same ground, I'll short circuit two of the batteries.

How could I fix this?


Koepel

You can not fix that. I'm sorry, but that is not possible.
It is never safe to apply a voltage to a analog input. Use a safety-resistor in the signal line of 1k to 10k.

Either measure the higher voltages, or switch the battery connections with relays or mosfets. Look at other projects who measure individual batteries. Those projects need a lot of extra hardware to switch the battery connections.

wvmarle

You have to read through a voltage divider.

Battery one is at 3.7V; battery 2 at 7.4V, battery 3 at 11.1V. More if freshly charged, less if almost empty. Size the voltage dividers accordingly.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

slipstick

You can't do it like that.

The normal approach is to read the first cell, then the first and second, then first, second and third and work out the individual cell voltages yourself. It's only simple subtraction. You'll need voltage dividers, at least for the voltages over 5V.

Steve

MarkT

Since you end up subtracting values from each other the precision of resistor dividers required can
be quite high - 1% resistors or better are typically necessary, so watch out for that.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

ram_ses

@wvmarle : would using the typical 25V voltage sensor be good for all three batteries? 30k and 7.5k resistance.
@slipstick : So for the first cell I could just hook it up to the analog pins (with a resistance between positive and analog pin for protection) and voltage dividers for the last 2 cells, then just do the math, right?

@MarkT : What do you mean by "-1% resistors"? I thought maybe using the 30k and 7.5k Ohm voltage sensors for each battery.

wvmarle

You need to bring the voltage read to about 1V, so you can use the internal reference (otherwise your readings change with any change in the 5V power supply).

Also mind that adding a fixed voltage divider continuously drains your batteries. You will want to use high values for this, or find a way to switch on/off the voltage divider (e..g. a PNP transistor or p-MOSFET for high side switch).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up