
Tackling Graceful Shutdowns on the GBZ
- 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
My opinion is obviously biased. But since I've also corrupted a total of two SD cards now, I think this feature is actually essential. 

- 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
Wow. All that the script is doing is a simple "sudo shutdown -h now". Can you try exiting Emulation Station and trying that manually to see if it does the same thing?SidSilver wrote:@Popcorn : I've followed your tutorial for the pololu graceful shutdown.
When I switch off I have a kernel panic.
-
- Posts: 263
- Joined: Sun May 22, 2016 6:22 am
- Location: France
- Has thanked: 137 times
- Been thanked: 37 times
Re: Tackling Graceful Shutdowns on the GBZ
I've found the problem. I did the gpio thing for the tact pololu but i have the switch pololu. Removed it now it's ok.Popcorn wrote:Wow. All that the script is doing is a simple "sudo shutdown -h now". Can you try exiting Emulation Station and trying that manually to see if it does the same thing?SidSilver wrote:@Popcorn : I've followed your tutorial for the pololu graceful shutdown.
When I switch off I have a kernel panic.
- 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
I answered this question in the FAQ. You can still use the graceful shutdowns with this power supply, but if it doesn't have a low battery led, then you won't be able to detect that and do the shutdowns when the battery is low. It will still work for the power switch though. Check for a low battery led and let us know how it worksTheNotorious wrote:oh that would suck i took one that was listed in the wiki haha
http://sudomod.com/wiki/index.php?title ... wer_Supply
the adafruit products are quite exspensive next to some others thats why but if it is not the right one im back to the ordering table haha.
Re: Tackling Graceful Shutdowns on the GBZ
@Popcorn
Thinking of implementing your graceful shutdown solution to solve for the "low batt too soon issue" with the PB1000C. However, I've got two questions that I hope you can help confirm:
1. UART TX (BCM 14) Connection
As you may recall, I cut my RPi2 leaving me with only the odd-numbered pins. With pin 8 missing, which odd-numbered pin can I substitute for it?
2. Latching Switch
Do I still need this switch if in my set-up I can easily unplug the battery from the PB1000C? See pic below of my battery connection:
[spoiler="battery connection"]
[/spoiler]
Thinking of implementing your graceful shutdown solution to solve for the "low batt too soon issue" with the PB1000C. However, I've got two questions that I hope you can help confirm:
1. UART TX (BCM 14) Connection
As you may recall, I cut my RPi2 leaving me with only the odd-numbered pins. With pin 8 missing, which odd-numbered pin can I substitute for it?
2. Latching Switch
Do I still need this switch if in my set-up I can easily unplug the battery from the PB1000C? See pic below of my battery connection:
[spoiler="battery connection"]

- Fleder
- Posts: 849
- Joined: Thu May 05, 2016 9:04 am
- Location: Germany
- Has thanked: 183 times
- Been thanked: 258 times
Re: Tackling Graceful Shutdowns on the GBZ
May i hijack this thread to ask you one question?chiz wrote:Thinking of implementing your graceful shutdown solution to solve for the "low batt too soon issue" with the PB1000C. However, I've got two questions that I hope you can help confirm:
If you are using the PB1000C, why do you soldered on a protective module to your battery?
Isn't this redundant with the PB in use?
Re: Tackling Graceful Shutdowns on the GBZ
There's an article in Adafruit website that talks about the raw vs protected batteries and they said in the article that the batteries they sell are protected ones. They even went on saying be careful using unprotected batteries. This is what prompted me to add a protection circuit to the batteries I'm using even if they're connected to the PB1000C. In the industry I'm at (I.T.), redundant system is always good.Fleder wrote:May i hijack this thread to ask you one question?chiz wrote:Thinking of implementing your graceful shutdown solution to solve for the "low batt too soon issue" with the PB1000C. However, I've got two questions that I hope you can help confirm:
If you are using the PB1000C, why do you soldered on a protective module to your battery?
Isn't this redundant with the PB in use?

- 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
Yeah, you just need any GPIO with an output set to high. Once that is feeding the ON pin of the Pololu, it will override the Off of the slide switch and will then shutdown after the Pi shuts down. You can pick whichever even numbered pin to do the same job. Pick one and add something like this to your startup script (using GPIO4 in this example):chiz wrote:@Popcorn
Thinking of implementing your graceful shutdown solution to solve for the "low batt too soon issue" with the PB1000C. However, I've got two questions that I hope you can help confirm:
1. UART TX (BCM 14) Connection
As you may recall, I cut my RPi2 leaving me with only the odd-numbered pins. With pin 8 missing, which odd-numbered pin can I substitute for it?
2. Latching Switch
Do I still need this switch if in my set-up I can easily unplug the battery from the PB1000C? See pic below of my battery connection:
[spoiler="battery connection"][/spoiler]
Code: Select all
echo out > /sys/class/gpio/gpio4/direction # set it as an output pin
echo 1 > /sys/class/gpio/gpio4/value # set the value to ON
That's the quick and dirty. There's probably a way to it using dtoverlay and setting the GPIO pin to an output and to high. That would be preferable because it would happen alot sooner in the bootup process. Have to google around to see if I can find how to set that.
And the latching switch is totally optional. You don't need it if you have an easy way to get at the batteries.
Let me know how it goes. Curious. Thanks!
Re: Tackling Graceful Shutdowns on the GBZ
what is your opinion about the http://lowpowerlab.com/atxraspi/#whatisit ?RazorX wrote:there's a more expensive alternative but requires next to no work:
ATXRaspi-R2
https://www.youtube.com/watch?v=w4vSTq2WhN8
what it is missing is the low battery functionality but it looks attractive to me because with that one you do not need to have the powerboost 1000C or any boost that needs to have EN pin.. or could this be done as well with the Pololu?
tent:wq
Re: Tackling Graceful Shutdowns on the GBZ
Well if the idea is to shutdown gracefully by button press but then not taking off the power then you do not even need a pololu any pushbutton to a gpio would do...Camble wrote:You'll still be able to use a Pololu switch to perform a graceful shutdown. The problem of the supply being on exists with both the Banggood module, as there is no EN pin to shut it off manually. You could always add a switch between your battery and the power supply module though.
Ok then I add a switch to disconnect battery.. Ok basically not nice and practical but with a switch and a button no particular hw is needed but it's strange no ps2 exists for embedded that also features something like atx and apm for shutdown and battery level...
tent:wq
Who is online
Users browsing this forum: No registered users and 1 guest