IR Remote Learner
Please see the attached IR-Remote-Learner.zip for code files.
With our IR Remote Learner kit, you will be able to learn the custom codes of those hard to replace remotes. Running off a 9V battery, this portable unit includes a keypad and well-lit display to make the job easy.
Bill of Materials
|1||PH9235||9V Battery Holder|
|1||SS0834||Micro slide switch|
|1||WB2022||Cat5 solid core cable.|
|1||HM3212||40 Pin header row|
Software and libraries
The code was developed with these versions, your versions and results may be different.
|EEPROM||Arduino||1.8.5 (with ide)|
|2||IR Receiver||S||sense wire for IR receiver module|
|3||IR Transmitter||S||Output wire for IR Transmitter|
|4||Keypad||SCL||Keypad signal clock|
|5||Keypad||SDO||Data Output for Keypad|
|6||LCD||DC||LCD Data select|
|8||LCD||SCE||LCD chip select|
|11||LCD||DN(MOSI)||LCD SPI Data bus|
|13||LCD||CLK||LCD SPI Data clock|
|IRRecv_VCC (middle pin)||[ ]|
|Keypad VCC||[ ]|
|Keypad GND||[ ]|
|IRRecv_GND (-)||[ ]|
|IRTrans_GND (-)||[ ]|
|9V Battery Negative||[ ]|
First step is to remove the header pins from all components (except for nano) as we'll be re-arranging the layout. Also snip header pins where needed, with 2 lots of 3 for the IR sensor (just for a bit of strength).
As the battery has to be connected on the underside "solder pad" side, there's a bit of a trick to mount the battery holder. What we're aiming to do is to make a bit of copper on the top side of the board for the battery connector to solder to.
Firstly: begin with the end in mind:
Snip and place header row connections as shown above.
Place the battery holder where you want it. I opted to place the power pins along
Right next to this, we'll place about 4cm of stripped copper wire from the ethernet cable in the hole next to it and solder that into place (remove the battery pack to solder).
Wrap around and place into the hole on the other side of the battery connector:
When you poke the wire through the other side, place the battery holder back in place and pull on the wires, so that the loop can get tight and flush against the legs.
Remove the battery connector and solder in place without disturbing the copper wire, you should get something like this on the top side of your board:
Now when we're ready to put the battery holder back in, it should slide into the copper loops easily.
Now we'll start putting in the major power rails. Notice that the 9V battery will connect to the
VIN pin of the Nano, and everything else will be powered off the 5V pin.
With the battery holder on the underside, this means the left leg of the battery holder (from the top) is the positive 9V. take this to the micro power switch as below:
Then the middle pin of the switch goes to
G16 corresponding to
VIN of nano)
The Battery negative terminal can just go to
G17 corresponds to ground on nano)
Also connect the positive and negative rails from the sensors to where the nano is going.
F9 - M9connects screen GND to IR receiver ground
E5 - D9connects IR transmitter ground to IR receiver ground
C10 - U12connects IR receiver ground to Battery Negative terminal.
Notice in the next picture:
M9connects to a bridge between the screen and keypad ground,
F10) joins down to
E19- this will be next to the
5Vpin on the nano. (
C21-- this will be bridged to
D3on the NANO
You can end the wire on any of the pads around the pin that you want, just as long as you don't cover the hole so the arduino nano can pop through and connect.
On the top side, you can place the
B20 wire which will connect the receiver to D2, and the
G8 wire, which will connect the +5v between the sensor, screen and keypad.
The rest of the connections can be a bit of a mess but I'll try to go through them one by one so that we can tick them off as we go.
Place in the arduino in the lower corner of the board, you should find that the pins themselves will keep it in place and you shouldn't have to pre-emptively solder it. Make sure the VIN and GND connections are proper while you're at it and rework them if needed.
Make the following connections.
For the Keypad
For LCD screen
Now we can mount components. First step is to mount the battery holder to hide that jumble of wires. Poke it through and solder from the topside of the board, then snip the leads so it is as small as possible.
Then mount the keypad to the long row of headers, and snip them down so you can solder the screen in place as well. Mount the receiver going across the two sets of 3pin headers, and the transmitter on the top row.
Programming is simple, just install the libraries and download the arduino code, it should upload with no problems.
To find a code, power up the unit and point the remote to the IR receiver ( on the side). when you press the button the screen should show a readout of the code interpreted. You can then press a button to store it into that particular button.
Once the screen has cleared, you can press a button to fire the previously stored remote code
It will remember codes through power cycles / battery changes, as it writes the code to EEPROM.