creating a voltmeter with the audrino

:-? Can anyone point me in the correct dirrection. How can I create a voltmeter with the Audrino duemilanove? I plan on using the Audrino to monitor several batteries. Thank you.

first of all, you probably need to look up voltage divider circuits. two resistors, one going to your source, the other to ground, and one common connection between them going to the analog port.
source—>analog<-----ground

edit( also interesting, http://www.youtube.com/watch?v=paDWH-_BDCw)

:-/, I am a little confused. Are you saying I should hook up the voltage divider circuit to the battery? If so, wouldnt that drain the battery? I plan on having the arduino [u]constantly[/u] check the voltage of several batteries.

I am a little confused. Are you saying I should hook up the voltage divider circuit to the battery? If so, wouldnt that drain the battery? I plan on having the arduino constantly check the voltage of several batteries.

If you use a 10K pot as a voltage divider it would cause around a 1 milliamp current draw on a 12 volt battery. If you don't want that continuous current draw then you would have to do something like use a digital output pin to drive a relay whose contacts then connect the voltage divider to the battery. The main issue is if more then 5vdc is applied directly to an Arduino input pin then permanent damage to chip will occur.

Lefty