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.

Circuit

Circuit

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 the Arduino source (sketch) file to download

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 anpassen: Geben Sie den IR-Code der Fernbedienungstaste und die MAC-Adresse vom PC aus ein. Für den IR-Empfänger ist "AIRremote.h" erforderlich.
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

Board Layout

downloadable PCB layout as pdf here

Components

Components