Skip to content
Notifications
Clear all

Remote PC Power Button

4 Posts
4 Users
0 Reactions
1,545 Views
Man-in-Black
(@man-in-black)
Posts: 9
Active Member
Topic starter
 

Hello,

I am in the process of building a small circuit that will allow me to control my power button on my PC via my phone.

For the beginning I will take a Raspberry Pi.
So that the whole thing works and my computer does not let my Pi burst into flames by too high currents or so, the whole thing should be galvanically separated with an optocoupler.

Currently I'm still failing because the resistance at the output is too high, but when I've fixed all that I'll write a little tutorial here 🙂

Maybe someone else can do something with it.

Many greetings
Man-in-Black

Translated with www.DeepL.com/Translator (free version)

 
Posted : 22/06/2022 7:25 pm
(@kraken)
Posts: 2
New Member
 

Hi,   You need to find the jumper posts on your mainboard that the switch connects to.  Here is the safest place to connect your relay.   It's possible to connect the RPi to those posts directly, but you don't know if the posts are reading resistance or voltage to determine if you've pressed the button.  So the safest thing to do is to use a relay which acts as an interface and mimics the action of the original switch.   

https://www.aliexpress.com/item/2251832818775077.html?spm=a2g0o.search0304.0.0.3c7528c22RAKWI&algo_pvid=7ee8139c-7784-41ef-ad70-b375def8e909&algo_exp_id=7ee8139c-7784-41ef-ad70-b375def8e909-37&pdp_ext_f=%7B%22sku_id%22%3A%2267124504323%22%7D&pdp_npi=2%40dis%21USD%21%210.47%21%21%21%21%21%402101e9ce16592797253047095e1c98%2167124504323%21sea

 
Posted : 31/07/2022 3:03 pm
 Aksi
(@aksi)
Posts: 5
Active Member
 

I am curious if there's been any progress on this, or similar projects, because I would be interested in doing this myself in the future.

 
Posted : 16/04/2024 5:02 pm
marcdraco
(@marcdraco)
Posts: 487
Member
 

Looks like an abandoned thread.

Using a RPi or similar SBC is complete overkill, it really is and I don't mean to sound harsh when I say that.

A simple MOSFET switch will do that job easier and with far less hassle than a relay. Relays have a place but this isn't one of them (not these days). SSRs (solid state relays) have been available for many years now to switch mains level voltage and current. They're fast don't break down, don't suffer with contact bounce and use less power to control.

PCs use a fairly crude method to start. It's simply a matter of briefly grounding the power on pin. Nothing more. There's a little bit of current flowing in that circuit and although a MOSFET is perfect, you could do it with a BJT. 

You'll need a "one-shot" monostable but that's easily done with a 555 or a couple of CMOS gates for the adventurous. Of course you have the "OMG Windows has stuck, I need to shut down immediately" which is that four-second countdown where you hold the button as hard as you can for until the darn thing shuts down.

Now that's the "discrete" electronics way of doing it but if you wanted to go "Full Digital" (and this can be light operated or controlled by ... whatever you can send/receive a signal with) it would be a simple job for even the ATTiny86 which is a very small Arduino-like chip. The advantage of an ATTiny (apart from fewer components = less complex is that you don't have to worry about programming in Linux which can be fiddly and, perhaps less obviously, it's less for your PC to power. I expect the RPi Pico would work just as well but the ATTiny is ... well, smaller. 

Programming the Tiny is a bind (it's supplied as a bear IC) so I might just cheat and use a pre-made one like the Xiao. Still very low drag on the standby and more than capable of remotely operating some sort of electronic switch be that a relay, FET, BJT ... Little furry demon in pants (sorry, BSD joke).

I was thinking of Halloween gags and this one would be wicked to play on someone. Imagine putting the light on when you get home and having the PC turn on and then shut itself down when you turn the light off. A light controlled PC... actually that sounds more cool than scary. One that shuts down when you turn off the lights to go to bed (assuming Windows responds to the command and doesn't just refuse to.)

Come to think of it, I might have one or two of those MP3 modules I got for our Ghostbuster's Proton pack. Those things pack quite a punch and we could make those do all sorts of scary noises and make things go "bump". Ooo I am in a naughty mood and Halloween is ages away.

If I get some time this weekend I might give that a go (I should be writing but I've got a bad case of "procrastination").

Powering a PC up via a phone should be easy if it's connected to a wired network. There's a "magic packet" the machines can received (it's "magic" because it can never happen under normal conditions). Wireless standards don't (to my knowledge) have this function but I'm willing to be corrected. It's only a wake packet, the machine has to be sent a shutdown command from the operating system. It dates back to a time when we would have to start a machine remotely, do some work and then tell it to go back to sleep. 

I've seen a couple of cases where "phantom" packets (probably hackers but hard to prove) escape and somehow wake machines up. The function is usually disabled in the BIOS anyway so very few people ever see that weird little bug.

How to send the signal? Infra-red? Light operating? Short range radio? Once again this is a bit of KISS - "Keep it simple, Simon". Why? Because what are we trying to achieve? I'm assuming we're looking to turn the PC on and off (perhaps with an override) by remote from the couch and not from the other side of the planet, right? So tech like Bluetooth as cool as that is, is just overkill and complex. An coded IR transmitter/receiver is all we need. I haven't looked but there's probably an Arduino compatible one out there. I think there's a decoder library that can read signals too but it's been a couple of years since I dabbled.

The trick with everything is to start simple and never make something more complicated that it needs to be. Complicated enough to do the job brilliantly but never more so. Anyone following my escapades trying to improve Matt's USB C mic will have seen that in action. I'm almost happy with it now but all development has spun off some useful side projects. The mic is now P48v capable and works with professional gear almost out of the box (you just add a capsule, JFET and some screening and it's done. There is one last niggle I need to iron out before I can say "that's done".

Getting a P48 mic to work with USB C is going to be ... a challenge but I promised (myself) I'd do it. I know it can be done because I've got a proprietary unit here that does just that. (Pulls the USB 2 port almost to its limits though).  

Just in case anyone is concerned, 48V phantom power won't hurt you but it will tingle a bit if you eat the microphone. (Rode did one a 90V capsule at one point according to Doug Ford I bet that made your hair stand on end.) 


Take everything I say with a pinch of salt, I might be wrong!

 
Posted : 16/04/2024 11:26 pm