teensy 3.2 analog voltage measurements, I'm off by 10% and I don't understand why

Status
Not open for further replies.

twilkers

Well-known member
Hi,

I have constructed a terminal block shield and am testing with some voltage dividers using teensy 3.2, sparkfun arduino adapter (modified to alleviate 5v issue) and ethernet shield R3. I started with the teensy webserver example sketch and have added some storage and other stuff. pic and sketch attached.

I have 100 ohm series and 0.01uf to ground on each adc input (see schematic pdf) but oddly measure about 10% low. Spreadsheet shows voltage divider calculations and measurements on the terminal block shield match calculations.

The outboarded switch is to allow convenient teensy reset if needed.

while files are attached,
measured
2.18v, 1.63v etc

should be
2.4v, 1.8v, etc

Does the adc pin draw excessive input current to generate the error? it seems that ~2ma could cause this error magnitude. what else could be wrong?

Ultimately, these adc inputs will be driven by a difference amplifier measuring high side charge/discharge battery current for an off grid power system.

thanks in advance,
tim
 

Attachments

  • voltages.jpg
    voltages.jpg
    45.6 KB · Views: 65
  • teensy stack.jpg
    teensy stack.jpg
    158.5 KB · Views: 83
  • teensy_webserver_scratch_RevA.ino
    11.3 KB · Views: 51
  • EBRC analog shield rev B.pdf
    41.9 KB · Views: 60
I don't have a Teensy in front of me right now, but I remember seeing ADC values within 1% of what I expected. 10% low is way off, and I can't believe an ADC input would draw 2 mA under normal circumstances.
 
744 of 1024 bits is 0.7265625 * 3.3 v = 2.39765625V

558 -> 1.7982421875 V
 
Last edited:
you are certainly correct. I was thinking teensy was 3.0v powered. measurements are perfect now.
thank you.
 

Attachments

  • voltages revA.jpg
    voltages revA.jpg
    59.7 KB · Views: 53
Status
Not open for further replies.
Back
Top