Sonoff S20 As A Smart PC Switch
Posted: Sat Jul 07, 2018 12:17 pm
Hi,
I'm using a Sonoff S20 for turning on my PC, but for turning off the PC I need to wait for it to shutdown first.
I could take a connection from one of the cables coming off the ATX psu (but don't want to go down this route).
So, one option would be using something like an ACS712 to monitor the current flowing through the mains cable. However, the only spare connection on the S20 is GPIO2. I am not bothered about reading the value generated by the ACS712, but just want an output to feed to the GPIO pin that is, for example 3.3v if enough current flows and 0v if only minimal current flowing.
Can anyone help guide me in the right direction on this?
Thanks,
Richie
I'm using a Sonoff S20 for turning on my PC, but for turning off the PC I need to wait for it to shutdown first.
I could take a connection from one of the cables coming off the ATX psu (but don't want to go down this route).
So, one option would be using something like an ACS712 to monitor the current flowing through the mains cable. However, the only spare connection on the S20 is GPIO2. I am not bothered about reading the value generated by the ACS712, but just want an output to feed to the GPIO pin that is, for example 3.3v if enough current flows and 0v if only minimal current flowing.
Can anyone help guide me in the right direction on this?
Thanks,
Richie