The TX pin automatically does everything needed for power on and power off. If you want the OS to do a shutdown when the button is pressed for a moment, then some Python code needs to be run in the background.
first: thx for the great work. I learned so much from your tutorials.
I try to make a handcrafted board based on your scheme that fits in a SNES controller. I wonder why my layout only got 5 pin outs and yours got 7. Where are these two extra pins come from?
For my SNES project, i use a powerboost 500c lipo charger. Is there an easy way to integrate the charger into your circuit to cut power supply completely when the Pi shuts down?
I’m trying to figure out exactly what you are asking.
If you are trying to use the advanced on/off circuit, I recommend using a PCB since it has a large number of components (I’ll have this available to all countries soon). If you want to go the simpler route, the soft on/off circuit is much easier to assemble. This circuit goes between the output pins of the 500c and the input pins of the Pi, and it turns off completely when the OS shuts down. I hope I answered your question. Feel free to respond if you still are having trouble.
I try to use your advanced on/off circuit scheme to create my own PCB. The only thing I’m wondering is, why are there 7 pins on your PCB you are selling in your shop and not just 5?
Since I am using a lipo charger, I also try to figure out how to not only shut down the PI but also the lipo charger itself (https://www.adafruit.com/product/1944). The charger cuts power when a pin (EN) is set to ground. Maybe you got an idea… but you don’t have to 🙂
Okay I understand now.
Pin 1: +5v in from the power supply
Pin 2: GND in from the power supply
Pin 3: Switch
Pin 4: +5v out
Pin 5: GND out (not needed, but included for anyone that wants it)
Pin 6: Goes to TX on Pi
Pin 7: Goes to GPIO on Pi for software shutdown