Measuring voltage with the arduino

Click For Summary
SUMMARY

This discussion focuses on measuring voltage using an Arduino, specifically through pin A0 with a 3.3V reference. The user experiences noise issues, with voltage readings fluctuating between 1.5V and 3.3V due to contact variations. A solution involves using a 10K ohm resistor connected to ground from the A0 pin to stabilize readings. Implementing a threshold value of 3V can help determine contact status effectively.

PREREQUISITES
  • Understanding of Arduino analog input (A0) functionality
  • Basic knowledge of electrical resistance and Ohm's Law
  • Familiarity with voltage measurement techniques
  • Experience with circuit design and component selection
NEXT STEPS
  • Research Arduino analog voltage reading techniques
  • Learn about resistor-capacitor (RC) filtering to reduce noise
  • Explore threshold detection methods in microcontroller programming
  • Investigate best practices for ensuring clean electrical contacts
USEFUL FOR

Electronics enthusiasts, Arduino developers, and hobbyists looking to improve voltage measurement accuracy and reduce noise in their circuits.

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
Here's a reference on reading it properly:

http://arduino.cc/en/Tutorial/ReadAnalogVoltage

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...)
 
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.
 

Similar threads

Replies
7
Views
3K
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
10K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K