3
\$\begingroup\$

What I need is: when I turn on a IR led, a receiver circuit in the other side would have 5V or 0V depending on the state of the transmitter. Simple.

I have a IR transmitter and a photo-diode for receive, those used on every IR control and receiver. I don't know how the photo-diode works so how should the circuit be? Should I use a transistor configured in saturation / cut-off working with the receiver?

Feel free to recommend me. Thanks

\$\endgroup\$

5 Answers 5

2
\$\begingroup\$

Phototransistor configured as an inverter:

5V ----+
       |
       /
       \  47k
       / 
       |
       +----- Logic output (inverted)
       |
  \   /
  \  |    NPN
      \>  Phototransistor
       |
      ---
       -

A phototransistor is like a photodiode, but has a significantly increased gain. So when light shines on it (or IR, if it has an IR filter) it will pull down the output, conducting a few mA. A photodiode could do the same job, but you'd need a much greater (x100-1000) resistor, and this might be overwhelmed by the any load impedance.

You could put another inverter on the output to get a logic signal of the correct polarity (or to buffer it, as it won't take much load current.) Here is one possible inverter circuit:

          5V ----+
                 |
                 /
                 \  10k
                 / 
                 |
                 +--- output
                 |
          10k   /
Input ---/\/\/--|   NPN
                \>  2N3904
                 |
                ---
                 -
\$\endgroup\$
10
  • \$\begingroup\$ I bought a phototransistor but it looks like the dude one the shop gave me a photodiode. How can I know which one is it? (it looks like a white led) \$\endgroup\$
    – Tomas
    Nov 6, 2010 at 16:20
  • \$\begingroup\$ They look identical. I suppose the only way to test it is to wire up this circuit - if it works, then you have a phototransistor. \$\endgroup\$
    – Thomas O
    Nov 6, 2010 at 16:32
  • \$\begingroup\$ Ok. I'll try your circuit. Just on more thing: the emitter in your circuit would be the cathode (the short leg), right? \$\endgroup\$
    – Tomas
    Nov 6, 2010 at 16:47
  • \$\begingroup\$ I'm not sure. Try it both ways, there should be no harm due to the low voltages and very low current. \$\endgroup\$
    – Thomas O
    Nov 6, 2010 at 16:51
  • 1
    \$\begingroup\$ @Thomas: if you swap the resistor and phototransistor you don't need the extra inverter. \$\endgroup\$ Jun 18, 2011 at 8:58
3
\$\begingroup\$

You'll find that without modulation the circuit (like one posted by Thomas O) will be extremely sensitive to ambient illumination. When the lightning conditions change the output will stick to either 0 or 5V. In theory you could work it around by adding a biasing circuit driven by a very low bandwidth feedback loop (so that slow illumination changes are cancelled and your signal is not) but it's much easier to modulate the signal driving your IR LED - that's what most (all?) commercial circuits do.

\$\endgroup\$
2
\$\begingroup\$

Look at 3-pin 38 KHz IR receiver. Its best possible receiver part with very low cost. If your signal channel can comply to return to zero requirement (no information bit=1 state of signal is longer than milliseconds) then you can use standard parts like this.

Sorry for radioshack reference, but its first link on google: http://www.radioshack.com/product/index.jsp?productId=2049727

\$\endgroup\$
6
  • \$\begingroup\$ Unfortunately the 38 kHz receiver you linked to is only capable of receiving 38 kHz encoded signals. It is designed to not pick up ambient light, or in this case, slow pulsing IR. \$\endgroup\$
    – Thomas O
    Nov 6, 2010 at 23:20
  • \$\begingroup\$ Exactly. I need something more simple. \$\endgroup\$
    – Tomas
    Nov 7, 2010 at 0:23
  • \$\begingroup\$ Agree, but. Attempt to transmit 1-bit DC over noisy channel (ambient IR environment) is not small feat. Unless your range and optical path is fixed and around few millimeters. In reality the Db range involved can vary up to 80-100Db. Its more like true AM radio. \$\endgroup\$
    – user924
    Nov 7, 2010 at 3:07
  • \$\begingroup\$ I understand now, the ambient IR contamination, makes my DC channel impossible. I'll have to go for the modulated channel. \$\endgroup\$
    – Tomas
    Nov 8, 2010 at 15:51
  • 1
    \$\begingroup\$ This is definitely the right approach - there is a tremendous amount of 'hard stuff' done in that little 3-pin can, and it costs peanuts to buy. If you're only trying to convey on or off, then you don't have to worry about any of the IR signalling schemes - just flash your LED at 38K in one condition and leave it off in the other. \$\endgroup\$
    – user1844
    Nov 8, 2010 at 18:06
1
\$\begingroup\$

Like the others said, use a modulated signal. It will give you a much more reliable transmission. For the receiver I often use Vishay, which has a wide offering in carrier frequencies, packages and protocols.

In its most basic form the transmitter is just an astable multivibrator driving the IR LED. But the AGC (Automatic Gain Control) in the receiver is not designed to receive a continuous carrier. So it's better to simulate some RC protocol and choose a receiver for that protocol.

For the transmitter you can use a small microcontroller like the AVR ATTiny4 or Microchip PIC10F200. Both have an internal oscillator and work without any external components, then all you need is a resistor, a transistor and the IR LED.

While the AVR is more performant than the PIC, this is not required here, and overmore: the accuracy of the "calibrated" internal oscillator for the AVR is a disappointing 10%, while the PIC is 1% accurate. So the PIC may be the better choice.

\$\endgroup\$
0
\$\begingroup\$

The modulated route is the way to go. But try the other untill you are sufficiently frustrated with it. Use a 555 timer in the transmitter. This is still very simple and cheap.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.