ADC transaction noise

Thread Starter

dominicfhk

Joined Jul 8, 2012
9
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!!
 

Attachments

Last edited:

Thread Starter

dominicfhk

Joined Jul 8, 2012
9
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.
 

MikeML

Joined Oct 2, 2009
5,444
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?
 

Thread Starter

dominicfhk

Joined Jul 8, 2012
9
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.
 
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.
Could be. Trans-resistor. Transistor. Geedit?
 

Thread Starter

dominicfhk

Joined Jul 8, 2012
9
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?
 

NorthGuy

Joined Jun 28, 2014
611
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?
 
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?
So the transistor gets turned on quite hard if Re is 1K5.
 

MikeML

Joined Oct 2, 2009
5,444
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?
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...
 

Attachments

Thread Starter

dominicfhk

Joined Jul 8, 2012
9
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!
 

THE_RB

Joined Feb 11, 2008
5,438
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.
 
Top