Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Measuring voltage with the arduino

  1. Apr 24, 2014 #1

    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.
  2. jcsd
  3. Apr 24, 2014 #2


    Staff: Mentor

    Here's a reference on reading it properly:


    You may need to consider using a threshold value that say when its over 3V then we have contact.

    I know when you measure resistances with a voltmeter that sometimes it will vary due to surface contact not being optimal (ie dirt, surface coating...)
  4. Apr 24, 2014 #3


    User Avatar
    Science Advisor

    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.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook