Introduction: Touch Screen Soundbar IR Remote Control

Picture of Touch Screen Soundbar IR Remote Control

My son has Cambridge Audio Sound bar with a dog chewed remote ! I said I would try and make a new remote !

I have tested this instructable (on-off & mute) on my Samsung TV and it works fine , I have yet to test it on his sound bar.

I used a 2.4 inch touch screen (mcufriend from eBay £3.10p) and a clone Arduino Uno.

The IR transmitter & receiver both from eBay too !

The Arduino sketch is based around the mcufriend example with the IR code taken from the excellent IRremote.h lib.

I decided to incorporate an IR reader too !

There are two screens, transmit and receive.

.

Step 1: The Hardware

Picture of The Hardware

The display uses the 9341 lib.

These are great displays but they use most of the pins on the Arduino !

The IRremote lib uses pin 3 for for the transmitter & any digital output for the receiver.

Pin 12 is available if the SD card is not used with the display so that is connected to my receiver.

The display uses pin 3 during display update, so if the IR diode is connected directly to pin 3 and ground, you will only ever see a white display !

If the IR is disconnected until after the screen is loaded all is fine until you want to switch screens between transmit and receive !

To get around this issue, I use a bc337 transistor (pretty much any npn will do) as a switch controlled by A5 which is also digital pin 19 via a 560 ohm resistor ! The 10k resistor is used as a necessary pull-up.

During boot up, A5 is LOW until the screen is displayed, then it goes HIGH.

When changing screens, A5 is held LOW until the screen is displayed and then set high again.

Step 2: The Software

I have included the sketch, which as usual is as tidy as a teenagers bedroom.

I mapped the keys into rows & columns for convenience (cl & rw)

The IRremote lib does all of the IR work, for example

if(cl==1 && rw==4) //test samsung //ie Column 1 Row 4
{ irsend.sendSAMSUNG(0xE0E0F00F, 32); // Samsung Mute

Serial.println("Samsung Mute"); // test only

delay(1000); }.

The variable 'rxactive' is used as a flag for either the transmit screen is active or the receive screen is active.

The codes in the sketch are for the Cambridge Audio Sound bar - as yet untested but taken from their web site !

If anyone out there has a Cambridge Audio TV Minx remote control, I'd be very grateful if you could confirm the IR codes as I have already seen an error on their page !

Step 3: Using the Remote & Possible Next Steps

Pretty straight forward this, each button press will transmit the associated IR code.

Pressing the Rx button puts the device into receive mode where most remote control codes can be displayed.

Pressing the Tx button returns to the transmit screen.

I am considering extending the project so that codes can be entered manually.

Also I am considering a learn option!

Have fun !!

Comments