DPRG List  

DPRG: biasing & reading a phototransistor

Subject: DPRG: biasing & reading a phototransistor
Date: Mon Aug 16 17:08:15 CDT 1999

Sorry about that. There was a network error here at work which aborted
my edit session, and the reply went out unedited. Unfortunately, I lost
most of the edit. I captured some of it, but I'm not going to take the
time to recreate the other stuff.

Quick summary of some missing material

You've got light leakage. Dark current is too high. Should be 100nA.
This would be a voltage drop of only 0.02 volts. Perhaps the disc is not
opaque to IR.

You've got not enough illumination. You should have 50 uA of current
when light. That would be 10V drop. Either the diode has not enough
current, or the disc is not reflective enough, or the disc is too far
away (or comibination).

The time graph indicates that 200K is 'way too large.

With 10K you should have

	Dark: 5V - (100nA x 10K) = 4.999V
	Light: 5V - (50uA x 10K) = 4.5V

I'd set a comparator to 4.75 with +/-0.1V hysteresis (trip points at
4.65 and 4.85 volts).

With a 200K load you have more than 1ms rise/fall time. That's the
reason you get lots of noise, along with the high impedance which makes
it susceptible to noise injection.

A TTL chip like the 7414 takes 1.6mA pull down on the input to get a
logic low. No way is this going to provide that. You'll *have* to get a
comparator or buffer of some sort. CMOS logic is not a good choice
because it is either CMOS level comparisons (2.5V) or TTL (for HCTL)
which your detector is not going to provide.

- ---------------------------------------------------------------------

With a 100K collector load:
        Dark: 5V - 100nAx100K = 5V
        Light: 5V - 50uAx100K = 0V
Another approach is to determine how much difference we want between the
dark and light conditions. Say we want 2V. Then 2V/(50uA - 100nA) = 40K.
>From the graph, that's pushing things pretty hard.
Just from the graph, I'd say 10K is an *upper* limit on the load
resistor. Even then you are going to notice slow transitions. The
load resistance and collector capacitance form a low pass filter, which
slows down the transitions. At 10K you are going to have 150us rise and
fall times. That's pretty slow, and will need a comparator with
hysteresis. As noted above, with 10K you are going to get 1/2 V of
signal swing. A comparator set to 4.75 V with hysteresis of +/-0.1V might
do well (limits of 4.65V and 4.85V). It's a start, anyway.
How many stripes do you have? How many RPS do you anticipate? Suppose
your max. speed is equivalent to 5 RPS, and you have 20 stripes. That's    
100 stripes per second, or 10mS per stripe. 150us rise and fall times
adds up to 1/3 of a ms. Not too bad, but not too good, either. Ok for
speed sensing, not good enough for position sensing. You'd have to move
quickly, then slow way down for positioning as you neared your goal.
Here's what I recommend:
Put in a 10K load resistor on the collector, and remove the emitter
Put a 91 ohm resistor on the diode.
Stop all current to the diode. See what your leakage current is.
Then turn off all lights in the room and see what it is.
Now reapply current to the diode and see what happens. (Make sure
you've got close to 40mA in the diode. Do this still in the dark. I'd
start with a 200 ohm resistor on the diode, and gradually reduce it
towards 91 ohms.)
This will tell you what kind of light leakage you have got, and whether
you have sufficient illumination from the diode + reflectance from the
I'd try putting a small piece of aluminum foil on one of the stripes
and see what happens.
I'll assume your sensor is mounted on the "inside" of the disc, not the
outside. I'd try cutting out a circle of Al foil and temporarily gluing
it to the outside of the disc. This will make it opaque to IR light.  
Then I'd glue a little spot of Al foil on the inside where the stripes
are. This should give you reasonable reflectance.


More information about the DPRG mailing list