Hello Guys,
Today I connected the Teensy 4 ADC to a signal generator and started measuring.
I included the simple ADC Reading Script and the Serial Output of the values. As you can see the ADC Readings are "quite" noisy. I know that the teensy 4 is not a high-end professional adc device, but is there a way to improve the adc accuracy?
I used averaging, but that did not really help.
The first thing that came to my mind was to use an external reference voltage that performs better than the inbuilt voltage regulator.
What do you guys think?
Today I connected the Teensy 4 ADC to a signal generator and started measuring.
I included the simple ADC Reading Script and the Serial Output of the values. As you can see the ADC Readings are "quite" noisy. I know that the teensy 4 is not a high-end professional adc device, but is there a way to improve the adc accuracy?
I used averaging, but that did not really help.
The first thing that came to my mind was to use an external reference voltage that performs better than the inbuilt voltage regulator.
What do you guys think?
Code:
// variables
int adcs = 0; // raw value from analog in
float voltage=0.0; //Voltage
// constants
const int adcPin = A2; // analog in pin identifier
/* setup, run once */
void setup(){
Serial.begin(9600);
// configure Teensy pins
analogReadResolution(12); // (0-4095)
analogReadAveraging(12);
}
/* loop, run continuously */
void loop() {
adcs = analogRead(adcPin);
voltage= (adcs * 3.295)/4095;
Serial.print("ADC Value: ");Serial.print(adcs);Serial.print(" Voltage: ");Serial.println(voltage,3);
delay(250);
}
HTML:
ADC Value: 2500 Voltage: 2.012
ADC Value: 2505 Voltage: 2.016
ADC Value: 2497 Voltage: 2.009
ADC Value: 2502 Voltage: 2.013
ADC Value: 2497 Voltage: 2.009
ADC Value: 2494 Voltage: 2.007
ADC Value: 2488 Voltage: 2.002
ADC Value: 2502 Voltage: 2.013
ADC Value: 2497 Voltage: 2.009
ADC Value: 2498 Voltage: 2.010
ADC Value: 2502 Voltage: 2.013
ADC Value: 2495 Voltage: 2.008
ADC Value: 2497 Voltage: 2.009
ADC Value: 2501 Voltage: 2.012
ADC Value: 2500 Voltage: 2.012
ADC Value: 2503 Voltage: 2.014
ADC Value: 2498 Voltage: 2.010
ADC Value: 2495 Voltage: 2.008
ADC Value: 2502 Voltage: 2.013
ADC Value: 2495 Voltage: 2.008
ADC Value: 2503 Voltage: 2.014
ADC Value: 2507 Voltage: 2.017
ADC Value: 2502 Voltage: 2.013
ADC Value: 2503 Voltage: 2.014
ADC Value: 2494 Voltage: 2.007
ADC Value: 2502 Voltage: 2.013
ADC Value: 2502 Voltage: 2.013
ADC Value: 2504 Voltage: 2.015
ADC Value: 2496 Voltage: 2.008
ADC Value: 2496 Voltage: 2.008