24V Potentiometer

Hello everyone,

I have a potentiometer that can operate up to 28V. I'm attempting to use it as an extensometer. Initially, I tried using it with an Arduino Uno powered at 5V, but I realized it wasn't very accurate. Now, I'm supplying 24V to the potentiometer with a power supply and dividing it down to 5V using a voltage divider, as shown in the circuit diagram. I then connect the 5V divided output to A0 on the Arduino. However, when I measure the voltage between A0 and ground, it's approximately 8.6V. I expected to measure 5V, but it's more than that. However, in the disconnected state, the pin reads 5V as expected.

I tried adjusting the voltage from the power supply until I have 5V between A0 and ground in the connected state. However, even after doing so, I still cannot see the sensor values on the Serial Monitor.

What am I doing wrong?

const int potPin = A0;

void setup() {
  // Starte die serielle Kommunikation mit einer Baudrate von 9600
  Serial.begin(9600);
}

void loop() {
  // Lese den Wert vom Potentiometer aus
  int sensorValue = analogRead(potPin);

  // Drucke den Wert auf der seriellen Schnittstelle
  Serial.print("Potentiometerwert: ");
  Serial.println(sensorValue);

  // Warte einen kurzen Moment, bevor der nächste Wert gelesen wird
  delay(100);
}

First, are your grounds connected? People often use the same ground symbol in different parts of their circuits, but IRL they end up not being connected.

The 8.6 may have damaged the input. Try a different analog input, if that doesn't work, try another Uno/Nano.

it worked thank you. But why they should be connected together? ground is ground aint it? :smiley:

Hello bengimehm

Take a piece of paper and calculate the values of the voltage dividers.

you mean that the values are not linear?

Haha, no. Think about it - I have two circuits in front of me with no wires connecting them.

If I call one point in one circuit "ground", and a point in the other circuit "ground", by what magic or sorcery do these two things know the least thing about each other?

In this context, ground is just… a point in a circuit that is convenient to call ground. Like the negative end of the power supply. Very handy to have a common (see?) wat to refer to that, so it can be used all over your circuit as a substitute for a line drawn alla way back the the battery.

a7