Go Down

Topic: Reading 5v analogue sensor (Read 948 times) previous topic - next topic

Grumpy_Mike

Quote
Some recommend wiring a .1 ufd cap from Aref pin to ground for added noise filtering.

Yes I would, even up to 1uF.
Also check the decoupling on the supply pins and also make sure you have both the analogue and digital supplies connected on the bread board.
For extra precision wire an inductor between analogue and digital power pins, with a cap to ground on both and feed the power into the digital pin.

Jimster

Sorry to be lame, but what do you mean by coupling?

Maybe I should start from the beginning, can anyone point me in the direction of a diagram of the minimum components for an arduino where I can read analogue voltages accurately?

Grumpy_Mike

Quote
but what do you mean by coupling?

Not coupling but decoupling, the art of isolating the power supply from the noise generated by the circuits it is driving.

Google decoupling and my foroum name, I am on an iPad so I haven't got access to my links.
As for a stand alone circuit look at my monome project.

Jimster


dc42


I've also replicated the problem using a diode between 5v and analogue input 3. When tested with a digital multi meter it shows around 4.2v but stil 1023 on the serial monitor.


As well as a diode, you need a pulldown resistor connected between the pin and ground. When the DMM is connected, the DMM acts as a pulldown resistor. Disconnect it and the pin will probably float up to 5V.

Check that the Aref pin isn't shorted to anything, and that Avcc is connected to +5V.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up