analog in will not read true

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?
thanks

Don't see code, don't see a schematic.

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 :wink:

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?

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!
jim

and the voltage should be a steady reading out, as it is the light reading from a diode, used as a light sensor.

Well there's the obvious issue - what light is falling on the diode? Fluorescent? compact fluorescent? Or is it really a constant
light source such as the sun or tungsten filament bulb?

Got no schematic, other than two contact points out of the device marked + and -...

Got a link to the 'device' that has + and - contact points?

Lefty

I am trying to read a voltage(below 1 volt) on A0

You can set the analog reference to 1.1 Volt internal to make the ADC more sensitive..

I tried setting the ref voltage, but didn't understand how to use the code. I can read a 1.5V battery cleanly, but the readings I need to make are less than 1 V, and I guess the resolution is the problem. Perhaps I can amplify the output with a buffer? I sure wish I knew what I was doing :~

Hi eatabean,

I sure wish I knew what I was doing

We'd love to help, but without a copy of the sketch and a description of your wiring, we're at a loss too!

Copy and paste the sketch in a reply and talk us through the wiring. The project you describe seems pretty straight forward and shouldn't need anything fancy to make work.

Pat.

The analog input will have a voltage input and will return a result between 0 and 1023.

So if your input voltage is 1 volt and your reference voltage is 5V, the result of the analog input read
operation would be a number around 200.

If you try reading the voltage of a 1.5V battery, your number in the arduino would be about 300.
Is that what you get when you try measuring the voltage of a battery ?