Adc fluctuations teensy 3.6

Status
Not open for further replies.

Falcao

Member
Hi, I'm trying to read a voltage on a analog pin with my teensy 3.6 but there are a lot of fluctuations in the readings.

I first read the tension of my power supply (12v, after a tension divider (r1 = 3.9kOhms and R2 = 1kOhms), and this adc line is clamped with two diodes between +3v3 from one LM1117 and ground, the readings are very stable.

I then try to read another tension, clamped to a stable +5v, and this time my tension divider is r1 = 180kOhms and r2 = 330kOhms, the readings are pretty chaotics.

All my adc's lines have two filter capacitors to prevent fluctuations.

What's weird is that when I read this tension with my Arduino Uno, it's very very very stable, like it should be with my Teensy, even with my voltmeter the value is stable

Do you have any ideas on what is going on 😥 ?

Thank you very much for your help
 
I first thought of an impedance problem but why the arduino would be able to read it stably and the Teensy not 🤔🤔
 
Is your stable +5V from the USB on the Teensy? I've been struggling with the same problem on a Teensy 3.2. The 12 bit ADC input had at least 5 LSBs of noise (around 25 mV). I wound up using an external voltage reference and a filter on the ADC input which got the noise down to about 2 LSBs with 12 bit ADC. A simple IIF on top of that gives me pretty stable results. Oddly enough, the same set up on a Teensy 4.0 using the 3.3V as the reference (no ext ref on the T4) was rock solid even with no filter - barely 1 LSB of noise.
 
My +5v is very stable (out of a mic29301), but the problem occurs both with my external supply or with the usb power from my laptop.

What is really weird is that the first reading of the +3v3 is stable, no noise at all, but when it comes to the other adc line, it's an other story.

With my arduino uno, everything is fine, no noise at all. That's why i'm thinking of an impedance problem with the very large resistors from the tension divider...
 
Hello, your voltage divider resistors have significantly high resistance, why do they need to be so high? The 16-bit ADC is only getting a few microamps of current, the noise is probably also of the same order. Also if you're using digital signals, connect your analog ground to the Analog GND pin, which may help filter digital noise appearing on the ground.
 
Thanks UHF for your answer,

AnalogGND is already connected to ground, and you're right, I will try with smaller resistors.

But what I don't get is why does it work fine with the Uno and not with the Teensy ?

And also, I'm working with 10-bit adc, and the range of noise is from -30 to +30 😞
 
The ADC on the Uno has an input impedance of 100M and possibly a significant input capacitance, compared to the K66 on the T3.6 (up to 5K). The Uno is less sensitive to the noise.
 
The 180k and 330k are here to divide the 5v signal to a 3v3 signal, without interfering too much with a previous devider with a thermistor.

Do you think by adding an op-amp like the lmv324, it'll get rid of the high impedance, and if so, do I have to put a resistor between the op-amp output and the analog input ?
 
If your Impedance is more than 10k you need a capacitor at your input.
If this become too slow, you need the opamp.
 
If an other Input is higher than 3.3V or lower than 0V you will have noise and error.
So i use rail to rail opamps with the same supply as avcc.
 
Status
Not open for further replies.
Back
Top