ARDUINO how to build your own universal IR remote control

Infrared remote controls are every where today, this tutorial will show you how to build your own IR remote control  using a ARDUINO board and a simple circuit..

For a video version of this tutorial please watch the VIDEO below.

 

The library.

First you will need the ARDUINO IRremote library and that can be downloaded at the following link:    IRremote

 

 

 

Building the Circuit.

IMG_5190

ARDUINO how to build your own universal IR remote control

 

 

Parts List:

Push button switches.

 

 

 

 

IR receiver.


 

 

 

IR LED (transmitter).

 

 

 

 

2N2222 or similar transistor.

 

 

 

 

Resistors.

 

 

 

 

ARDUINO board.

 

 

 

 

Bread board.

 

 

 

 

Jumper wires.

 

 

 

 

The picture below shows the simple circuit you will need to build, After you map out your remote the IR receiver can be removed.

ir_schem

ARDUINO how to build your own universal IR remote control

Mapping your remote.

FJO4W22IEQXTUDW_MEDIUM

Mapping your remote is not hard to do,   Start by opening the IRrecvDump under examples – IRremote.  Make sure if your not using pin 11 for your IR receiver to change it, By default it is set to 11..  Next open your serial monitor, Then point your remote at the IR receiver and push one of the buttons you want to map… The results should look like this.

482C10EF
Decoded NEC: 482C10EF (32 bits)
Raw (68): -25784 8850 -4400 550 -500 600 -1600 600 -500 600 -500 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -500 600 -1600 600 -500 550 -1650 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -500 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -1600 600 -1600 600 -1600 600 -500 600 -1600 600 -1600 600 -1600 600 -1600 600

The only two numbers we are going to need are the HEX # and the bit #. In this example the hex number is 482C10EF and the bit number is 32, also right down what kind of remote it is, in this case it is a NEC.  After you map all the buttons you are going to use you can move onto the next step.

The sketch.

 

Now that you have your remote mapped you can put them into a sketch to control your device.  To start with open up the IRsendDemo in the IRremote examples, It will look like the picture below.

IRsendDemo Arduino 1.6.5

ARDUINO how to build your own universal IR remote control

The two numbers we want to change is the 0xa90 (the HEX number) and the 12 after that(the bits number), also if your not using a sony delete the for loop and replace the word sony to NEC, RC5 or whatever remote type you are using (irsend.sendNEC(0xHEX, BIT);)

Remember to add the 0x to the beginning of your remotes code to make it a HEX number or it will not work…

Now if you send a positive number to the ARDUINO over the serial monitor it will send the IR code to your device..

all that is left is to add your buttons into the sketch to finish things off, Ill leave that up to you it is easy and will allow you to configure it the way you want.

You can check out our other arduino projects here.

Check us out on Facebook.

ARDUINO how to build your own universal IR remote control
Advertisements