Two-wire remote photointerrupter circuit
Phil Pilgrim (PhiPi)
Posts: 23,514
I needed a photointerrupter circuit that would work over a two-wire cable. This is what I came up with:
The circuit is basically a current loop, and the current in my test circuit varies between 1.84 mA and 2.95 mA, depending upon whether the sensor is obscured or not. This results in a 2.05V to 3.16V output range, which could be detected either by an ADC or a by comparator. The downside, of course, is that Darlingtons are slow, so it probably would not be a good circuit to use in a remote encoder, for example.
Any and all suggestions for improvements to this basic concept are welcome -- especially those which shorten the response time and/or provide a wider, or more logic-compatible, output range.
-Phil
The circuit is basically a current loop, and the current in my test circuit varies between 1.84 mA and 2.95 mA, depending upon whether the sensor is obscured or not. This results in a 2.05V to 3.16V output range, which could be detected either by an ADC or a by comparator. The downside, of course, is that Darlingtons are slow, so it probably would not be a good circuit to use in a remote encoder, for example.
Any and all suggestions for improvements to this basic concept are welcome -- especially those which shorten the response time and/or provide a wider, or more logic-compatible, output range.
-Phil
Comments
V1 / V2 = (3.7 / 3) * (R1 / (R1+R2) where R1 is the loop termination resistor and R2 is the one at the end of the loop. That suggests that a lower value for R2 would increase the ratio.
For speed, maybe something could be done with a cascode. It might take a bit more Vf from the led (or two diodes in series) to give it enough overhead. Does it need to be a photo-Darlington?
I did fiddle with the R values a little bit -- just shotgunning it, not much analysis -- and the 1K/1K combo gave me the biggest current spread among the values I tried. I did consider a cascode conneciton for speed -- haven't tried it yet -- but I was not sure if it would help a Darlington, which I need for the sensitivity. I like your idea of using Vf of the IRED to set the base voltage, BTW!
-Phil
receiver:
http://www.ebay.com/itm/100pcs-5mm-940nm-IR-detector-sensor-Infrared-Phototransistor/370609015183?_trksid=p2047675.m1850
transmitter:
http://www.ebay.com/itm/390221393754?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649
...A slight modification of your circuit provides an output of 1.36V to 2.72V configured as a standard "slot detector" with similar currents on the IR led.
Circuit modification below....
-Phil
I just did a quick check using the same circuit powered from 3.3V instead of 5V. .... The output voltage ranges from 1.3V to 2.2V.
Note: The gap distance between the RX and the TX in my test setup was about 1/4 inch.
For the cascode connection, there is something like this:
Both the photodiode and the amplifier transistor benefit from low voltage swing.
I like the idea of a photodiode due to its inherent speed -- assuming it can be amplified adequately.
__________
Thanks, guys! I'm glad I posted this here and was able to attract my two favorite analog gurus!
My app has one additional criterion: either the IRED or the sensor has to have a very small aperture; its complement, a large one. Lensing might work, but it adds one more level of complication.
-Phil
Applications:
940nm ( 840nm~1100nm ) Infrared applied system
Camera
Cockroach catcher
Phil, surely the ultimate, if not the penultimate?
-Phil
The cascode is a two-stage amplifier composed of a transconductance amplifier followed by a current buffer. Compared to a single amplifier stage, this combination may have one or more of the following characteristics: higher input-output isolation, higher input impedance, high output impedance, higher gain or higher bandwidth. In modern circuits, the cascode is often constructed from two transistors (BJTs or FETs), with one operating as a common emitter or common source and the other as a common base or common gate. The cascode improves input-output isolation (or reverse transmission) as there is no direct coupling from the output to input. This eliminates the Miller effect and thus contributes to a much higher bandwidth.
I was so confused. I thought eliminating the Miller effect had to do with me sobering up from that tall boy MGD I enjoyed before reading this post...
-Phil
I'm not as think as you drunk I am, Pister Molice Occifer!
Thanks for the Osram recommendation. What I really need, though, is a near point source with a fairly wide beam angle, and a sensor with a fairly wide sensitive area. I could do it with lensing but would prefer not to.
-Phil
'Might work if the response is fast enough. Since it's a voltage-output device, instead of current-sinking, I might have to rethink the two-wire topology. The cable could be quite long, though.
-Phil
While I haven't tested this circuit yet, it should look like a resistor who's value is inversely proportional to the coupling between the IR LED and IR photo-diode. The basic idea is that the IR led starts with full current as long as the photo-diode is blocked. This should result in an output voltage around 1.4 volts because the MCP604x starts loosing drive current capability. As soon as light couples with the photo-diode it's photo current is turned into a large voltage that subtracts from the LED's drive voltage. This negative feedback should stabilize the output at something like 3 volts. Using an MCP6041 op-amp I'd expect this circuit to have about 1KHz bandwidth. Using a faster op-amp or reducing Z1 will speed it up.
Lawson
The circuit is reminiscent of LM10, the first and foremost low voltage op-amp. See figure 4 in the app-note, AN-211a, "Two Terminal Light-Level Detector with Hysteresis". It operates the photodiode in voltaic mode with the op-amp as a comparator and the 0.2V reference as threshold. The LM10 was (and still is) fully specified for operation down to Vdd=1.1V and even less at low current, and up to Vdd=40V, quiescent current 270µA. Many of the example circuits involve using the LM10 in floating mode to transmit values as current on a pair of wires.
I went to TI to find the above link and was surprised to find that the app-note there is a revised version dated May, 2013. The original material is almost all there, but it is kind of a travesty in my opinion that it does not mention the original authors, Robert Widlar, Robert Dobkin, and Mineo Yamatake, or that the note dates from 1978. One can still find Robert Widlar's original tech note, R. J. Widlar, “Low Voltage Techniques,” IEEE J. Solid-State Circuits, Dec. 1978, as TP-14.
Anyway, the TS1003 would let my photo-interrupter circuit have an low voltage output about 1 volt. That would let the circuit work more comfortably with the Prop's inputs. (which have a threshold at ~43% of the supply voltage, 1.42 volts with a 3.3 volt supply)
Lawson