LowPowerLab Forum

Hardware support => ATXRaspi => Topic started by: Colin on March 19, 2017, 01:57:37 PM

Title: Use 5v signal instead of a switch
Post by: Colin on March 19, 2017, 01:57:37 PM
Hi,

I would use a 5v signal instead of a switch. If there is a continue 5v on this signal wire the pi must be startup. When it is 0v the pi must be shutdown.

Is this possible with the ATXRaspi. Instead of using a switch on the ATXRaspi a 5v signal?
Title: Re: Use 5v signal instead of a switch
Post by: Felix on March 19, 2017, 05:12:13 PM
It's possible but you will need to add some extra circuitry, a transistor perhaps.
Right now the BUTTON connection (2 left most pins on the TOP header) are: BTN and GND. When these 2 are connected, that is a button "press". The "BTN" signal is a pulled up GPIO high impedance input of the MCU.
I haven't tried it but I think you can do it with an N channel transistor, where you leave the BTN at 5V when 5V is at the gate, and pull down the BTN line when 0V is applied. That way the transistor acts as the button, activated by your 5V "digital button press".
Also don't forget that this will require latching mode, so you need to follow the guide to add the 10K resistor that tells the MCU this is a latching operation (ie not momentary button).
Title: Re: Use 5v signal instead of a switch
Post by: Colin on March 21, 2017, 01:50:01 PM
Quote from: Felix on March 19, 2017, 05:12:13 PM
Also don't forget that this will require latching mode, so you need to follow the guide to add the 10K resistor that tells the MCU this is a latching operation (ie not momentary button).
Where can I find this?
Title: Re: Use 5v signal instead of a switch
Post by: Felix on March 21, 2017, 03:01:57 PM
Have you looked at the guide?

https://lowpowerlab.com/guide/atxraspi/assembly-install/

By the way here's how it can be done from software, I think that will match what you need except your signal should be 5V to the transistor gate.
The given script for that software shutdown should work without modification.

https://lowpowerlab.com/guide/atxraspi/full-pi-poweroff-from-software/

Title: Re: Use 5v signal instead of a switch
Post by: Colin on March 23, 2017, 11:33:16 AM
Thanks, just orderd a ATXRaspi to try it.