One of the weakest sides of raspberry Pi is its power supply. We only get micro-USB option for powering the device. In one hand this is great feature because micro-USB chargers are becoming standard for phone chargers, so most of us already have those near by. There is another option of powering Raspberry Pi – using PGIO where you can find power pins. The real problem is that you don’t have much of power control on board – even there is no power button. Once you plug the adapter it starts to work immediately and powers off once you plug it off.
Felix Rusu have designed small power controller for Raspberry Pi which gives some control. It is Attiny based board so called ATXRaspi that gives features like power button, status LED, and link to RasPi. This allows shutting down the board without need to log in. when you click the power button adapter sends command to Raspberry Pu through GPIO to initiate shutdown script and will safely turn it off. Practically you can place any commands to execute before turning off – saving data, cleanup, writing to log files and so on.