DPRG List

 DPRG: biasing & reading a phototransistor Message index sorted by: [ date ] [ thread ] [ subject ] [ author ] Previous message: DPRG: biasing & reading a phototransistor Next message: DPRG: Contest and Practice Issues Subject: DPRG: biasing & reading a phototransistor From: Dennis dld at cyberramp.net Date: Sat Aug 14 12:44:02 CDT 1999 ```I'm working on adding encoders to Rover, the little Lynxmotion robot I brought to the meeting last week. I've made some black & white striped discs & attached them to the wheels, and I found some "Reflective Object Sensors" (Optek OPB741) at Tanner's yesterday. These consist of an IR LED and a phototransistor in one package, focused on a point 0.15" in front of the detector. The spec sheet is at: http://www.optekinc.com/book/pdf/opb740.pdf I'm trying to figure out an appropriate value to use for the biasing resistor on the phototransistor. At Optek's site, they have an application note (http://www.optekinc.com/book/pdf/BULLETIN213.pdf) that describes basic circuits to use for emitters & detectors. Based on this, I initially chose a 220 ohm resistor for current limiting on the emitter, and a 10K resistor to bias the detector. With this, when the detector is in the "off" state, I get about 4.8 volts at the output, but when I put something reflective in front of the detector, the voltage only drops to something like 4.5 volts. I figured this meant the transistor was partially conducting, but not saturated. Being the mathematically- and electronically-challenged person that I am, I started trying to determine the appropriate resistance empirically. I went down to 4.7K ohms, but this made it worse, so I started working the other way. I tried 33Kohms, 47Kohms, 100Kohms, and things got steadily better, in that the difference between the on and off voltages became greater. Finally at 220Kohms, the "on" voltage dropped to 0.2 volts, which I took to mean I had achieved saturation. However, now the "off" voltage is only 3.5 volts or so. The Optek app note led me to expect a swing from 0.4 volts to 4.9 volts, but I can't seem to find a resistor that achieves this. Of course, the Optek app note may have been for a photodetector with different characteristics than the one in the OPB741. So, my question is, does a 0.2 to 3.5 volt transition sound reasonable for this photodetector? Is it possible that I'm going to damage it by using the wrong resistance? (I tried swapping it out for a different unit in case I had damaged it, but the new unit showed the same results.) Also, when I try to hook this open-collector output up directly to a Basic Stamp II & read it using the "count" command, I get lots of noise when transitions occur. So I tried running the output through a 7414 Schmitt trigger inverter that I had laying around from when I used to play with electronics 10 years ago, but apparently its input impedence is too low, as the voltage swing at its input goes from 1.4 to 2.5 volts, which doesn't appear to be enough to get it to trigger. I'm going to go out to Radio Shack & look for a CMOS schmitt trigger to see if it makes a difference, but I'm wondering if I'm going to have to use something else -- a comparator? an op-amp? Unfortunately, I have no experience using those. Optek appears to be a local company, located on Crosby Road in Carrollton, so I may try to call them Monday. But if anyone has experience interfacing these parts or similar photodetectors, I'd appreciate any advice you can give me. Thanks, Dennis Draheim ------------------------------ ``` Previous message: DPRG: biasing & reading a phototransistor Next message: DPRG: Contest and Practice Issues Message index sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the DPRG mailing list