Arduino Remote Control Infrared Player

This project uses the Arduino hardware for playing back infrared remote control code. The format played is the Pronto Hex format. There is a huge database of infrared code located at RemoteCentral.

I did this project for teaching my learning remote the discrete on/off power code of my TV. The code sent by the original TV remote is the power toggle command. This is not so good when used as part of a macro for controlling multiple devices.

Infrared Remote Control Code Player

The remote that I have is the Sony RM-VLZ620. This remote is good and is cheap too. It can control up to 8 AV devices. Volume control button can be configured to control the AV receiver while the remote itself is in TV or DVD mode. 12 buttons can be configured to send macros. It is a learning remote, so any button can be made to “learn” from any other remote.

This project uses the Arduino hardware. All you need to buy to replicate this project is an Arduino board (about $30) and an infrared LED (about $2).

Even though I use the Arduino hardware, I didn’t use the Arduino development software, the code is written in good old plain C. You need to download AVR Studio (4.18 SP3) and AVR Toolchain from Atmel’s site, both are free.

Here is a sample Pronto Hex code and its corresponding generated LED waveform:
[sourcecode language=”c”]
uint16_t ProntoCodeTest[] = {
0x00, // 0 – recorded waveform
0x6D, // 38kKhz. 0x67=>40kHz, 0x6D=>38kHz
0x01, // Sequence 1 on/off pair length
0x03, // Sequence 2 on/off pair length
0x05, 0x01, // Sequence 1, pair 1
0x02, 0x05, // Sequence 2, pair 1
0x04, 0x03, // Sequence 2, pair 2
0x06, 0x07 // Sequence 2, pair 3

Here is the source code at Github

Creative Commons Licence
Infrared Remote Control Player by Stephen Ong is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Hint: For debugging, you can use a digital camera (or phone camera) to “see” the infrared LED. Try it, it is pretty cool. Alternatively you can debug with a visible LED.

One thought on “Arduino Remote Control Infrared Player

  1. Brian

    I know this is an old post of yours, but how would you suggest modifying your code to make the transmit code a function instead of an interrupt. I haven’t worked with AVR at all, and haven’t done any interrupt stuff with the Arduino yet. I want to be able to tell my program when it should send a code, and not just have a code retransmit all the time. If you have any suggestions that would be cool. I have forked the code on github if you want to message me there.


Leave a Reply

Your email address will not be published. Required fields are marked *