I received my TSOP1838 IR Infrared Receiver last week from Dealextreme. This post briefly summarises some useful information regarding the PCB pinout and links to an Arduino library that can be used to read the signals from common IR remote controls.
The unit is a TSOP 1838 infra-red remote control receiver tuned for 38kHz operation (“37.9Khz” according to Dealextreme). It operates from 2.7V – 5.5V DC supply, with a nominal range of 18m. It is useful for receiving consumer remote control IR signals (at least ones that operate with 38kHz modulation of their IR signal).
A crucial point to note is that the PCB has a three-pin header whose pinout is different to that of the TSOP 1838 IR receiver chip itself.
The actual chip’s pins are indicated on page 6 of this datasheet — http://www.datasheetcatalog.org/datasheets/134/301155_DS.pdf. However, the PCB transposes pins 2 and 3 of the IR chip (not easily visible on the PCB, and something I learnt by doing it wrong the first time!) Numbering closest to furthest from the PCB header pin labelled “S”, the header pins are: OUT, VCC and GND (see the photo below).
IRremote Arduino library
Ken Sherriff’s Arduino IR Library (IRremote) from 2009 proves to be very useful — see http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html for discussion and download link.
Ken’s zip file contains a folder IRremote, and the website says this should be unpacked into
<arduino> being the path to your Arduino IDE directory). However, for my Arduino 1.0.1 IDE the correct path was
Furthermore, for Arduino 1.0 and later, Ken recommends changing
Having installed the library and made the change to
IRRemoteInt.h I launced my Arduino IDE then opened, compiled and uploaded the
This worked nicely — I was able to decode the keypresses from my XBox 360 media controller and my Sony LCD TV controller (although not from my Foxtel IQ box controller). Pressing buttons on the remote controls caused a small LED on the IR PCB to flash, and the IR codes (corresponding to the buttons being pressed) appeared on the Arduino serial console. Yay!
See http://www.ladyada.net/learn/sensors/ir.html for more details and ideas on IR sensors in general. Also see http://tigar.nl/2012/01/tsop-1838-ir-receiver/ for someone else’s brief comment on using the TSOP1838 IR device itself (not PCB w/header) with an Arduino.