This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trouble reading optical sensor with TM4C

Hello everyone, 

I have one question regarding reading value from the optical sensor, it is not quite a trouble as I would like for you to give me advice about the best approach to this issue. I used ADC hardware oversampling with the rate of 64x. And after that again I use the median value of 10 values read from ADC and use that the median to check whether it is above some value (for example 1500 (ADC)->0.6V)  and according to read value is above or below that border value I generated frequency output. Now in testing borderline cases I got signals in the images. In this cases, I'm not sure my approach is good. Maybe to use fixed value as a border for signal on and off is wrong. What do you think? Maybe some different approach in the calculation if the signal is on or off.

  • Not much actual details...

    Are you aware that SAR ADC's (the one's the TM4C has integrated) require a current to flow ? It doesn't matter here <<what>> the sensor measures, rather <<how>> it is interfaced to the ADC (impedance). Looks like you might have a problem there ...