Photo-transistor reading varies depending on light intensity.

Thread Starter

CasualEnthusiast

Joined Dec 10, 2013
2
Hello,

I am trying to learn more about sensors and micro-controllers. I was playing with my Arduino, a motor that spins a disc with a hole in it, a photo-transistor and an LED.

I did various things and setups and in one of the setups I tried to measure the time the photo-transistor is "OFF" and the time it is "ON" (the time the hole is between the LED and photo-transistor and light is reaching the sensor).

What I noticed is that as the motor speed increased, the "ON" time got shorter and the LED intensity was influencing the readings. In other words, I set the motor speed in such a way that the "ON" reading was one millisecond (small hole and fast motor). Without changing the motor rpm, if I changed the LED intensity with a potentiometer, the time reading also changed.

Could someone explain what happened? Does the LED intensity influence the rise and fall times of the photo-transistor and thus the "ON-OFF" times?

What should I do to find out the LED intensity that yields the most accurate measuring results for my project and parts?

Everything is wired like this:
http://learn.adafruit.com/system/assets/assets/000/000/460/medium800/cdslitetestdiag.gif?1340727525

The photo-transistor datasheet is here:
http://www.tme.eu/en/Document/209010fdfa39c018786d416aed2be83e/L-93DP3C(Ver.3).pdf

P.S. I have tried with other photo-transistor models and the results were the same.

P.P.S. I am an amateur when it comes to electronics.

Thank you for your time.
 

MikeML

Joined Oct 2, 2009
5,444
Photo sensors are slowwww. They usually have rather slow turnoff times. Look at the Tr and Tf on the posted data sheet. Used this way, they are used to measure the period of the rotation, not the duration that the hole is allowing light to pass through.
 

Thread Starter

CasualEnthusiast

Joined Dec 10, 2013
2
Hello,

Thank you for your reply. I saw the values but the differences are much bigger than 15 microseconds.

Is there any way to fix this problem? Would a different type of sensor (like a photo-resistor or a photo-diode) perform better?

I might be wrong but I think there is a sweet spot where at a certain intensity the readings are most accurate. Are there any formulas to calculate this?
 

PackratKing

Joined Jul 13, 2008
847
it's a " sunrise / sunset problem " quite similar to the error in exposure produced by a leaf shutter in a camera...

those open in the center first and do not give equal exposure to the film in the center and on edges.

So your light from the led is visible to the photo transistor as soon as the leading edge of the hole gets close enough to trigger it, gets full light as the hole is directly over, and a ' sunset ' as the hole moves away... so as you increase intensity of the led, the ' sunrise ' just happens sooner...

Hope that made any sense...

If you have ever taken a mouse apart, note that the interrupter wheels have slots vs. holes... A slot in the wheel will give better result...
 

ronv

Joined Nov 12, 2008
3,770
A scope picture might be useful. Since it is the on time that gets shorter it could be it is not getting enough "light" to turn it on all the way.
 
Top