Teensy 4 ADC to Voltage

Status
Not open for further replies.

Dogbone06

Well-known member
Hello all,

I have hit a bit of a snug. Using the ADC library (https://github.com/pedvide/ADC), I have a voltage divider of R1 (10k), R2 (33k), connected to pin 7.
What im trying to do is ofc measure the battery voltage. I have set the resolution to 16 bit and the value I get is 39 from ADC. I'm not the best math guy out there but I've been playing around with this: https://learn.sparkfun.com/tutorials/analog-to-digital-conversion/relating-adc-value-to-voltage
But I'm afraid that I can't get this to match up. If I measure the voltage on the voltage divider (input to pin 7) with a multimeter, I get 3.08V, battery is almost fully charged and is reading just above 4 volt on the battery itself.

Any ideas what I'm doing wrong?

adcc.png
 
Status
Not open for further replies.
Back
Top