Saintummers Projects

Wake on Lan with infrared control

++++ This page is also available in german ++++

This enables a PC that is in another room to be switched on remotely via LAN (Ethernet). The command to switch on is given by the button an infrared remote control. The PC serves as a media server, the HDMI cable and the infrared signal are sent via a standard HDMI, Infra Extender via the LAN cabling TV set forwarded. An HDMI / IR extender over CAT6 is used here. The type of line extension does not matter for the Wake On Lan solution. In one direction the HDMI signal to the TV, in the other direction the IR signal to the PC.

Overview IR_WOL

Purpose: the PC is switched on by IR remote control.
Function: With a defined button on the IR remote control, the PC is switched on via WOL via Ethernet.
The CAT6 line for the HDMI extender must of course not be connected to an Ethernet switch. All mouse commands are transferred to the PC. Switching off is done by mouse command from the PC User Interface.
Two variables must be filled in the software
IR code button and MAC address of the PC

An Atmega328 is used as the CPU, which is connected to an IR receiver and an Ethernet controller.



The IR receiver TSOP4838 is on pin4 of the CPU. An LED on PIN6 that lights up briefly when a key is recognized. An LED on PIN26 which flashes during operation. This shows that the CPU is running. The Ethernet module W5100 is connected to PINS 16, 17, 18, 19 and 1. Here you can see that the W5100 and the ISP cannot be used at the same time. When the CPU is programmed, pull the W5100. Replace the choke between PIN20 and PIN7 here with a 1K resistor, connected directly on this PCB here, because there is no ADC used.

Infrared transmitter and receiver

The IR-RX receiver of the PC, the TSOP4838 (RX) of the IRWOL and the IR transmitter (TX) of the HDMI / IR repeater are housed in a small plastic box.
TSOP4838 ----\
IR-RX--------------------- IR TX
IR TX sends to IR-RX and TSOP4838

Aluminum case with board, Atmega328 and W5100 module

Complete unit

This Instruction is only intended for experienced electronics engineers. Mains voltage is used here. The housing must be connected to the protective conductor. Operation only possible with a three-pin Schuko socket. The safety regulations must be observed! 

Software for this project

Many thanks to the Arduino community for the software parts that can be used here.
Here is my Arduino source (sketch) file to download
The libraries from and Github for Ethernet and IR
Ethernet Version 1.1.2 from
Arduino-IRremote from Github

The software runs in a loop whether the infrared button is recognized. The software is also monitored via a watchdog. As a check, an LED flashes slowly with a timer interrupt. If the defined key is recognized, then The Wake ON LAN packet is sent via the Ethernet interface. The PC turns on. The loop continues. Software customize: Enter the IR-Code of your Remote Control and the MAC-Address. "AIRremote.h" is required for IR.
Enter the MAC address of your PC in line 35: static byte g_TargetMacAddress [] = {0x00,0x19,0x99,0xAE, 0x5E, 0xE3}; // PC that is started via WOL
Line 137 remove the comment "//". // Serial.println (rxir); // Displays IRCode, otherwise always commented out.
Find the key code in the serial console of the Arduino IDE and enter it here in line 20. String mytaste = "1416658004"; Only the code that is recognized several times when the button is pressed is of interest here. Start and end codes are irrelevant here. Test setup here is the code of a key that is pressed for a long time. Accept this value in the "mytaste" variable.

In line 137 insert the "//" comments again, compile it, export it as "HEX-with bootloader" and flash this via ISP (for the atmega328 on the board) or load it to the test UNO.

An Arduino UNO is very suitable for testing the software. Also for testing the MAC address and the IR button
Test setup with Arduino UNO

Ethernet Library for W5100

If an error is issued when compiling with current, newer Arduino IDE
<utility/socket.h> no such file or directory at line #include <utility/socket.h>.
the older Ethernet support for the W5100 module must be installed in the IDE. Today's Ethernet Library version 2.0.0 supports the W5200 and W5500 modules, but not the W5100.
For the W5100, the older Ethernet version 1.1.2 must be installed.
In the IDE under - SKETCH - Include Library - Manage Libraries the library can be installed. Ethernet 1.1.2
Using version 1.1.2 the software can now be compiled without error messages.

Only one Ethernet Library can be installed at a time - so it may be necessary to change the version to 2.0.0 and back and forward dependig on various projects.
In the own archive folder a copy of the Ethernet V 1.1.2 should be stored as zip file. Above the listbox with the offered versions of the Ethernet Library a link More info is given.
From there the libs can be downloaded as a zip from a list under " Releases ". It is advisable to put a copy of the Ethernet 1.1.2 to the program source in the own project folder. This is usefull for ALL libraries which are used in a project.

Board Layout

downloadable PCB layout as pdf here



H.Stummer Date: 12. June 2022

Go to top