Struggling to read voltage from PC motherboard front panel header using ESP8266

Thread Starter

Bennett25

Joined Dec 10, 2024
3
HI all,

I've been trying to enable my home server for completely remote use, and this project focuses on turning the PC on from an off state (S5). To do this I have an ESP8266 listening on my home network for a message to turn on, from the simple app I'm developing. It's powered through the Server's motherboard USB passthrough.

I'm at the stage where I have everything kind of working using a relay, but I want to detect the relay being triggered in order to retry the input or inform the user on the app that it was successful or not. I kinda need this feature because the ESP occasionally crashes, hangs, or the relay can fail to switch properly, it's quite temperamental overall.

At the moment I have a wire from the NO relay pin connected to an input GPIO pin on the ESP, which reads whether the voltage is high or low. I've measured the front panel power switch pins on the motherboard at 3.3V so I presumed I should be able to take that voltage once it's connected through to the ESP, indicating the relay was successful in triggering. In reality, the GPIO pin reads 0. I hooked up the 3.3V relay input to the NO pin and it read 1, so I think the code is working at least. I'm wondering why I can't read the voltage from the PC front IO headers, is it maybe a grounding issue? Or maybe a lack of current?

I don't know much about circuitry, so apologies if it's pretty obvious, and I hope the diagram is helpful! Any help is appreciated, thanks

image_2024-12-11_003441706.png
 

GetDeviceInfo

Joined Jun 7, 2009
2,270
wake on Lan? I suspect a bad boot would also be problematic. Could a server script message the ESP, who's waiting for a timed response, before sending out that trouble message.
 

Thread Starter

Bennett25

Joined Dec 10, 2024
3
Looks like the SW- (PC GND) needs to be connected (safely) to ESP8266 GND
Legend! I feel a bit silly for that. I've been using a LED and button powered by an Arduino in place of the PC and connecting the Arduino ground to the ESP ground via a resistor (is there a safer way? I have a few NPN diodes coming today) and it's now working as intended! Thanks a bunch!

Before connecting grounds, the LED was always slightly lit up and I measured 9V 12mA AC which makes so much sense now, as the relay coil won't have had a common ground with the LED.
 

Thread Starter

Bennett25

Joined Dec 10, 2024
3
wake on Lan? I suspect a bad boot would also be problematic. Could a server script message the ESP, who's waiting for a timed response, before sending out that trouble message.
Yeah I will add more checks and messages as I get further along, like I'll have a python script run on boot to send the ESP a message about what did/didn't start up. If you're talking about failure to boot to OS then I'm not sure how I'd even get the server to send a message, I'd probably just have the ESP give up after X amount of time or something.

Also, about wake on LAN, I'm not sure how much power that uses compared to normal standby, probably not much considering it's currently powering the ESP, which for this motherboard requires wake on USB to be enabled. One of my main goals was to make this quite power efficient so I'll have a look into it.
 
Top