ESP8266 PC Power Switch Controller

Thread Starter

Sam Smart

Joined Jan 30, 2019

First post and everything. Hope this is the right place, but I'm looking for some advice on a prototype circuit design and after some searching around this seemed like the best forum to ask for said help. As a heads up, I'm very much a software guy, electronics is a hobby that I have only recently gotten back into after dabbling in it a fair few years ago for college and as such I'm expecting a lot of (hopefully constructive) criticism on this!

After having recently found the wonder that is the ESP8266 and using it for a few small IoT devices around the house that mainly consisted of switching a relay, I wanted something that could control my PC remotely and that was more reliable that using WOL. I also wanted to take a shot at having a PCB made so this seemed like an ideal project to try it on.

The aim for this is that the it will run off the standby 5V out of an ATX PSU and act as a momentary switch alongside by PC on button. It also has a 12V sense so that it can update my OpenHAB system with the power state of my PC.

I've attached the circuit thus far and would really like some feedback on it, and possibly pointers on what I need to be going off and reading up on!


Many thanks,


Joined Feb 20, 2016
Welcome to the forum.
One question, why are you using 2 optos in series on the output?
Having the 2 in series will not work on the 3.3V supply. The forward voltage is too high.
Run the LEDs from the 5V, or have them each with their own series resistor running in parallel if you need to use the 3.3V supply.
Last edited:


Joined Mar 10, 2018
I have done something similar using a standard micro to issue a start
pulse to PC if it does not start by itself using BIOS trigger. But your
approach perfectly acceptable.

Main thing I found is use open drain UP output to pull down the power
button line. In your case the bipolar accomplishes this. I issue a .5 sec
pulse to PC, then using UP A/D see if its 5V power has come up, indicating
(normally) its booting. If PC does not start after a few secs I re-issue the pulse.
In my case I was doing this because PC ATX supply would not start up cold
by the BIOS, had to have some manual input. eg. power button press.

Regards, Dana.