Tackling Graceful Shutdowns on the GBZ
- 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
No. I struggled with this for several weeks. I even struggled to get the P-channel JFET to work, until I moved the slide-switch to the drain side.
- 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 read about the UART doing this during boot. Apparently it's because this is actually a serial console. And the fluctuations are actual console messages. What about using GPIO-poweroff driver instead but using the active low flag which should give you a solid high state on boot up?Camble wrote:The UART TX pin is 3.3v and it shouldn't be receiving any current. It keeps the JFET's gate at +3.3v. A diode won't hurt, but I don't think it's necessary.
The GPIO27 pin is simply shorted to ground when you want to signal a shutdown, so no protection required here either.
Something that would be more useful is a way to prevent the UART voltage fluctuating to as low as 1v while the Pi boots up. After about 5 seconds of bootup, it stabilises at 3.3v, but if you close the power switch before this happens, the PowerBoost will shut off. Strange, because the minimum cut-off gate voltage for this JFET is 750mV. Maybe just not enough to pinch off. I might try playing with the voltages some more.
- 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
@Popcorn That could work. How early during bootup is the pin likely to be active? With UART, you're waiting maybe 8-10 seconds after power on before you can do a safe shutdown.
- 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 long. Try with the dtoverlay. That process should happen at boot. Maybe a second or two from power on.Camble wrote:@Popcorn That could work. How early during bootup is the pin likely to be active? With UART, you're waiting maybe 8-10 seconds after power on before you can do a safe shutdown.
- 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
@Ganreizu Not sure which solution you mean, but I am hoping to have a PCB made to replace this:
[spoiler="Perfboard prototype"]
[/spoiler]
[spoiler="Perfboard prototype"]

Re: Tackling Graceful Shutdowns on the GBZ
Exactly that yes.Camble wrote:@Ganreizu Not sure which solution you mean, but I am hoping to have a PCB made to replace this:
[spoiler="Perfboard prototype"][/spoiler]

-
- Posts: 35
- Joined: Sun Jul 17, 2016 11:37 am
- Has thanked: 16 times
- Been thanked: 4 times
Re: Tackling Graceful Shutdowns on the GBZ
Am I correct that this setup does the "work" but is not using a Pololu?
So looking at the wiring diagram my understanding is that we have the one JFET, a resistor and the switch as components plus board and cables?

So this goes to EN and GND from the Powerboost as well as to the mentioned GPIOs on the Pi?
So looking at the wiring diagram my understanding is that we have the one JFET, a resistor and the switch as components plus board and cables?

So this goes to EN and GND from the Powerboost as well as to the mentioned GPIOs on the Pi?
- 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
Alright, I'll update when I can. In the meantime, I've got a short guide to post in the Hardware section. I want to test @Popcorn's dtoverlay=gpio-poweroff idea with first.
@larsen2011 Yes. The circuit shorts EN to GND on the PowerBoost to keep everything off. After you slide the power switch to off, the JFET keeps the circuit open while the Pi shuts down.
@larsen2011 Yes. The circuit shorts EN to GND on the PowerBoost to keep everything off. After you slide the power switch to off, the JFET keeps the circuit open while the Pi shuts down.
Who is online
Users browsing this forum: No registered users and 1 guest