Dear all,
I am working with the Teensy-LC and I am measuring an analog signal coming from a battery.
I have the battery voltage connected to the Analog Pin A2 via a voltage-divider 470K and 150K.
Therefore, if I have a voltage of 3.3V it will result in a voltage of 0.798V at the analog input pin:
3.3 / (470*10^3 + 150*10^3) * 150*10^3 = 0.798V
I also have the following function calls in the setup():
analogReadAveraging(10); // Teensy: average this many readings
analogReadResolution(10); // Teensy: set ADC resolution to this many bits (2^10 = 1024)
I display the analogRead() value every 1 second and observe a value fluctuation from 214 to 261. The value is approximately correct (should be 247), but it fluctuates.
The board is powered by a battery, so there is no noise coming from a power supply.
I have the 3.3 volts connected to the AREF pin.
I tried to put a capacitor (small and large) on the analog pin, and also increased the analogReadAveraging to 100 but both had no effect.
Any ideas are appreciated...
I am working with the Teensy-LC and I am measuring an analog signal coming from a battery.
I have the battery voltage connected to the Analog Pin A2 via a voltage-divider 470K and 150K.
Therefore, if I have a voltage of 3.3V it will result in a voltage of 0.798V at the analog input pin:
3.3 / (470*10^3 + 150*10^3) * 150*10^3 = 0.798V
I also have the following function calls in the setup():
analogReadAveraging(10); // Teensy: average this many readings
analogReadResolution(10); // Teensy: set ADC resolution to this many bits (2^10 = 1024)
I display the analogRead() value every 1 second and observe a value fluctuation from 214 to 261. The value is approximately correct (should be 247), but it fluctuates.
The board is powered by a battery, so there is no noise coming from a power supply.
I have the 3.3 volts connected to the AREF pin.
I tried to put a capacitor (small and large) on the analog pin, and also increased the analogReadAveraging to 100 but both had no effect.
Any ideas are appreciated...