So i came with a project which need to measure the voltage of a battery in small periods of time
and knowing the exact voltage.For this project the main battery is a Li-Po but i also wanna wanna measure the voltage of other batteries too in the same time.
Does anyone know how can I do that with arduino?
I need to be 100% safe, measure multiple batteries voltages, that's all i need for now.
I'm totally new in this domain so let's start using a single battery, let's say a battery above 7 volts
how do I exactly connect them to arduino (components) and what code should i use to calculate/see the voltage?
I need to be totally safe, i don't need fried arduino
DVDdoug gave you the answer to your needs. you just have to read.
The biggest safety concern is in your wiring technique. if you use good wiring practice, you'll be safe.
@Domino60, wasn't we (you) discussing analog voltage readings just last week? Did you not get a satisfactory resolution? If so, maybe we should combine the old thread and this one.
Your requirements of "exact voltage" and "100% safe, are probably not realistic. You can get close, but not perfect (no cigar).
Domino60:
I'm totally new in this domain so let's start using a single battery, let's say a battery above 7 volts
how do I exactly connect them to arduino (components) and what code should i use to calculate/see the voltage?
I need to be totally safe, i don't need fried arduino
use a voltage divider that you make, with the resistor values that you pick.
isolate that from the input with a resistor then a zener diode to ground
more here : http://www.thebox.myzen.co.uk/Tutorial/Protection.html
if you have a 'throw away' mini you get from ebay for under $3.00 your risk is much less.
you have to ask yourself how often you expect to be brushing your long hair, on days of 0% humidity while alternatively touching the pins of the arduino, while wearing leather sole shoes while sliding them on the carpet....
I once saw an LED that was connected to the ground strap on a bench. the idea was that every time you walked over the carpet, sliding your shoes, while the humidity was less than 10%, it would light the LED to show you just had a discharge.
discussion with folks who had them, never could get it to light the LED. means that the joules were not enough for that circuit to indicate.
it might be fun to put an Arduino in that, with a cap to see the maximum voltage and the duration of cap discharge.