How to know what Arduino is measuring?

I've set up my Arduino with a potentiometer connected to the A0 pin and then just two stripped wires connected to the potentiometer. The idea (which I'm seeing) is that the signal changes when this is dipped into water as it completes the circuit.

Does anyone know what property I'm actually measuring? I know this is a super stupid question but I'm having trouble finding a definitive answer online.

Hello

Post a picture of your hardware setup.

2 Likes

Changes in the voltage on the ADC input, due to effects of the environment.

A bare wire connected to an ADC input will pick up electrical signals from the house wiring, lights, static electricity generated by motion, etc.

1 Like

Voltage. The internal A/D (Analog to Digital converter) is converting voltage to a digital number. I am assuming the outside terminals are connected to Positive and Ground. If connected that way you should get a reading from 0 to 1023.

1 Like

Do you mean like this?

1 Like

Thank you so much!! This seems correct!

Yes!

Is this value in volts? or is it an arbitrary number until I calibrate it?

I don't think so
It looks like you have some kind of module with an opamp or comparator on it.
What is that module?
You are probably reading some offset voltage of that circuit.

1 Like

It's voltage, but not in units of volts... It's proportional to volts.

A regular Arduino Uno has a 10-bit analog-to-digital converter which means it can read 0-1023.

The default reference is 5V (technically Vcc) so 5V reads 1023 and 2.5V reads 511 or 512, etc.

Analog Read Voltage Example

2 Likes

It is not an arbitrary number but it is not volts either. Your reference probably 5V is broken into 1023 steps. so 1023/5 = 204 steps per volt. Internally You can check the MAP function, it only works with integers but will do the work of converting to voltage. There are many volt meter projects on line for the Arduino, they will have the code etc you need. This link should fill in many of the missing parts. https://www.electronics-tutorials.ws/combination/analogue-to-digital-converter.html

1 Like

Is it one of these?

Thank you! Yeah I think its a potentiometer which affects the sensitivity of the measurement

Yes it is!

Oh I see thank you so much this is very helpful!

Thank you so so much ! Both this link and the one from DVDdoug have been super helpful - you all are the best!

Then the property you are measuring is resistance. If you put it in water, then you are measuring the resistance of water.
The potentiometer has no effect on the analog output (AO) it only changes the trigger level of the digital output (DO)

1 Like

Ohhh I see okay thank you! I'll take the potentiometer then since it's not doing anything. Does the units of this measurement follow the same rationale as what's been suggested above or is it directly measuring in ohms? Thank you so so much for your help!!

Well it's not ohms and I'm not to sure what was suggested above.
The numbers you get from the analogRead() represent a voltage.