Introduction: Make Your Own IR Remote That Can Reach Anywhere

My home theater is far away from my bed and the remote is unreachable there. Many a time, I thought of controlling the home theater from my bed to enjoy music anytime (due to laziness of course). So, I did some search and found this great video from GreatScott. That video provided me enough information to get started. Then further, I taught myself the remaining things to send and receive IR codes from IR receiver and transmitter. After building this you'll be able to control anything that is unreachable from your spot, provided you have enough wires.

Step 1: Parts Required


Infrared receiver (any kind having three legs like TSOP38238)
Refer data sheet for pin out of your receiver using the number written on it.

Infrared transmitter LED
Short leg is cathode or ground.

1K resistor

Push buttons (number depends on how many functions of the device you want to control)

Ribbon Cable (as per your requirement)

Arduino Library


Standalone Arduino circuit
5V Relay
Project box
Hot Glue Gun
Male and Female headers

Step 2: Basics

I first recommend you to watch GreatScott's video, link is provided in the introduction.

Now we know that every device manufacturer uses different hex codes to differentiate the signals and function accordingly. So, we just have to get those hex codes and transmit those with the help of IR led.

But, there are several protocols which device manufacturers follow. The protocol varies from device to device and from manufacturer to manufacturer. If we want the device to understand the code, we will have to follow that protocol and send the data accordingly. No need to worry, the Arduino library takes care of all that things. All you gotta do is to determine what protocol your device uses.

Before proceeding further, please read this explanation of various protocols and how they work from Adafruit.

Adafruit IR Tutorial

Step 3: Determining the Protocol and Getting Hex Codes

Install the two libraries link of which is given in Step 1. Now go to examples, then IRLib-master and open IRrecvDump, upload the code to your Arduino. Connect the output of IR receiver to pin 11 after supplying the power to it with Arduino 5V and GND pin.

Now you are ready to determine the protocol of your device.

Open serial monitor. Point your remote to the receiver and press any button, a lot of things will pop up in the window. We only care about one thing, the first line.

The letters after "Decoded" is the protocol used. In my case it is NEC and "Value" is the hex code of that signal.

Now you know the protocol you have to use.

After this, you have to get the hex codes of different buttons you want to use. For that open IRrecvDemo from IRRemote in the examples. This will only give the hex codes of button pressed in serial monitor. Upload the code to Arduino and note down the hex codes of different buttons you want to used.

Note: The receiver is very sensitive and almost all light sources emit infrared rays that can get caught by the receiver which will interfere it's functioning. So to prevent that, keep the receiver in dark, otherwise you will get garbage in the serial monitor.

Step 4: Sending IR Codes

Connect an IR transmitter led in the pin 3 of the Arduino and the short leg in series with a 1K resistor to ground.

You can’t change the pin number for sending IR codes, the library doesn't allow it. You can only use pin 3 for this purpose.

Open IRsendDemo from IRLib-master examples folder. In place of "Sony" write the name of your protocol you decoded in the previous step. Notice the blue color while writing the name of the protocol. If it does not changes to blue, manipulate it, make some letter, make some small make something caps, something that makes sense. For NEC all letter has to be written in caps. In the second argument of the function My_Sender.send, write the decoded hex code after "0x". 0x tells the Arduino that code is in hexadecimal format. Leave the last argument as it is. It is the number of bits a protocol uses and generally 20 is OK. Learn more about that in the Adafruit PDF I mentioned.

But you are not ready just now to successfully send the codes.

Step 5: Finding the Receiver Location of Your Device

For the device to successfully catch the codes you sent, you have to point the IR led directly to the receiver, inside the device. It will be generally behind a thin material, like a glass or a film or something, something through which IR rays can pass through, not behind some solid material like the covering. To find the receiver, play with your originally provided remote, to get an estimate of the receiver location. Then bring your IR led connected with Arduino in front of it. Open serial monitor, wave your IR led in front of the device where you estimated the receiver will be while pressing the enter key. This is because according to the code we uploaded, the Arduino will only send the codes if it receives a letter in the Arduino serial monitor.

You'll find a place soon, where the device responds to all your codes perfectly and you'll feel very happy, I know :D.

Step 6: Going for a More Permanent Setup

After prototyping, it's time for some planning to permanently setup the whole thing.

The remote: I used a perforated board to make the remote. I used 6 push buttons with 1K pull down resistors, and soldered 4 meter long ribbon cable to it. The push button circuit will be installed right next to my bed, while the other end will be connected to micro controller board. Also I added male headers to the other end for convenience.

The transmitter: I made a stand with the help of GI sheet. You can use your own idea for mounting the IR led to the device. instead of soldering wires to the LED, I decided to use female that can be removed easily. In the other end, I again used male headers.

Future plans: I'm thinking to add a standalone arduino circuit to the assembly. It will be more practical instead of whole Arduino Uno and will be cost effective. The headers attached will help here. I can use a female header to connect with the standalone Arduino.

Also I have planned to add another push button which will control the relay that will be used to turn on or off the main power supply for the device.

Step 7: Final Problems and Drawbacks

After using it for some hours, I noticed the speaker turns on/off automatically, switches to another mode on it's own or increases or decreases volume on it's own, meaning there was false triggering. This maybe due to noise generated for some reasons.

To remove this, I decided to use another push button with same 1K pull down resistor. The only difference will be, the pins will function only if that push button gives high input to the micro controller, else ignore them. The program is pretty simple. I've attached mine for you guys to get an idea. This reduces false triggering to very large extent and this effect is almost negligible. Now the circuit is working perfectly.

Other drawbacks:

1. The circuit will become impractical if you want to use from far away as there is requirement of really long cables.

Solution: There is another sketch that uses an IR receiver to receive the signals from the remote and sends the received code with an IR transmitter. Meaning the sending and receiving is done in the same program. I've not tested it yet, in a glance, it looked a little complex to me.If I make it work, I'll create another instructable on it. And if it did, it will be very efficient as only three wires will be required from your place to the micro controller and you will be able to use any signal on your remote.

2. The circuit uses too much arduino pins for a simple purpose.

Solution: It's just a concept I thought of. It's like multiplexing Suppose there are 7 push buttons connected to 7 pins of Arduino. We are using 5 push buttons to send IR codes to the IR led. The other two are used for multiplexing. If the first pin is high from the two, the five pins will a different code when pressed, and when the other from the two is high, the set of five push buttons will send another set of codes. Hence we are able to send ten different codes using only 7 pins.

Well, that's all !

I've attached pictures I took during prototyping. This will help you a little, I think.

Please comment if any problem.
Thanks for reading :)


UNSEPARABLE+TECHSCIENTIFICS made it!(author)2017-07-17


Palms made it!(author)2016-06-17

Cool project, I plan to make it with a bit of changes! Just a small hint you could include in yours: to avoid OR interference from regular ligh sources, a small piece from an old floppy disk (the magnetic internal disc, not the plastic envelope) can be used, by placing it in front of the receiver.

elexhack made it!(author)2016-06-17

Thanks for the tip :)

Palms made it!(author)2016-06-17


doktor3616 made it!(author)2016-06-12

Bu öğretici ve eğitici sayılmaz.hazır kitt kullanılmış.

doktor3616 made it!(author)2016-06-12

Arduino çıktı bilgi ve beceri öldü.önemli olan kitt'siz yapabilmek.Kitt'le ninem de yapar.

sbelectrics made it!(author)2016-06-09

I like the idea of an infra-red extender, but think this is unnecessarily complicated, decoding then re-sending the signal, and will only work with the selected protocol. Would it not be simpler to use an IR detector, amplify the signal, and send it down a pair of wires to an IR emitter in the room(s) with the device(s) you wish to control? This would then work with multiple IR controllers and receivers in any number of rooms.

Gertd4 made it!(author)2016-06-11

I used the principle in this instructable to decode IR signals for the tv set and
recode some for my amplifier-sound system. So I can use the tv remote
and still adjust the sound level.

stangaroo made it!(author)2016-06-10

These are widely available.

elexhack made it!(author)2016-06-10

I had no idea. Besides, I feel happy making something and using for myself instead just buying a box that does it for me. Anyways, thanks for the heads up :)

elexhack made it!(author)2016-06-09

Maybe yes! I'm not completely sure how to do that. I'll have to look into it. If you can, please explain, it'll be helpful. Thank you.

GianlucaG1 made it!(author)2016-06-09

That's right!

hrhan212 made it!(author)2016-06-09

The book "Internet of Things with Arduino Blueprints" has chapter on "Controlling Infrared Devices Using IR Remote" The book provides an example with an Arduino board using Ethernet to connect to a router, IR and a browser to control a remote device. You could use WiFi and an ESP8266 instead of Ethernet and An Arduno board.

elexhack made it!(author)2016-06-09


maxwell975 made it!(author)2016-06-09

If both pins are high, you could send a third set of five codes. That makes 15!

elexhack made it!(author)2016-06-09

Thanks for the heads up :)

craighissett made it!(author)2016-06-03

Great project!
You should have a look at the ESP8266 chip; it can be programmed using the Arduino IDE, and can also serve simple web pages...
you could use the IR stuff from this one as is. but also code the ESP8266 to connect to your home WiFi network and serve up the buttons for the functions you'd like. this way you can operate the device from anywhere in your home with your phone without having to run really long cables :)

elexhack made it!(author)2016-06-04

Thanks for the tip. I've been working to understand that thing. But i'm not comfortable just now. I'll surely upgrade it to work with esp8266 to get rid of the cables When i have a good understanding of it.

craighissett made it!(author)2016-06-04

You're welcome!
They are brilliant things once you get used to them; I got started with a development board I found on Hackaday. You can buy them on EBay too.

You could always use a wifi/ethernet shield for your arduino to introduce the same functionality, but they are expensive compared to the ESP8266 :)

ErinK34 made it!(author)2016-06-03

this is hard.

elexhack made it!(author)2016-06-03

Not too much. If you want to try, go ahead, i'll surely help you.

About This Instructable




Bio: I like programming and always have been fascinated about electronics. And therefore I love the horizon where hardware and software meets.
More by elexhack:Word Clock Using Arduino and RTCMake your own IR remote that can reach anywhereGetting Analog Output From Audio Signal
Add instructable to: