Wake On Lan doesn't always work, and PCs are sometimes caught in a boot loop and need to be disconnected from mains, discharged by pressing the power button for a few seconds, then plugged in and powered up again. My PC does that a lot, so I needed to create a fail-proof solution.

Combined with PowerSwitch Tail II (a micro-controller friendly relay), and connected to a Raspberry Pi, this project allows me to remotely turn on/off my PC while being able to debug boot loops and other booting issues that may occur.


The circuit files (kicad project) can be found here. It's basically two optocouplers used to isolate the PC from the micro controller, two transistors, some resistors and a capacitor.

Please keep in mind that I am a hobbyist, not an expert, and I made some design mistakes. I should have probably added a diode or two to account for wrong wiring, the silk screen is a mess, and I'm guessing the transistors could somehow have been made redundant. It works, though, and I can't think of any way this could damage the PC or micro-controller.

The PCB is wired to the power led and power button pins on my PC's motherboard, and to two GPIO pins, 3.3v and GND on my Raspberry Pi. The Raspberry Pi is also wired to a PowerSwitch Tail II, which is plugged in to the PC's PSU.

This circuit provides two pins to tinker with: power button output, to emulate a power-button press, and power LED input, to check if the PC is powered on. It allows you to still use your PC's power LED and power button normally. It can be used with the control panel mentioned below, or with any micro controller and custom software.

The PCB included in the kicad project files is a snug fit inside a tic tac box, to avoid contact with the motherboard.

Control Panel

The control panel is web-based, written in python using the flask web framework (source code).

As you can see, I can monitor the PC's network status (pings the PC), power status (power led reading), and mains power status. The controls below are used to turn on/off the PC and mains power, and can be used to discharge the PC in case of a boot loop (pressing the power button for a few seconds). It supports controlling multiple PCs on the same control panel.

I'm planning on using this control panel to control my light switch, and get temperature readings, so it was written accordingly, and is fully extendable. The PC Power tab is just an "app" that is installed on the control panel.