Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

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

Hybrid View

  1. #1

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

    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 by RRdae; 05-17-2020 at 04:13 AM. Reason: grammar

  2. #2
    Senior Member+
    Join Date
    Jul 2013
    Posts
    292
    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.

  3. #3
    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?

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •