Question: How do ADC measurements act when Vmeas exceeds Vref?

Status
Not open for further replies.

RRdae

Active member
If your using the ADC on a teensy 3.6 to measure a voltage, with Vref set to either the 3.3v or 1.2v onboard supplies and the measured voltage exceeds the selected Vref voltage, but not by enough to damage the hardware, does the Teensy measurement:
1. Cap out at the specified resolution. Max at 65536 for a 16bit configuration, for example?
2. Roll around and start from zero?
3. Give completely random results?

I am hunting down an issue with my Teensy giving unrealistically scaled results that SEEM correct, right measured waveform, but scaled way too high (Teensy reads 100k+ for 16bit resolution) and cannot remember how the uC is suppose to act when the ADC goes over voltage. I am not in a position to try it on a teensy at the moment, so I am hoping someone can set me straight.

Thanks
 
Last edited:
The results are capped to the resolution, so if you are using 8 bits then the max is 255 and that's what you should see. There's no overflow or anything like that.
 
Since the upper 16 bits are always zero, anything exceeding that is most likely the result of your processing.

I looked at your original post again and realized that in your data plot you were comparing apples to oranges. Instead of using the scope to measure the output of your current sense amplifier, you instead measured the voltage on a completely separate sense resistor. What is the sense amp doing?
 
The Teensy appears to have been reading true. The error is in the hardware, somewhere. The consensus from a question on my hardware on stack xchange is that the design is flawed (did not use a 4 pin current sense resistor and my current sense leads deviate from the symmetric Kelvin design). Beyond that, I have no idea why I am seeing such huge current spikes each time the PWM triggers. I intend to get a demo board and try a few different filters on the current sense resistor side before I make a new PCB revision.
 
Status
Not open for further replies.
Back
Top