Yeah, thats a bit different direction than me. Im desigining a complete solution that you can wire into the Pi and have everything on the one board. I hate the idea of adding another processor to add more GPIOs when the Pi already has so many. I know people use the teensy because it was what they could get working, but to me its such a waste.. forces you to have a USB hub and such.Popcorn wrote:Nothing except if we use the Teensy, we get a battery level reading as a bonus. Going that route, we'd need to make a little breakout board, build a circuit and solder more components. I want to try to use what we have instead of adding more. That's the thought process anyway.prerunnerseth wrote:So whats wrong with using this method? I thought you wanted to get a battery level and not just a lower battery indicator.Popcorn wrote:Yeah, seems like this guy did something similar with the Powerboost and wiring it up to the LED led
http://www.stuffaboutcode.com/2016/01/p ... nitor.html
I didn't believe/know the Pi Zero had any onboard ADC. That's why I'm looking at the Teensy because there's a bunch of them that are unused on there.
Tackling Graceful Shutdowns on the GBZ
-
- Posts: 279
- Joined: Fri May 06, 2016 5:36 pm
- Has thanked: 16 times
- Been thanked: 229 times
Re: 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
That's ambitious and would be amazing to do. So you are plannig to replace the Teensy, Powerboost, and Audio Amp?prerunnerseth wrote:Yeah, thats a bit different direction than me. Im desigining a complete solution that you can wire into the Pi and have everything on the one board. I hate the idea of adding another processor to add more GPIOs when the Pi already has so many. I know people use the teensy because it was what they could get working, but to me its such a waste.. forces you to have a USB hub and such.Popcorn wrote:Nothing except if we use the Teensy, we get a battery level reading as a bonus. Going that route, we'd need to make a little breakout board, build a circuit and solder more components. I want to try to use what we have instead of adding more. That's the thought process anyway.prerunnerseth wrote:
So whats wrong with using this method? I thought you wanted to get a battery level and not just a lower battery indicator.
-
- Posts: 279
- Joined: Fri May 06, 2016 5:36 pm
- Has thanked: 16 times
- Been thanked: 229 times
Re: Tackling Graceful Shutdowns on the GBZ
The Teensy is mostly unneeded anyways unless you do want your ADC input for battery level indication. What I'm working on now is the power path and supply part of it. Here is my flow so far.Popcorn wrote:That's ambitious and would be amazing to do. So you are plannig to replace the Teensy, Powerboost, and Audio Amp?prerunnerseth wrote:Yeah, thats a bit different direction than me. Im desigining a complete solution that you can wire into the Pi and have everything on the one board. I hate the idea of adding another processor to add more GPIOs when the Pi already has so many. I know people use the teensy because it was what they could get working, but to me its such a waste.. forces you to have a USB hub and such.Popcorn wrote:
Nothing except if we use the Teensy, we get a battery level reading as a bonus. Going that route, we'd need to make a little breakout board, build a circuit and solder more components. I want to try to use what we have instead of adding more. That's the thought process anyway.
Switch turned on or button pressed - power turns on
Switch turned off or button pressed again - Interrupt sent to PI - Pi Shuts down - asserts kill command to power path controller - power cut
in the case of a frozen RPi - when the switch is turned off or button pressed again if no kill command is received from the RPi within 45 seconds then the power is cut anyways.
Low battery
LBO is asserted from the boost - Low battery icon presented on RPi Screen - If the RPi isnt shut down or plugged in within 2 minute the power is shut off anyways.
All other charger and boost functions would remain the same.
- 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
That logic sounds sound. And yeah, I could live without the battery level in your IC. It was just a nice-to-have. I will built one out with the teensy anyways since I've bought the thing and have it anyway. But, I still have 2 spare Gameboy cases so I might use your future board for a future build of one of those. Keep us posted. Sounds great!prerunnerseth wrote:The Teensy is mostly unneeded anyways unless you do want your ADC input for battery level indication. What I'm working on now is the power path and supply part of it. Here is my flow so far.Popcorn wrote:That's ambitious and would be amazing to do. So you are plannig to replace the Teensy, Powerboost, and Audio Amp?prerunnerseth wrote:
Yeah, thats a bit different direction than me. Im desigining a complete solution that you can wire into the Pi and have everything on the one board. I hate the idea of adding another processor to add more GPIOs when the Pi already has so many. I know people use the teensy because it was what they could get working, but to me its such a waste.. forces you to have a USB hub and such.
Switch turned on or button pressed - power turns on
Switch turned off or button pressed again - Interrupt sent to PI - Pi Shuts down - asserts kill command to power path controller - power cut
in the case of a frozen RPi - when the switch is turned off or button pressed again if no kill command is received from the RPi within 45 seconds then the power is cut anyways.
Low battery
LBO is asserted from the boost - Low battery icon presented on RPi Screen - If the RPi isnt shut down or plugged in within 2 minute the power is shut off anyways.
All other charger and boost functions would remain the same.
Re: Tackling Graceful Shutdowns on the GBZ
@Popcorn
Regarding the over voltage thing going to the RPi's GPIO, can't we solve it using an inline resistor to reduce the voltage and still implement what you have? I'm fine with your solution until PRS completes the all-in-one charger/shutdown board. (Note: I've already ordered the Pololu switch
)
One concern that I have though is with the implementation of a battery level indicator overlay, if I'm not mistaken, it would need another process constantly running in the background and could impact overall performance esp. if we're talking Pi0 performance. To me the shutdown feature is the minimum we would need. Besides, the original GB didn't have a battery level indicator, just a low batt indicator. Yours is one step ahead by having an animation showing the time left to save before the system shuts down.
These mobile phones and tablets spoiled us with this battery icon that we now feel it's necessary. Just a thought.
Regarding the over voltage thing going to the RPi's GPIO, can't we solve it using an inline resistor to reduce the voltage and still implement what you have? I'm fine with your solution until PRS completes the all-in-one charger/shutdown board. (Note: I've already ordered the Pololu switch

One concern that I have though is with the implementation of a battery level indicator overlay, if I'm not mistaken, it would need another process constantly running in the background and could impact overall performance esp. if we're talking Pi0 performance. To me the shutdown feature is the minimum we would need. Besides, the original GB didn't have a battery level indicator, just a low batt indicator. Yours is one step ahead by having an animation showing the time left to save before the system shuts down.
These mobile phones and tablets spoiled us with this battery icon that we now feel it's necessary. Just a thought.

Re: Tackling Graceful Shutdowns on the GBZ
Hello Popcorn ,
I've read the wall thread and try to understand what you where doing with my noobie electronics level ^^
It seems you've done what we were looking for and even more. This looks awesome !
Time for me to place an order. Wich version of Pololou do you recomend to follow your build ? 2808 pushbutton or 2810 slide switch ?
As a noob, my goal is to stick with your final diagram to avoid being lost.
Thanks for what you're doing and for sharing
I've read the wall thread and try to understand what you where doing with my noobie electronics level ^^
It seems you've done what we were looking for and even more. This looks awesome !
Time for me to place an order. Wich version of Pololou do you recomend to follow your build ? 2808 pushbutton or 2810 slide switch ?
As a noob, my goal is to stick with your final diagram to avoid being lost.
Thanks for what you're doing and for sharing

Re: Tackling Graceful Shutdowns on the GBZ
If you haven't bought the polulu i would just wait for the premade shutdown board to be available. If you want to do it yourself anyway i think it doesn't matter which one you get but the slide switch should work better.Bubble wrote:Hello Popcorn ,
I've read the wall thread and try to understand what you where doing with my noobie electronics level ^^
It seems you've done what we were looking for and even more. This looks awesome !
Time for me to place an order. Wich version of Pololou do you recomend to follow your build ? 2808 pushbutton or 2810 slide switch ?
As a noob, my goal is to stick with your final diagram to avoid being lost.
Thanks for what you're doing and for sharing
- 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
I am sorry, i haven't followed the whole thread yet.Ganreizu wrote:If you haven't bought the polulu i would just wait for the premade shutdown board to be available. If you want to do it yourself anyway i think it doesn't matter which one you get but the slide switch should work better.
Is there a PCB planned for this shutdown method? If so, what is the progress?
Thank you.
Re: Tackling Graceful Shutdowns on the GBZ
Gotta ask @prerunnerseth but yeah he's making a PCB for this, and possibly a USB audio board after that, of which i will be buying both immediately.Fleder wrote:I am sorry, i haven't followed the whole thread yet.
Is there a PCB planned for this shutdown method? If so, what is the progress?
Thank you.
Re: Tackling Graceful Shutdowns on the GBZ
I went through prerunnerseth posts before to ask, but from my perspective, Popcorn's solution sounds really nice, because those components will be esaier to find around the world.
Custom PCBS are awesome, but accesibility is also the key in an open source project
Custom PCBS are awesome, but accesibility is also the key in an open source project

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