teensy_ino
Active member
Hello forum,
I'm trying to do an AC measurement with the Teensy 3.2 with analogRead / analogReadResolution (16) on Analog PIN A1, and I came across very strange behavior ...
A test sinus of 30 Hz with 350mVpp (measured with Rigol 1054Z) is used. The Teensy 3.2 runs on 72 MHz, USB Type Serial. Powered by USB.
The bias voltage is tapped at the 3.3 V PIN (left of PIN 23) and then divided by a voltage divider.
I wired PIN A1 differently for this purpose:
1)
0.5 x Ub is directly on PIN A1, signal (sine 30Hz 350mVpp) is fed in via 220nF capacitor:
The serial monitor shows values between 0.16 and 3.16 V.
2)
like 1, but without capacitor:
The signal now lacks the negative half-wave (which is definitely the case would be desired).
The serial monitor shows values between 0.00 and 2.84 V.
3)
completely without bias and without capacitor, signal goes straight on PIN A1:
Here, too, the signal lacks the negative half-wave. From over 404 mVpp Input signal, the positive half-wave is cut off at the top.
The serial monitor shows values between 0.00 and 2.84 V ...
If I do the same measurements with analogReadResolution (16); the values at 1) are the same.
At 2 +3) the serial monitor then shows 0.00V to 3.31 V.
The difference between the input signal and what the serial monitor shows corresponds to a gain factor between 8.11 and 9.45 ...
How does this reinforcement come about?
So far I had assumed that a corresponding bias voltage (as under 1) is sufficient to measure AC voltages with Arduino / Teensy ...
I am also not aware that the signal is additionally amplified simply by using analogRead or analogReadResolution (16)?
Can someone explain this behavior to me?
I would be happy if someone could help!
regards
I'm trying to do an AC measurement with the Teensy 3.2 with analogRead / analogReadResolution (16) on Analog PIN A1, and I came across very strange behavior ...
A test sinus of 30 Hz with 350mVpp (measured with Rigol 1054Z) is used. The Teensy 3.2 runs on 72 MHz, USB Type Serial. Powered by USB.
The bias voltage is tapped at the 3.3 V PIN (left of PIN 23) and then divided by a voltage divider.
Code:
/*
AC /NF analog Read
*/
void setup() {
Serial.begin(115200);
}
void loop() {
int Value = analogRead(A1);
float voltage = Value * (3.31 / 1024);
//delay(250);
{ Serial.println(voltage);
}
}
I wired PIN A1 differently for this purpose:
1)
0.5 x Ub is directly on PIN A1, signal (sine 30Hz 350mVpp) is fed in via 220nF capacitor:
The serial monitor shows values between 0.16 and 3.16 V.
2)
like 1, but without capacitor:
The signal now lacks the negative half-wave (which is definitely the case would be desired).
The serial monitor shows values between 0.00 and 2.84 V.
3)
completely without bias and without capacitor, signal goes straight on PIN A1:
Here, too, the signal lacks the negative half-wave. From over 404 mVpp Input signal, the positive half-wave is cut off at the top.
The serial monitor shows values between 0.00 and 2.84 V ...
If I do the same measurements with analogReadResolution (16); the values at 1) are the same.
At 2 +3) the serial monitor then shows 0.00V to 3.31 V.
Code:
/*
AC /NF analog Read
*/
void setup() {
analogReadResolution (16); // 16 Bit = 65536
Serial.begin(115200);
}
void loop() {
int Value = analogRead(A1);
float voltage = Value * (3.31 / 65536);
//delay(250);
{ Serial.println(voltage);
}
}
The difference between the input signal and what the serial monitor shows corresponds to a gain factor between 8.11 and 9.45 ...
How does this reinforcement come about?
So far I had assumed that a corresponding bias voltage (as under 1) is sufficient to measure AC voltages with Arduino / Teensy ...
I am also not aware that the signal is additionally amplified simply by using analogRead or analogReadResolution (16)?
Can someone explain this behavior to me?
I would be happy if someone could help!
regards