ADC reading oddity

Status
Not open for further replies.

jcarruthers

Well-known member
Hi all,


So I have a self-built Teensy "3.1" and am having some issues with analog in. I know that this has worked fine before when I've been using a standard premade Teensy. So I am not sure what is going on.

I am using a opamp to scale an input of -5 to 5v to 0 to 3v — which is going to the Teensy. All the voltages check out fine on the board*— it scales from 0 to 3v and that is going to the Teensy.

I have an LM4040 for my voltage reference and am getting 3v on the right pins.

I am using port A3 — and reading the ADC values.

I'm setting up the port like this:

Code:
  analogReference(DEFAULT);
  analogReadResolution(10);
  pinMode(A3, INPUT);


My ADC values (10-bit, 0 to 1023) are only working on the very limits of the voltage range — as in 0-1v at the Teensy input — and it erratically jumps from 400 ADC reading to 700 or so and then 1023. It doesn't look linear.

Something is up — hope you can help!


James
 
Status
Not open for further replies.
Back
Top