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);
}
