To ensure stability you will need a good power supply (as recommended anyway), at least a 5V 2A power supply to power the ATXRaspi. If you plan to use the Pi touchscreen/LCD and/or fan, use a 2.5A supply (eg. the CanaKit 2.5A supply is great).
Step 0 – Use really good wiring!
You should use a high quality stranded jumper cable, at least for the GND and 5V connections to your Pi. Keep them as short as possible!
In addition, the best possible connection is a well soldered connection. This will minimize voltage drop to your Pi.
While your Pi may run just fine at 4.65v low voltage threshold, it can trigger the annoying low voltage warning (rainbow or thunderbolt in upper corner of the screen.
First get familiar with the basic operation and setup of ATXRaspi. Here is a video walkthrough, showing the operation with a momentary button (this demo uses Raspbian):
Step 1 – Connect your RaspberryPi
Frequent question: how much current can ATXRaspi switch?
ATXRaspi can switch several amps of current and power additional Pi peripherals like a touch-display, a fan and any other add-ons. You should ensure your power supply can provide that current with a good extra margin. Expect a few dozen mV drop (from ATXRaspi input to ATXRaspi output) at 2A of load.
The GPIO 7 & 8 pins are the defaults used for the BOOTOK and SHUTDOWN signals, you may change them to others if required (update the script as well).
Momentary button mode
The most commonly used mode of operation is with a momentary button. Some power buttons have built-in LEDs that can be wired to the status LED header, but to make wiring explicit, the LED is shown separately in the diagrams below. Here is a wiring example using micro USB for input and GPIO for powering the Pi:
Latching button/switch mode
In ATXRaspi R2.8 and R3 you have a jumper setting on the bottom of the PCB, which if shorted (bridged with solder) will put the board in latching button operation, no other parts are required. This is very useful for folks who want to incorporate ATXRaspi in their SNES consoles which have a slide POWER switch.
Here is how you would wire your latching/push-pull/slide switch to ATXRaspi:
In latching mode, if you would like a dedicated reset button, separate from the main power button, you can wire it as shown below:
Step 2 – Install required script
- On Raspbian or Debian based distro:
sudo wget https://raw.githubusercontent.com/LowPowerLab/ATX-Raspi/master/shutdownchecksetup.sh sudo bash shutdownchecksetup.sh sudo rm shutdownchecksetup.sh sudo reboot
This will install a bash script (/etc/shutdowncheck) and register it to be started at the end of the boot process (adds a line to /etc/rc.local). So once your Pi reboots it should start the shutdowncheck script and you should see this message (if you’re not booting to the GUI):
ATXRaspi shutdowncheck script started: asserted pins (7=input,LOW; 8=output,HIGH). Waiting for GPIO7 to become HIGH…
That indicates the script has started and is running, waiting for a shutdown signal from ATXRaspi. The shutdown script will take on average 0.7% of the CPU:
wget https://raw.githubusercontent.com/LowPowerLab/ATX-Raspi/master/shutdownchecksetupOpenElec.sh bash shutdownchecksetupOpenElec.sh rm shutdownchecksetupOpenElec.sh reboot
This will install a bash script (/storage/.config/shutdowncheck.sh) and register it to be started at the end of the boot process (via /storage/.config/autostart.sh). So once your Pi reboots it should start the shutdowncheck.sh script, and the BootOK LED should turn ON. Here’s a quick check via SSH that the scripts were installed and shutdowncheck.sh is running (after the reboot):
Your Pi should now be able to turn on, reboot and shutdown from the power button.