NSLU2-Linux
view · edit · print · history

HowTo.AddAnInfraredReceiverAndTransmitterWithLIRC History

Hide minor edits - Show changes to markup

March 07, 2009, at 04:25 PM by Matthias Goebl -- parallel LEDs require the driver transistor
Deleted line 85:
  • You can have more IR LEDs in parallel or/and serial (adapt the resistor if necessary).
Added line 87:
  • With the second circuit, you can have more IR LEDs in parallel and/or serial (adapt the resistor if necessary).
March 07, 2009, at 04:22 PM by Matthias Goebl -- specified IR-LED, notes about IR current
Changed lines 63-64 from:

or even better:

to:

or even better with a driver transistor:

Added line 82:
  • You can use almost any IR-LED, e.g. a LD271 (67 S 1710).
Changed lines 86-87 from:
  • You can have more IR LEDs in parallel.
to:
  • You can have more IR LEDs in parallel or/and serial (adapt the resistor if necessary).
  • If you need more transmission power, choose the second circuit with the driver transistor. There you can reduce the resistor from 270 ohm (IR current is about 7 mA) safely down to 50 ohm (IR current is about 40 mA).
Added line 90:
April 02, 2006, at 11:10 PM by Matthias Goebl -- changed D/S of MOSFET in circuit
Changed line 32 from:

+---------------+ G | | D +-| 4k7 |-- +3.3V

to:

+---------------+ G | | S +-| 4k7 |-- +3.3V

Changed line 34 from:
                      | | S     |  
to:
                      | | D     |  
February 12, 2006, at 09:04 PM by Matthias Goebl -- updated software section: lirc-0.8.0 now contains nslu2-code
Changed lines 88-91 from:

The NSLU2-specific code is already in LIRC-CVS (thanks to Christoph), but there is no recent bitbake-files in the main monotone repository. There is bug #557 pending, waiting for inclusion: You can get the needed .bb-files there.

to:

The Software

The NSLU2-specific code is already in LIRC since version 0.8.0 (thanks to Christoph).
If you are using openslug, you can simply bitbake lirc-modules_0.8.0.bb and lirc_0.8.0.bb. For your convenience you should install the package lirc-nslu2example, it contains all dependencies and should work out-of-the box if you own a RC5 compatible remote.

January 09, 2006, at 03:32 PM by Matthias Goebl -- recommendation to remove R142
Changed lines 16-17 from:
to:

I'd recommend to remove R142, because it has only 18 ohms. When the MOSFET pulls the trace to ground, it costs your SLUG almost 200mA!

Changed line 37 from:
                     BS170
to:
December 29, 2005, at 04:35 PM by tman --
Changed lines 1-2 from:

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. like RC5. These are normally received by audio and video equipment and sent by remote controls from your couch. The signals are decoded and generated in software using LIRC (see http://www.lirc.org).

to:

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. like RC5. These are normally received by audio and video equipment and sent by remote controls from your couch. The signals are decoded and generated in software using LIRC.

December 29, 2005, at 05:45 AM by Matthias Goebl -- CTS pullup it to 3.3v!!!
Changed lines 22-25 from:

| -- VCC 3 |--+-------| 100R |----+----- +5V | / \ | | +------+ | | / \ | = 4u7 | | | | | | |

to:

| -- VCC 3 |--+-------| 100R |---------- +5V | / \ | | +------+ | / \ | = 4u7 | | | | |

Changed lines 27-35 from:

| | | | | | | \ / | | +---+ | \ / | | | | | -- OUT 1 |-----| |----+ |4k7| +---------------+ G | | D | |

                      |              +---+
                      | | S            |
                      | |--------------+----- CTS2? (Left side of R142)
to:

| | | | | | \ / | | | \ / | | | -- OUT 1 |-----| |----+ +-------+ +---------------+ G | | D +-| 4k7 |-- +3.3V

                      |         | +-------+
                      | | S     |  
                      | |-------+------------ CTS2? (Left side of R142)
December 28, 2005, at 05:29 PM by Matthias Goebl -- LIRC link
Changed lines 1-4 from:

Add an Infrared receiver and transmitter with LIRC

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. conforming to the RC5 standard. These are normally received by audio and video equipment and sent by remote controls from your couch.

to:

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. like RC5. These are normally received by audio and video equipment and sent by remote controls from your couch. The signals are decoded and generated in software using LIRC (see http://www.lirc.org).

December 28, 2005, at 04:05 PM by Matthias Goebl -- added image
Changed lines 94-96 from:

is plugged into my 10-pin-connector (see AddASimpleTenPinConnector): Attach:IR-Adapter.jpg Δ

to:

is plugged into my 10-pin-connector (see AddASimpleTenPinConnector). It has two receivers and two transmitters in different directions:

December 27, 2005, at 08:53 PM by tman --
Changed lines 3-8 from:

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. conforming to the RC5 standard. These are normally received by audio and video equipment and sent by remote controls from your couch.
This is not IrDA! In order to use IrDA, buy a cheap USB-IrDA adapter.

to:

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. conforming to the RC5 standard. These are normally received by audio and video equipment and sent by remote controls from your couch.

This is not IrDA! In order to use IrDA, buy a cheap USB-IrDA adapter.

Changed lines 9-10 from:

We receive on CTS of the 2nd serial port (can be tapped at the left end of R142), that is otherwise unused. The xScale-UART can be programmed to generate interrupts on CTS.

to:

We receive on CTS of the 2nd serial port (can be tapped at the left end of R142), that is otherwise unused. The xScale-UART can be programmed to generate interrupts on CTS.

Changed line 14 from:

However while booting, the green led is off for a minute and the IR LED is constantly on. But

to:

However while booting, the green LED is off for a minute and the IR LED is constantly on. But

Changed lines 43-44 from:
  • The CTS of the internal second serial port is pulled to +3.3V, the MOSFET will pull it to ground -> no 3.3V/5V level problems.
to:
  • The CTS of the internal second serial port is pulled to +3.3V,
    the MOSFET will pull it to ground -> no 3.3V/5V level problems.
December 27, 2005, at 08:52 PM by tman --
Changed lines 1-2 from:
to:

Add an Infrared receiver and transmitter with LIRC

December 27, 2005, at 08:51 PM by tman --
Changed line 4 from:

e.g. conforming to the RC5? standard.

to:

e.g. conforming to the RC5 standard.

Changed lines 6-8 from:

This is not IRDA! In order to use IRDA, buy a cheap USB-IRDA adapter.

to:

This is not IrDA! In order to use IrDA, buy a cheap USB-IrDA adapter.

Changed line 12 from:

The Xscale-UART can be programmed to generate interrupts on CTS.

to:

The xScale-UART can be programmed to generate interrupts on CTS.

Changed lines 15-16 from:

As the green LED is normally on, the IR LED is normally off. When transmitting, the green LED flashes.

to:

As the green LED is normally on, the IR LED is normally off. When transmitting, the green LED flashes.

Changed lines 17-20 from:

because there is no carrier, this shouldn't cause erroneous IR signals. For the precise locations of R142 and R53 see AddASimpleTenPinConnector.

to:

because there is no carrier, this shouldn't cause problems with erroneous IR signals.

For the precise locations of R142 and R53 see AddASimpleTenPinConnector.

Changed lines 40-41 from:
                     BS170?
               (N-Ch. Enh. MOSFET)
to:
                     BS170
               (N-Channel MOSFET)
Changed lines 47-53 from:
to:
  • The SFH5110-38 needs 5V.
  • You can have more than one SFH5110 in parallel.
  • The Buerklin part numbers (in Germany, http://www.buerklin.com/):
    SFH5110-38 (68 S 3438)
    BS170 TO92 (17 S 7400)
Changed lines 85-91 from:
  • The transmitter is active when the green led is off
    -> in normal operation the green led should be on
    -> while transmitting ir, the green led will flash
  • You can have more IR LEDs? in parallel.
  • I'm using a de-underclocked NSLU2 (see http://www.nslu2-linux.org).

The NSLU2-specific code is already in LIRC-CVS on www.lirc.org (thanks to Christoph),

to:
  • The transmitter is active when the green LED is off
    -> in normal operation the green LED should be on
    -> while transmitting ir, the green LED will flash
  • You can have more IR LEDs in parallel.
  • I'm using a de-underclocked NSLU2.

The NSLU2-specific code is already in LIRC-CVS (thanks to Christoph),

Changed lines 93-95 from:

There is bug#557 pending, waiting for inclusion: You can get the needed .bb-files there: http://bugs.openembedded.org/show_bug.cgi?id=557

to:

There is bug #557 pending, waiting for inclusion: You can get the needed .bb-files there.

Changed line 96 from:

is plugged into my 10-pin-connector (see AddASimpleTenPinConnector):

to:

is plugged into my 10-pin-connector (see AddASimpleTenPinConnector):

December 27, 2005, at 10:29 AM by Matthias Goebl -- how to build a hardware circuitry to receive and transmit infrared signals
Added lines 1-102:

AddAnInfraredReceiverAndTransmitterWithLIRC

With the following (minimal) hardware circuitry the NSLU2 is able to receive and transmit infrared signals, e.g. conforming to the RC5? standard. These are normally received by audio and video equipment and sent by remote controls from your couch.
This is not IRDA! In order to use IRDA, buy a cheap USB-IRDA adapter.

How it works

We receive on CTS of the 2nd serial port (can be tapped at the left end of R142), that is otherwise unused. The Xscale-UART can be programmed to generate interrupts on CTS. We transmit with a IR diode between GPIO[1] (can be tapped at the right end of R53) and ground. GPIO[1] is also wired to cathode of the green status LED, which has it's anode at +3.3V. As the green LED is normally on, the IR LED is normally off. When transmitting, the green LED flashes. However while booting, the green led is off for a minute and the IR LED is constantly on. But because there is no carrier, this shouldn't cause erroneous IR signals. For the precise locations of R142 and R53 see AddASimpleTenPinConnector.

The Receiver Circuit

SFH5110-38                                    SLUG:
+---------------+          +------+
|    --   VCC 3 |--+-------| 100R |----+----- +5V
|   /  \        |  |       +------+    |
|  /    \       |  =  4u7              |
| |      |      |  |                   |
| |      |GND 2 |--+---------+--------------- GND
| |      |      |            |         |
|  \    /       |            |       +---+
|   \  /        |            |       |   |
|    --   OUT 1 |-----| |----+       |4k7|
+---------------+   G | | D          |   |
                      |              +---+
                      | | S            |
                      | |--------------+----- CTS2 (Left side of R142)

                     BS170
               (N-Ch. Enh. MOSFET)

Notes:

  • The CTS of the internal second serial port is pulled to +3.3V, the MOSFET will pull it to ground -> no 3.3V/5V level problems.
  • The SFH5110?-38 needs 5V.
  • You can have more SFH5110? in parallel.
  • The Buerklin part numbers (in Germany, www.buerklin.com):
    SFH5110?-38 (68 S 3438)
    BS170? TO92? (17 S 7400)

The Transmitter Circuit

               +------+
      +--------| 270R |---------------------- GPIO[1] (Green Ready LED)
      |        +------+
 IR  _|_
<--  \ /
<--   V 
     ---
      |
      +-------------------------------------- GND

or even better:

                      +---------------------- + 3.3 V
                       \^
                      E \| B   +------+
                BC557    |-----|  1k  |------ GPIO[1] (Green Ready LED)
                      C /|     +------+
          +------+     /
      +---| 270R |----+
      |   +------+
 IR  _|_
<--  \ /
<--   V 
     ---
      |
      +-------------------------------------- GND

Notes:

  • The transmitter is active when the green led is off
    -> in normal operation the green led should be on
    -> while transmitting ir, the green led will flash
  • You can have more IR LEDs? in parallel.
  • I'm using a de-underclocked NSLU2 (see http://www.nslu2-linux.org).

The NSLU2-specific code is already in LIRC-CVS on www.lirc.org (thanks to Christoph), but there is no recent bitbake-files in the main monotone repository. There is bug#557 pending, waiting for inclusion: You can get the needed .bb-files there: http://bugs.openembedded.org/show_bug.cgi?id=557

The following picture is an example of a receiver/transmitter circuit that is plugged into my 10-pin-connector (see AddASimpleTenPinConnector): Attach:IR-Adapter.jpg Δ

Matthias Goebl <matthias(dot)goebl(at)goebl(dot)net>

view · edit · print · history · Last edited by Matthias Goebl.
Based on work by Matthias Goebl and tman.
Originally by Matthias Goebl.
Page last modified on March 07, 2009, at 04:25 PM