IR_Convertor-Repeater by Robbie Adams, Tauranga, NZ
I was so impressed by Tim Blythman’s IR Helper in the September 2024 issue of Silicon Chip that I bought an XC4431 from Jaycar the next day and tried the sketch out, as I had a plan on how I could make more use of it.
This Arduino unit receives signals from a TV Remote, converts chosen IR commands and resends new commands to control a AV amplifier. The IR_Helper.ino sketch was modified by me to change some of the commands sent. 
As the audio from our TV is feed through an optical cable to my home theatre AV receiver, the TV does not use it's remote MUTE, VOL- and VOL+ IR signals. This unit converts those unused buttons to control the amplifier, so that when watching TV only, one remote is needed to control both the TV and amplifier. When listening to the radio or playing CD's, then the amplifier's remote is used instead as normal, with the TV turned off.

I have made a circuit board to hold the Jaycar XC4431 Arduino module, an IR receiver and a 3.5mm socket. I shifted the visible LED from the output of Tim’s original IR Receiver to the output of the Arduino pin A0, so that it confirms that a code is being transmitted. The PCB accepts either through-hole or surface mounted components.

The IR LED(s) are in a multi-Emitter cable which plugs into a 3.5mm socket on the PCB, below the USB socket of the module. One of the IR emitters is held by clear double-sided tape over the amplifier’s IR receiver.
The cable was bought from Ali-Express, search for IR repeater extender, chose from 2 - 5 Emitters per cable and select the 3.5mm plug cable only.
The matching IR Receiver cable is not needed. The lead I bought is 3m overall, with each emitter tail being 900mm long.

Put heatshrink tubing over any emitter that you will not be using, to prevent stray IR signals being picked up again by the IR receiver on the PCB. Otherwise the Arduino may lock up and need to unplugged from the USB cable to reset it. 

Circuit Details
The unit is powered by the USB socket on the TV. When the amplifier and TV are in standby off, push the POWER button on the TV remote. On power up of the TV, it signals the amplifier to also turn on and after a delay, select the TV Audio input. The amplifier can then be muted or the volume changed by the TV remote alone. The POWER button will later on turn off the TV. There is enough time for the POWER (off) signal to be sent to the amplifier, before the TV switches off the USB 5volts to the Arduino.
The PCB 33 x 35mm is mounted under the TV next to it’s IR receiver and has a plug in cable to extend the output IR LED to the amplifier. Current draw of the prototype when idle was around 35mA and up to 37mA when pulsing the LEDs measured using the Peak function on my multimeter. As the signal path of IR signal from the emitter to the IR receiver is through about 5mm of black plastic in the equipment being controlled, high current through R2 is not needed for the emitters. Although the IR LEDs (emitters) can be powered directly from the A0 pin, the BC337 is cheaper to replace than the Arduino should a short circuit occur anywhere on the external emitter cables.

Assembly
For the visible LED use either a 3mm LED with it’s legs bent at 90o or use a SMD 0805 LED which will fit across the PCB holes. If when testing, the LED is too bright, then change R3 to a higher resistance. Mount the resistors first then the other through hole components.
Only 4 PCB header pins are needed for the XC4431. I made the PCB pads square to identify the pins used. Break the 4pin header into individual pins, solder one pin on the PCB then loosely fit the remaining 3 pins. Fit the XC4431, then solder the 4 pins from both sides. Trim all through-hole component legs on the non-component side of the PCB.
When all sketch changes and testing are completed, use black electrical tape to wrap around the PCB, starting and finishing in the non-component side. This is to protect the components from being caught, when the housekeeping feather duster or cloth is used on the TV. Leave the IR Receiver, visible LED, Arduino USB, and 3.5mm socket exposed. 
I used high quality double-sided foam tape on the non-component side of the PCB, to stick under the bottom of the TV, next to it’s IR receiver.

Arduino Sketches
Install irremote in the Arduino Library Manager, if you do not already have it installed. 
I modified Tim’s IR_Helper.ino sketch by adding 7 extra lines. The first 6 were inserted between void loop()} and int d;

void loop() {
  if (IrReceiver.decode()) {
    uint16_t command = IrReceiver.decodedIRData.command;
    Serial.println("Save Case number and line IrSender.sendremotename(address, Command, number of repeats);");
    Serial.print(command);// debug line to shown case number received, save to Notepad.
    Serial.println( " = case number. Button pressed was - in Notepad, write here -> ");
    }

  int d;
To activate the visible LED on pin A0, I added another line of code after the }else{.
 }else{
   IrReceiver.printIRResultShort(&Serial);
   IrReceiver.printIRSendUsage(&Serial);
   IrSender.write(IrReceiver.read(), 1);      //this line contributed by Matthew Taylor, Silicon Chip Admin

I saved the sketch as IR_Helper_with_Case.ino. Run the Arduino IDE before plugging in the USB cable to the board, to avoid a message “downloading index: package_index.tar.bz2” (stuck at 50%) at the bottom of the IDE. Use the sketch to obtain the TV and amplifier codes of your remotes. At this stage, the cable with the IR LEDs (emitters) does not need to be plugged into the 3.5mm socket.
Do a short tap on one remote button at a time. With a mouse, select the output of the Serial Monitor, do Ctrl-C, then Ctrl-V into a text editor file such as Windows Notepad. Write the button-name of the button pushed then do a new-line at the end of the text.
Clear the Serial Monitor before pressing the next button. See Notepad samples -
---------------------------------------------------------------------------------------------------------------------------
Save Case number and line IrSender.sendremotename(address, Command, number of repeats);
50 = case number. Button pressed was - in Notepad, write here -> MUTE
Protocol=Panasonic Address=0x8 Command=0x32 Raw-Data=0xB2320080 48 bits LSB first
Send with: IrSender.sendPanasonic(0x8, 0x32, <numberOfRepeats>);

Save Case number and line IrSender.sendremotename(address, Command, number of repeats);
23 = case number. Button pressed was - in Notepad, write here -> MUTE
Protocol=Kaseikyo_Denon Address=0x214 Command=0x17 Raw-Data=0x76172140 48 bits LSB first
Send with: IrSender.sendKaseikyo_Denon(0x214, 0x17, <numberOfRepeats>);
-----------------------------------------------------------------------------------------------------------------------------
Repeat the process with all of the other buttons that you want to convert (button to be used on TV remote and matching button on amplifier remote to be cloned). Save the text editor file,  then you can cut and paste your case numbers and your Send With: lines into your version of IR_Convertor-Repeater.ino sketch, replacing my lines with your own. For the <number of repeats> I found that 1) was enough for on/off functions like MUTE or POWER. Volume control requires other code. 

As volume changes need more time for you to hear the change, the code is written so that one press on the remote = 10 repeats x <number of repeats> being sent out. See the line for (k = 0; k < 10; k++) and for (j = 0; j < 10; j++), adjust the value of 10 (matching values) in both lines to suit your amplifier, if required.

When all your sketch changes are saved and tests are completed, cover the board as mentioned in Assembly above.
During debugging of the sketches I had trouble with one remote. The cause of my Panasonic TV's remote not always sending IR is because it has dual signalling to the our new smart TV, either bluetooth or IR. All the other apparent causes of a fault in my sketch were a misdirection. I turned off bluetooth in the TV setup, now all of the remotes work correctly with the sketches.

Cover all but one of the IR emitters so they do not sent IR signals back into the IR receiver. Plug in the emitter cable and power up the board through the USB. Keep the repeater PCB out of visual range of the amplifier to prevent possible optical feedback and Arduino lock up.
I held one of the IR emitters over the front plastic panel of the amplifier where I thought it’s IR receiver might be and kept testing by using the MUTE button of the TV remote until I got the best response from the amplifier. This is the position to mount the emitter using the double-sided tape clear pads. I installed the emitter tail cable from above the amplifier, so that the weight of the cable would not drag the emitter down the front panel over time.
Should the original tape pads be old or weak and not stick, I use double-sided clear tape made by Sellotape, a hole is not needed to be made in the tape as per the original pad.
If you are going to control another unit such as a DVD player, with the one remote, then fit another emitter in place also, using the same method.
When testing has been finished, use the foam tape to mount the PCB under the TV screen. Permanently plug in the USB cable from the TV and hide the cable surplus before plugging back in the 3.5mm multi-IR Emitter cable plug.

As Teletext is obsolete worldwide, there are 4 unused coloured buttons on most TV remotes. I intend to add to my IR_Convertor-Repeater.ino sketch, and use those buttons to replace another IR remote which controls a dimmable LED light strip around the ceiling of our home theatre room. 
This is my first project using an Arduino and attempt at writing in C++. I usually use microChip PIC chips and program in BASIC. Thank you for the support from Tim Blythman and Matthew Taylor of Silicon Chip, also kmin of the Arduino Forum.