Using Photon to control power on/off/reset on Desktop Motherboard

I imagine this must be a very simple project, but it’s been a couple of years since I touched my Photons and I have forgotten basically everything :sob:

Searching these forums has yielded nothing, but surely someone has built a project for powering on/off/reset their desktop with a Photon? I have a remote machine that runs cryptocurrency mining, and I’d like to be able to hit the reset button from the comfort of my armchair or automatically in the even of a system hang.

Any assistance would be appreciated!

You could use this to control up to two 20A circuits.

What currency are you mining? How much power is your PC rig consuming?

The last guy I talked to doing this was mining ZCash using a Rig with 19 video cards, he said it consumed 3000+ watts to mine $80 a day. That’s a lot of power 24/7.

Do I need that just to control the power on/off pins on the motherboard?

So far I’m just using a 6 card setup, mining whatever is most profitable at the time (autoswitching), paid out in ETH.

No, you don’t need that just to power some 3-5v pins that control your motherboard power or reset switches.

You could switch those low voltage / current pins via the Photon I/O pins.

I just built a LED matrix display to display Bitcoin, Litecoin, and ETH, along with time, date, and weather info. It’s interesting to watch the value of these currencies go up and down recently.

Right. I had thought it would be as simple as just connecting directly and HIGH or LOWing the pin. But then I read this and it seemed more complicated with the resistor, etc.

I currently have no power switch, so wouldn’t need anything there. And it would be nice to be able to detect the current state of the system (e.g. is it already on/off?)

Would love to check out your display project! I have a LaMetric which scrolls current prices, but no “over time” data.

There is a simple way that works, but probably isn’t the safest way :wink: :sunglasses:
So if you can, go the longer way round

The following is at your own risk

If your machine uses an ATX PSU there are several conntacts you can use

Vin -> +5VSB      (purple)  Power the Photon
GND -> GND        (black)    "
D0* -> PS-On      (green)   LOW to power up the system  
D1* -> Power good (gray)    sense the current state

*) or any other GPIO

For RESET you need to connect to the reset pin on the mainboard and usually pull that LOW.

Awesome, thanks! Looks like I do have an ATX connector, but I think it’s already in use? The PSU is a Corsair RM 1000.

However, I thought I could probably just hook a few GPIO pins on the Photon up to the power switch jumper headers on the motherboard (which is an ASUS H270 Plus).

Some people (I don’t know anyone personally tho’ :stuck_out_tongue_winking_eye:) just splice the wires.
But if your mainboard exposes these contacts on a dedicated header connecting to that is probably easier.

Wow, madness!!

Yeah, these are just the headers that basically every motherboard has for connecting the case’s power switch and LEDs, etc. I figure I can just use those, as I have no case, so nothing is connected to them already.

The layout description is on page 14 of the manual here:

My main problem is, I’m just not sure how to wire it all up to the Photon. Even writing the code for the Photon I’d probably be fine with.

I imagine the state detection could be done by reading the power LED pins somehow? (As suggested in the Hackster project I linked earlier.)

1 Like

Just an update, a friend found this (no idea why it didn’t show up in my searches):

Looks a bit closer to what I’m trying to achieve.