Recently I have been working on a project that would allow anyone to turn a Raspberry Pi into a universal remote. To do this I have been using LIRC (LINUX Infrared Remote Control), LIRC is a package that allows you to decode and send infra-red signals to many (but not all) commonly used remote controls. This project provides a starting point for experimenting with an IR LED and the LIRC package on the Raspberry Pi and extending the basic setup with new features and functionality, such as adding an IR receiver to generate a LIRC remote profile using an existing remote control.
To build a universal remote with a Raspberry Pi you first need to build a simple circuit (shown below). The circuit consists of an IR receiver which will be used to program the RPI remote using a current remote. You also need an IR LED which will be used to send the infrared signals. Below is a list of the materials I used in my circuit.
- 940nm IR LED 20deg – 20-degree viewing angle. Bright and tuned to 940nm wavelength
- 38khz IR Receiver – Receives IR signals at remote control frequencies
- PN2222 Transistor – Transistor to help drive IR LED
- 10k Ohm resistor – Resistor that goes between RPI GPIO and the PN2222 transistor
To control a device with an IR receiver, the IR LED transmitter must send a specific signal sequence. The LIRC package, which emulates the infrared signals of many remote controls, is the perfect tool for the job. LIRC is available in the Raspbian software repositories, so installing it on Raspberry Pi is very simple.
Currently, I am working on several LabVIEW VI’s that will act as a graphical interface for LIRC to make it easier to use. The first VI installs LIRC and configures the files which will simplify the process and make it easier for people who are less familiar with Linux. There will also be a VI for adding/deleting remote profiles and another VI for actually using those remotes. When I am finished, I will also create a data dashboard interface which will allow someone to control their Raspberry PI remote from a tablet.
Thank you for reading my blog post, check out my Instructable where I give step by step instructions. If you are interested in making project yourself but don’t have the right supplies, you can purchase the LabVIEW computing kit for the Raspberry Pi 2. This kit includes a copy of LabVIEW 2014 home edition and everything you will need to run LINX 3.0 and start making projects. Please comment with any questions or comments you may have.
6 Comments on “Using a Raspberry Pi as a Universal Remote”
The drawing of the breadboard wiring is incorrect. The 10K resistor should be connected to the transistor base (center pin) and the IR led to the emitter (right pin). i.e. shift these two connections one hole to the right.
I really appreciate your comment, I changed the fritzing image and I believe it is now correct.
Thanks for your help!
Thank you for your feedback, could you please be more specific about the errors you’re talking about? I am more than willing to go back and fix them.
Is there a way to essentially ‘control’ a tv anywhere using this rig or something like it? What I mean by this is, can it put out a whole bunch of device codes (the IR signal that tells which remote is sending the signal) so it can work on pretty much any kinds of TVs? the reason for this is because I want to make a universal remote for my school’s Interwrite boards that the staff and other administrators can control the board if they don’t have the specific remote linked to the board. Is there a way to do this? and if there is can you tell me how?
This is really interesting. I was looking around for something like this. My goal is to train a pi with all of the remotes in my living room, then build a simple webUI with the various controllers and commands baked in.