ADC transaction noise

Discussion in 'The Projects Forum' started by dominicfhk, Jul 30, 2014.

  1. dominicfhk

    Thread Starter New Member

    Jul 8, 2012
    9
    0
    Hey guys!

    I am working on a project which I use a 3.3v 10bit ADC to record the output from a couple of photo sensors. The circuit is just a simple NPN phototransistor couples with a resistor to the ground, forming a common collector amplifier. I put the circuit outside for testing and noticed there are fluctuation when transiting from higher voltage to low voltage and vice vesa. I am just wondering if there are ways to suppress the fluctuation through either analog or digital domain?

    The 3v3 power line seems pretty clean on the oscope, although my oscope might not be sensitive enough to pickup slight fluctuation. It is due to Johnson noise and G-R noise? If so, how do I counter them? Thank you so much!!
     
    Last edited: Jul 30, 2014
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Post your circuit. Looks like inadequate bypassing to me.
     
  3. dominicfhk

    Thread Starter New Member

    Jul 8, 2012
    9
    0
    Not sure why I can't correct the typo... Oops
    Here is the circuit I use. The resistor is selected such that the sensor responses in somewhat linear fashion.
    [​IMG]
     
  4. AlphaDesign888

    New Member

    Jul 27, 2014
    189
    10
    Linear fashion? That resistor value will not make any difference other than how much current the output can sink.
     
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I had in mind the bypassing around the ADC and the VCC line.

    How fast is your light signal changing? Maybe you could parallel Re with a bypass cap to lower its AC impedance while the A/D converter is converting...

    Oh, and what is typical value for Re?
     
  6. dominicfhk

    Thread Starter New Member

    Jul 8, 2012
    9
    0
    Thank you for your reply. Please correct me if I'm wrong. The transistor produces a current when it's base junction is exposed to light, which goes through the resistor. The output voltage would just be I*R, and the voltage goes to my ADC, therefore generating the plot I posted.
     
  7. AlphaDesign888

    New Member

    Jul 27, 2014
    189
    10
    Could be. Trans-resistor. Transistor. Geedit?
     
  8. dominicfhk

    Thread Starter New Member

    Jul 8, 2012
    9
    0
    Mike,
    Thanks. The signal is not fast at all, I basically just pointed the sensors toward the sky. On the plot, the sampling f is 666Hz, so each count on the x-axis is 1.5 ms. For y axis, each count is 3.23mV. Resistor is selected to be 1k5.
    What vale of cap would you recommend?
     
  9. NorthGuy

    Active Member

    Jun 28, 2014
    604
    121
    Everything looks smooth to me. It is some noise (always). When it gets quantized by ADC, you get this sort of patterns. If the actual reading is between counts, it'll fluctiate between these counts. If it is close to the count, you get a straight line.

    If you want it smoother, you need higher resolution ADC, in which case you will see the underlying noise better.

    Alternatatively, you can apply some sort of smoothing average.

    The only exception is a blue line on the second picture, which exhibit lots of noise. Do you know why is it different from others?
     
  10. AlphaDesign888

    New Member

    Jul 27, 2014
    189
    10
    So the transistor gets turned on quite hard if Re is 1K5.
     
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here is the relative frequency response at four different values of C1. Note the bypass between the 5V and Vss placed near the phototransistor.

    If this is a solar sensor, nothing is changing in a minute. How about just reading the sensor 64 times in rapid succession, doing a running sum, and then just right shift the sum six bits to get an average of the 64 readings...?

    I would still add the two capacitors, though. Doing that might just fix the problem...
     
    • D172.jpg
      D172.jpg
      File size:
      301.2 KB
      Views:
      21
  12. dominicfhk

    Thread Starter New Member

    Jul 8, 2012
    9
    0
    I took the circuit out on a rather cloudy day, so I think the sudden jump of the blue line might due to the moving cloud, not necessarily due to noise.

    Not really, the output of the circuit swings from 0V in dark condition to 3.22V at full brightness. The transition in between seems to be quite linear when I plotted the data. I think it has to do with the type of transistor I use.

    Thanks guys. To sum up, the solutions would be
    1) take the moving average, and
    2) use a rc filter to drive the ADC <- I am thinking the noise might also be due to aliasing. When cloud moves by the sensor, the sudden drop of signal carries high frequency components when decomposed with Fourier transform, so a rc filter would help in band limiting my signal too. Great suggestion, thanks!
     
  13. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Phototransistors are an unstable reversed biased PN junction, they are very noisy.

    At the very least you should put a 0.1uF cap in the ADC input pin but for a slow changing signal you can even go to a larger cap like 10uF or 22uF.
     
Loading...