Go Down

Topic: analog in will not read true (Read 7 times) previous topic - next topic


I am trying to read a voltage(below 1 volt) on A0, using the analog read/serial sketch, but the readout is nowhere what shows on the LCD of my device... and I know too little to understand the problem! I have a delay in the sketch, have changed that (incr and decr), thinking the problem is latency. No better. The readouts are from zero V up to numbers that have no relationship to reality whatsoever. I can read the voltage out with a standard V/Ohm meter, and as I said there is a LCD on the device (Radio Shack Sun and Sky Monitoring Station). Any ideas?


Don't see code, don't see a schematic.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Any ideas?

yep, have you read this tutorial - http://arduino.cc/en/Tutorial/AnalogInput -

but it could be also some other problem, so please follow AWOL's advice and post all information you have.

The more information in the question the better answer  ;)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


If you are reading a rapidly varying voltage then analogRead() gives a snapshot of the voltage taken over a few microseconds or so.

A digital multimeter measures a time-averaged value over a substantial fraction of a second.   A voltage with a lot of noise will thus read
as a steady value on a DMM and apparently highly random using analogRead().

Perhaps you need to bandwidth limit the signal of interest with a low-pass filter?
[ I won't respond to messages, use the forum please ]


Got no code, other than the analog in / serial sketch I mentioned. Got no schematic, other than two contact points out of the device marked + and -...

Could I program a way to take several snapshots of the voltage reading and average them? I thought of this, but at this point all the readings seem to be unrelated to one another, and the voltage *should* be a steady reading out, as it is the light reading from a diode, used as a light sensor.

As to the advice about limiting the bandwith of the signal, I will look into that. thank you very much.

My son gave me a MEGA for Christmas... gonna try that, too.

Thanks everyone, and merry christmas/happy holidays!

Go Up