How to Add a Safe Shutdown Button
Protect your SD card from corruption with proper shutdown
Simply unplugging your Stratux can corrupt the SD card over time. Adding a safe shutdown button allows you to properly shut down the Raspberry Pi before disconnecting power, protecting your data and configuration.
Why You Need This
The Raspberry Pi writes data to the SD card continuously. Cutting power abruptly can corrupt the filesystem, leading to boot failures or data loss. A shutdown button sends the proper shutdown signal to the operating system.
What You Need
- Momentary push button (normally open)
- 2x female jumper wires
- Soldering iron (optional, for permanent installation)
- Heat shrink tubing (optional)
Wiring Diagram
Simple two-wire connection between GPIO 3 and Ground through a momentary switch.
Identify GPIO Pins
Locate GPIO pin 3 (physical pin 5) and a Ground pin (physical pin 6) on your Raspberry Pi. These are next to each other near the corner of the board.
Connect the Button
Connect one wire from GPIO 3 (pin 5) to one terminal of your push button. Connect another wire from Ground (pin 6) to the other terminal. Polarity does not matter for a simple switch.
Enable in Software
Stratux EU firmware has built-in shutdown button support on GPIO 3. No additional configuration is needed. The button will trigger a clean shutdown when pressed. For advanced configuration, you can SSH into your Stratux using PuTTY (Windows) or Terminal (macOS/Linux).
PuTTYTest the Button
Power on your Stratux and wait for it to boot fully. Press the shutdown button briefly. The system should begin shutdown within a few seconds. Wait for the activity LED to stop blinking before removing power.
Mount the Button
Drill a small hole in your Stratux case and mount the button for easy access. Use hot glue or mounting tape to secure loose wires inside the case.
Important Notes
- Always wait for complete shutdown before unplugging power
- GPIO 3 also handles I2C - avoid if using I2C devices
- A long press (5+ seconds) will force shutdown - use sparingly