need to read an analog voltage

Hey guys, I am trying to read a small DC voltage. The goal would be to show a progress bar on the computer that would represent the value of the incoming DC voltage. example: 0vdc would show 0% on progress bar. 130mv would show 100% on progress bar.

The largest voltage I will be reading is 130mV DC, which is pretty small.

I see that some arduino boards have an analog voltage input. Can they measure voltages that small? Is the arduino board the best way to approach this? I am looking at this board because I need it to interface on the usb port. Thanks, Victor.

All Arduino boards have analog inputs, typically six or more of them.

You can measure 1024 steps between 0 and the reference voltage. The reference voltage can be as low as 1V so that gives roughly millivolt resolution. That would give you a little over 130 steps in your progress bar.

http://arduino.cc/en/Reference/AnalogRead

The Arduino has a ten-bit ADC which gives you a value from 0 .. 1023. By default it covers the range 0 - 5V so the resolution is only 5mV - and it would probably not be wise to rely on the accuracy or consistency of the results when you're that close to the limits of the ADC. However, the Arduino has an analog reference which can be used to configure the ADC to cover a smaller voltage range. I haven't any personal experience of using it, but if I understood it correctly you should be able to configure it to give the resolution you're asking for. One possible issue is that the input voltage must not exceed the analog reference voltage, so if you reduce the analog reference to (say) 200mV you would have to make absolutely sure that the voltage you're reading could never exceed that.

One possible issue is that the input voltage must not exceed the analog reference voltage, so if you reduce the analog reference to (say) 200mV you would have to make absolutely sure that the voltage you're reading could never exceed that.

Never exceed sounds like a safety warning which does not apply in this case. The analog input pins have an electrical damage safety warning if an applied voltage is higher then Vcc +.5vdc (so call it 5.5vdc) or less then ground -.5vdc. And that is regardless of what reference voltage value you are using, internal or external. What happens if your input voltage is higher then whatever reference voltage is being used the value returned will be 1023 for any voltage higher then the reference voltage. So for example, if you are using the internal 1.1vdc reference voltage then any voltage applied to the pin between 1.1vdc to 5.5vdc will return the same 1023 counts from the analogRead() function.

Lefty

Oh...This sounds familiar.

I think that Arduino has a tutorial for that and an example....I think is called AnalogRead. Good luck on your project!! Sounds cool.

retrolefty:

One possible issue is that the input voltage must not exceed the analog reference voltage, so if you reduce the analog reference to (say) 200mV you would have to make absolutely sure that the voltage you're reading could never exceed that.

Never exceed sounds like a safety warning which does not apply in this case.

I stand corrected.

Victor,
You can increase your voltage by using an op amp like a LM741. You can take your 130mv and change it to 1.30 volts or what every you would like. Just be sure you do not go over 5.00 volts out (op amp) or 5.0 volts into your analog input channels.
john
Mims, Fl.

jdmac:
Victor,
You can increase your voltage by using an op amp like a LM741. You can take your 130mv and change it to 1.30 volts or what every you would like. Just be sure you do not go over 5.00 volts out (op amp) or 5.0 volts into your analog input channels.
john
Mims, Fl.

Well a 741 is a very old and obsolete op amp to be using today. And in this application one would really want to power the op-amp with +5vdc and use a modern 'rail to rail' op-amp to ensure it can get to but can't go over +5vdc output. A 741 can't climb close to its rail voltages at all.

Lefty

PeterH:
if you reduce the analog reference to (say) 200mV...

The ATmega328P datasheet says the lower limit for Vref(=Aref) is 1.0V. (See: ADC Characteristics)