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.
First you will need the ARDUINO IRremote library and that can be downloaded at the following link: IRremote
Building the Circuit.
The picture below shows the simple circuit you will need to build, After you map out your remote the IR receiver can be removed.
Mapping your remote.
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.
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.
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.
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.