Hi!
I know there are some posts about the analog input of the Teensy 3.1 / 3.2 already, but I didn't find this specific problem.
When I try to read the voltage of a relatively high impedance source, I see jumps in the readings of the analog pin around midscale. Looking at the voltage on the pin, the jumps are visible, too. In my setup to look into this, I connected a signal generator over a resistor (first 10k, then 100k) to the chosen analog input. I monitored the signal of the generator and directly at the analog pin of the Teensy with an oscilloscope. With 10k the jumps in the signal are quite regularly and the . With 100k there seems to be some kind of "pull-up" because the signal on the pin is higher than the signal coming from the generator. I know that it would be better to use lower impedance sources, but anyways I would like to know, where this strange behaviour comes from.
Here is a minimal code example and two pictures of the oscilloscope.
10k series resistance:
100k series resistance:
I know there are some posts about the analog input of the Teensy 3.1 / 3.2 already, but I didn't find this specific problem.
When I try to read the voltage of a relatively high impedance source, I see jumps in the readings of the analog pin around midscale. Looking at the voltage on the pin, the jumps are visible, too. In my setup to look into this, I connected a signal generator over a resistor (first 10k, then 100k) to the chosen analog input. I monitored the signal of the generator and directly at the analog pin of the Teensy with an oscilloscope. With 10k the jumps in the signal are quite regularly and the . With 100k there seems to be some kind of "pull-up" because the signal on the pin is higher than the signal coming from the generator. I know that it would be better to use lower impedance sources, but anyways I would like to know, where this strange behaviour comes from.
Here is a minimal code example and two pictures of the oscilloscope.
Code:
int analogValue;
void setup() {
// put your setup code here, to run once:
pinMode(A1, INPUT);
analogReadRes(16);
analogReadAveraging(32);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
analogValue = analogRead(A1);
Serial.println(analogValue);
delay(10);
}
10k series resistance:
100k series resistance: