Tackling Graceful Shutdowns on the GBZ
- Felix
- Posts: 44
- Joined: Wed May 11, 2016 7:17 am
- Location: Antwerp, Belgium
- Has thanked: 3 times
- Been thanked: 12 times
Re: Tackling Graceful Shutdowns on the GBZ
So, I want to use the code but I'm not going to use a pololu. The part that I want to use is the low battery and instead of a slide switch I want a tactile switch that gives the command to shutdown the rp0 if it's been pressed for ~2sec. That's for the rp0 shutdown, for the shutting down of the power I'm just using a switch between the enable pin and ground (I don't like popcorn's way that the powerboost is still on after the shutdown and power off).
- Camble
- Posts: 885
- Joined: Thu May 05, 2016 2:31 am
- Location: Scotland
- Has thanked: 269 times
- Been thanked: 488 times
Re: Tackling Graceful Shutdowns on the GBZ
Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?Felix wrote:So, I want to use the code but I'm not going to use a pololu. The part that I want to use is the low battery and instead of a slide switch I want a tactile switch that gives the command to shutdown the rp0 if it's been pressed for ~2sec. That's for the rp0 shutdown, for the shutting down of the power I'm just using a switch between the enable pin and ground (I don't like popcorn's way that the powerboost is still on after the shutdown and power off).
Re: Tackling Graceful Shutdowns on the GBZ
But then how do you switch out the battery in the wild? Can we wire the connector that the powerboost has to the pololu?Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?
I absolutely want to find a fix for the powerboost always being on and connected, but also want to be able to remove the battery on the fly.
- Popcorn
- Trailblazer
- Posts: 354
- Joined: Thu May 05, 2016 12:58 am
- Location: Berlin
- Has thanked: 29 times
- Been thanked: 71 times
Re: Tackling Graceful Shutdowns on the GBZ
Don't think I didn't struggle with this. This was the best compromise using what we have.
In the end, I positioned my latching switch so it's right next to the slide switch. The nice feature about the way I did it is that when flipped on, the plastic tab covers the hole, so you cannot access the emergency latch while the system is ON. That will preserve the graceful shutdowns. Also, I made it so when it is latched to shut the powerboost off, I made the latch extend out, so that blocks the plastic tab. Which means that you can't accidentally try to turn it on, while it's latched off. A win-win.
If you want to use my script to trigger after 2 seconds, go for it. I placed the power button timeout as 1 second in the variables section at the top of the script. Just edit it to 2 instead.
Please note that I'm working on version 1.1 which moves all of these into a config file instead
In the end, I positioned my latching switch so it's right next to the slide switch. The nice feature about the way I did it is that when flipped on, the plastic tab covers the hole, so you cannot access the emergency latch while the system is ON. That will preserve the graceful shutdowns. Also, I made it so when it is latched to shut the powerboost off, I made the latch extend out, so that blocks the plastic tab. Which means that you can't accidentally try to turn it on, while it's latched off. A win-win.
If you want to use my script to trigger after 2 seconds, go for it. I placed the power button timeout as 1 second in the variables section at the top of the script. Just edit it to 2 instead.
Please note that I'm working on version 1.1 which moves all of these into a config file instead
- Camble
- Posts: 885
- Joined: Thu May 05, 2016 2:31 am
- Location: Scotland
- Has thanked: 269 times
- Been thanked: 488 times
Re: Tackling Graceful Shutdowns on the GBZ
Two... power supplies?Ganreizu wrote:But then how do you switch out the battery in the wild? Can we wire the connector that the powerboost has to the pololu?Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?
I absolutely want to find a fix for the powerboost always being on and connected, but also want to be able to remove the battery on the fly.

- Felix
- Posts: 44
- Joined: Wed May 11, 2016 7:17 am
- Location: Antwerp, Belgium
- Has thanked: 3 times
- Been thanked: 12 times
Re: Tackling Graceful Shutdowns on the GBZ
Actually that might be possible because the pololu needs a min. voltage of 2v.Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?Felix wrote:So, I want to use the code but I'm not going to use a pololu. The part that I want to use is the low battery and instead of a slide switch I want a tactile switch that gives the command to shutdown the rp0 if it's been pressed for ~2sec. That's for the rp0 shutdown, for the shutting down of the power I'm just using a switch between the enable pin and ground (I don't like popcorn's way that the powerboost is still on after the shutdown and power off).
That's a possible way to connect and if it doesn't fit you can solder some wires to it.Ganreizu wrote:But then how do you switch out the battery in the wild? Can we wire the connector that the powerboost has to the pololu?Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?
I absolutely want to find a fix for the powerboost always being on and connected, but also want to be able to remove the battery on the fly.
- Popcorn
- Trailblazer
- Posts: 354
- Joined: Thu May 05, 2016 12:58 am
- Location: Berlin
- Has thanked: 29 times
- Been thanked: 71 times
Re: Tackling Graceful Shutdowns on the GBZ
If you put the pololu on the battery, that means you can't charge while the unit is offFelix wrote:Actually that might be possible because the pololu needs a min. voltage of 2v.Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?Felix wrote:So, I want to use the code but I'm not going to use a pololu. The part that I want to use is the low battery and instead of a slide switch I want a tactile switch that gives the command to shutdown the rp0 if it's been pressed for ~2sec. That's for the rp0 shutdown, for the shutting down of the power I'm just using a switch between the enable pin and ground (I don't like popcorn's way that the powerboost is still on after the shutdown and power off).
That's a possible way to connect and if it doesn't fit you can solder some wires to it.Ganreizu wrote:But then how do you switch out the battery in the wild? Can we wire the connector that the powerboost has to the pololu?Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?
I absolutely want to find a fix for the powerboost always being on and connected, but also want to be able to remove the battery on the fly.
- Popcorn
- Trailblazer
- Posts: 354
- Joined: Thu May 05, 2016 12:58 am
- Location: Berlin
- Has thanked: 29 times
- Been thanked: 71 times
Re: Tackling Graceful Shutdowns on the GBZ
One main power switch. The other for emergency shutdowns as a reset button. If you read the FAQ, the latching switch is in case the monitor crashes or the pi has a kernal panic. Rare events but in case they happen. You dont need to install it, its totally optional. But if that happened, and you didn't have it, you'd need to get your screwdriver out to shut it off.Camble wrote:Two... power supplies?Ganreizu wrote:But then how do you switch out the battery in the wild? Can we wire the connector that the powerboost has to the pololu?Camble wrote:Can't the Pololu be wired directly to the battery, with the Powerboost connected to the output of the Pololu?
I absolutely want to find a fix for the powerboost always being on and connected, but also want to be able to remove the battery on the fly.I think I might just put up with it tbh.
Here's what mine looks like:


- Popcorn
- Trailblazer
- Posts: 354
- Joined: Thu May 05, 2016 12:58 am
- Location: Berlin
- Has thanked: 29 times
- Been thanked: 71 times
Re: Tackling Graceful Shutdowns on the GBZ
Wait a sec! Why didn't I think of this before? I think I might have found a way to have the pololu shut off the Powerboost. I wont be able to test until after the weekend. Can someone try this and report back? You need the pololu mini slide switch.
Connect everything up like the guide but also add two wires. EN and GND on the Powerboost continue to go to a latching switch still (we still need an emergency reset) BUT, they also map to the center OFF and GND that are pinned out as part of the onboard switch in the middle of the board. Looking at the schematic, they close when off, which is what we need to shut off the Powerboost. Someone let us know if this works? Or I'll let you know by Tuesday. I'm out of town til then.

Connect everything up like the guide but also add two wires. EN and GND on the Powerboost continue to go to a latching switch still (we still need an emergency reset) BUT, they also map to the center OFF and GND that are pinned out as part of the onboard switch in the middle of the board. Looking at the schematic, they close when off, which is what we need to shut off the Powerboost. Someone let us know if this works? Or I'll let you know by Tuesday. I'm out of town til then.

Who is online
Users browsing this forum: No registered users and 1 guest