Measuring voltage with the arduino

In summary, the conversation involves the speaker seeking help in creating a circuit to record voltage on an Arduino pin A0 using the 3.3V from the board. There are concerns about noise and varying voltage when there is contact between the two parts. The solution involves using a suitable resistor to ground from the A0 pin to measure the resistance of the external circuit. The reference provided suggests using a threshold value and clarifies that the 3 volt output on Arduino boards is nominally 3.3 volts.
  • #1
johnnyhassle
4
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
  • #2
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...)
 
  • #3
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.
 

FAQ: Measuring voltage with the arduino

1. How do I measure voltage using an arduino?

To measure voltage with an arduino, you will need to connect the voltage source to an analog input pin on the arduino board. You can then use the analogRead() function to read the voltage and convert it into a digital value.

2. What is the maximum voltage an arduino can measure?

The maximum voltage an arduino can measure depends on the specific model and version of the board. Generally, most arduino boards can measure up to 5V. However, some boards have a maximum voltage limit of 3.3V. It is important to check the specifications of your arduino board before measuring high voltages.

3. Can I measure AC voltage with an arduino?

No, an arduino can only measure DC voltage. This is because the analog input pins on the arduino can only read positive voltages. To measure AC voltage, you will need to use a circuit that converts AC to DC or use a sensor specifically designed for measuring AC voltage.

4. How accurate is the voltage measurement with an arduino?

The accuracy of voltage measurement with an arduino depends on various factors such as the resolution of the analog-to-digital converter (ADC), external noise, and the stability of the voltage source. Generally, an arduino can provide a voltage measurement accuracy of around 2-3%.

5. Can I use an arduino to measure high voltages?

It is not recommended to use an arduino to measure high voltages directly. High voltages can damage the board and pose a safety risk. If you need to measure high voltages, it is recommended to use a voltage divider circuit or an external sensor that can handle high voltages.

Similar threads

Back
Top