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

Thread: Teensy ADC giving higher than possible ADC reading

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    8

    Teensy ADC giving higher than possible ADC reading

    Hi Guys,

    I am seeing a wierd behaviour on my teensy 3.5. my circuit is in the attached picture. I am using a Phototransistor for sensing light and read this value into the ADC
    Click image for larger version. 

Name:	teensy_adc_circuit.png 
Views:	7 
Size:	18.2 KB 
ID:	21731

    When I make the reading of the ADC and display on serial, the teensy gives value more than the possible based on the set ADC resolution. This is mostly when I shine an LED bright led directly into the phototransistor. However, I assume that even the the max brightness, the max possible value should be for eaxmple 1024 for 10 bit resultion.

    Here is the output from the serial for 10 bit.

    Code:
    1927,19986409
    1928,19986552
    1928,19986695
    1928,19986839
    1928,19986982
    1928,19987124
    1928,19987267
    1928,19987410
    1928,19987554
    1928,19987696
    1928,19987840
    For 13 bits

    Code:
    15669,18966974
    15662,18967117
    15655,18967260
    15652,18967403
    15652,18967546
    15650,18967688
    15651,18967832
    15651,18967975

    In both the outputs, the second number is the number of ellapsedMicros value for tagging each reading.

    Has anyone else had this problem earlier?

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    469
    Quote Originally Posted by imaditya View Post
    However, I assume that even the the max brightness, the max possible value should be for eaxmple 1024 for 10 bit resultion.
    Code please...

  3. #3
    Junior Member
    Join Date
    Jul 2020
    Posts
    8
    I found the mistake, there is no issue with Teensy it works fine, my values averaging logic was flawed.

Posting Permissions

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