# How to measure DC voltages?

Hi, I am looking for a solution in order to read DC voltages up to 70V. The use will be for battery monitoring, and the batteries would be connected in parallel. I am planning on using the Arduino bootloader and an AVR because of the ADC, and a Pi to grab the data (direct Serial connection), or is there a nice I2C/SPI breakout board available which can be connected directly to the Pi, which would make it much easier?

ADC chips with SPI or I2C interfaces certainly exist. My main concern would be that if the batteries are connected in parallel then in effect it acts as a single battery - the fact you refer to batteries and voltages makes me wonder whether I have misunderstood; if the batteries are connected in series, or not all referenced to the same ground potential for some other reason, then measuring the voltages becomes much harder.

Damn, I meant series. The batteries (12 or 24V) are connected in series, and just to be safe a theoretical max of 70V is a safe idea IMO. All that's needed is basically this: http://www.adafruit.com/products/705, but with an I2C/SPI, or analog output. I am not the most experienced with voltages over 5V, so that's why I'm asking you guys for help :)

Okay, I think I'll go with a resistor divider, as I can easily get the parts. However, does anyone recommend this for robustness and accuracy, would you suggest a specific IC to do the job?

The Arduino ADC likes to see a source impedance of 10k ohms or less - see the Atmel datasheet.

The exact values of the resistors aren't important. Just measure the voltage division with a digital voltmeter and use that value in your program.

...R

Note that the more voltage you're dropping across your voltage divider the less resolution you will have - check that the worst case (highest voltage you need to read) gives you sufficient resolution when divided down to 5V.

If that doesn't give enough resolution, one option would be to run a separate microcontroller per cell and do the measurement/control locally powered by and referenced off the cell, and then use an optical isolator to enable serial comms between each cell's controller and a master controller that runs at your nominal ground voltage to handle any external interfaces you need. There are various PCB manufacturing services that provide a shared repository of PCB designs, and it's even possible that you'll find somebody has already published a suitable design. Since the per-cell controller would only need a minimal standalone Arduino compatible microcontroller, it would be much less expensive than an official Arduino.