Measuring voltage with the arduino

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
johnnyhassle
Messages
4
Reaction score
0
Hi,

I would like to record a voltage on a ardruino pin A0 using the 3.3V from the arduino. I connect the 3.3V to one part and the A0 to another part. I want to know when there's contact between the two parts (resulting in 3.3V on pin A0) and when there's no contact (resulting in 0V on pin A0).

I'm unsure about how to create this circuit. When there's no contact I still meaure 1.5V (noice), and when I move the parts the voltage is going up and down a lot (lots of noice). Also, when there's contact on between the two parts I can't measure a 3.3V, its varying from 3.0V to 3.3V. When I remove the V the voltage that I'm recording is also going down pretty slowly.

Can anyone help me out in this matter. What resistor should I possibly use and most importantly: How?

Thanks in advance.
 
Engineering news on Phys.org
The 3 volt output on Arduino boards is nominally 3.3 volts.

You need to put a suitable resistor to ground from the A0 pin.

Suppose you choose a 10 K (10000 ohm) resistor.

Then, if the external circuit has a resistance of 10 K, the input A0 will have 1.65 volts on it.

If the external circuit had a resistance of 5000 ohms, the input A0 would have 2.2 volts on it.

So, you could use it like an ohm meter.