Voltage divider / Non linear output
Posted: Sat Feb 10, 2024 11:45 pm
I've built a monitor for our dual sump pump system and need to obtain the voltage from the 12 volt deep cycle battery. I made a voltage divider using 13k and 3.2k resistors. I took seven readings across the voltage divider without any other components attached, from 9 to 15 volts. The outcome was as I expected, with each millivolt reading from pin 0 increasing .195 millivolts from one input volt to the next.
When I incorporated the voltage divider into the project, however, the readings from the voltage divider where no longer linear.
Volts Pin 0 Millivolts
15 2923
160
14 2763
124
13 2639
114
12 2525
101
11 2424
100
10 2324
97
9 2227
As you can see from the readings, the difference from one volt to the next increases as the voltage rises. I'm new to the ESP32 microcontroller and I'm not familiar with whatever quirks it might have. Can anyone point me towards something to look at?
Thanks!
When I incorporated the voltage divider into the project, however, the readings from the voltage divider where no longer linear.
Volts Pin 0 Millivolts
15 2923
160
14 2763
124
13 2639
114
12 2525
101
11 2424
100
10 2324
97
9 2227
As you can see from the readings, the difference from one volt to the next increases as the voltage rises. I'm new to the ESP32 microcontroller and I'm not familiar with whatever quirks it might have. Can anyone point me towards something to look at?
Thanks!