Phototransistors not going completely LOW

Thread Starter

beenthere

Joined Apr 20, 2004
15,819
I see a couple of potential problems. Your emitters are not being driven very hard. The mocrocontroller's outputs are not meant to push current. Using a Darlington array (one of the ULN series, like the ULN2803) will let you operate those IRLED's at closer to 50 ma so they are a lot brighter.

Second, your phototransistors turn on when lit and pull the level down. Using a larger resistor in series, like 27K, will let the signal drop closer to ground. At any rate, going to within .1 volt is well within the LOW logic level.
 

hgmjr

Joined Jan 28, 2005
9,027
I am having a problem with the RS phototransistor going completely LOW when the sensor is blocked. It goes from +5v to +.10v not allowing the PIC Microprocessor to see the low (absolute zero) state. If you look at the schematic and look at the top right, you will see the diagram of the phototransistor location. I have used a 15k resistor to pull the source to ground when the phototransistor is blocked at RB0, RB1, RB2 and RB3 at the PIC. Apparently it is not working because it doesn't go to 0v (low). The PIC is looking for a 'high' when the sensors are not blocked. If I force the pins to ground, all works fine. I used the 15k resistor upon recommendation, but now I am thinking I should have used a 10K as normally suggested. I have the PCB completely assembled and installed, so it isn't that easy to pull out and start experimenting. If I know this could be a fix, I'll do just that but it would be nice to know before I start tearing things apart. Any suggestions?
Thanks all.
The sensor output needs to apply a high to the input of the PIC when the phototransisor is illuminated. Conversely, the sensor output need to apply a low to the input of the PIC when the phototransistor is not illuminated. One possible explanation would be there is a portion of ambient light source illuminating the phototransistor. You can determine if this is a factor contributing to your problem by darkening the room and testing the performance of the sensor. If this is the problem you can use a technique referred to as aperturing. Aperturing involves placing a short piece of tubing between the phototransistor and the LED. The tubing is placed over the phototransistor so that it lines up with light source.

hgmjr
 
Top