Tackling Graceful Shutdowns on the GBZ

Various user-contributed guides for software-related things
User avatar
Camble
Posts: 877
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 487 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Mon Aug 01, 2016 1:45 pm

@hueblo Who are you addressing, and what solution are you referring to?

User avatar
hueblo
Posts: 175
Joined: Mon Jun 06, 2016 2:59 pm
Has thanked: 78 times
Been thanked: 81 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by hueblo » Mon Aug 01, 2016 2:06 pm

@camble

I'm just trying to get an understanding on how popcorns graceful shutdown works. Anyone who can answer is welcome. I believed you designed your the graceful shutdown switch without Pololu for this particular issue. Using popcorns graceful shutdown the 1000C seems to stay on. From my research of this thread it seems the only way to also shut down the 1000C is to use a slide switch in place of the latching emergency reset button to turn off the 1000C. I was wondering if that is still the case or if anyone else found a work around using popcorns graceful shutdown. I did take a look at your design but I really like the low battery feature. I thought I read that you did want to implement low battery into your design, is that in the works?

User avatar
alien0matic
Posts: 102
Joined: Wed Jun 08, 2016 7:20 am
Has thanked: 15 times
Been thanked: 23 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by alien0matic » Mon Aug 01, 2016 2:30 pm

The low battery feature should be usable standalone, without the pololu as it is a standalone circuit.

User avatar
Camble
Posts: 877
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 487 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Mon Aug 01, 2016 3:50 pm

@hueblo alien0matic is correct. Low battery shutdown is simply software which initiates a shutdown when a high signal is detected on a GPIO pin.

User avatar
Popcorn
Trailblazer
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

Post by Popcorn » Wed Aug 24, 2016 9:00 am

Wow I haven't been here for a bit. This thread is like a life of it's own. hah.

And yeah, the low battery warning would would work with or without the pololu. Since the LowBatt LED is tied directly to a GPIO pin and it's all monitored by software. The software then does the shutdown process (which is the graceful part), and then disconnects the 'keep alive' signal once it's shutdown.

Then, either solution, the pololu or camble's react to the absence of the 'keepalive' signal and will then kill the power. The only difference between the two is that [mention]camble[/mention]'s solution will also close EN to Ground afterwards which will turn the Powerboost completely off. The pololu solution cannot do that.

Unfortunately though, I've been struggling to get Camble's circuit working, which I suspect is because of different branded components which are perhaps behaving differently or out of spec. But once I get it going without any issues, I will happily abandoned the Pololu solution for his and update this guide to match. You'll hear about it here once that happens.

User avatar
Camble
Posts: 877
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 487 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Wed Aug 24, 2016 9:17 am

@Popcorn I suspect with a small hack (and by that I mean soldering onto a trace or something) the Pololu could be tricked into shutting off completely.

The Motorola JFET looks to have the exact same specifications, so I can't fathom why it's not working. I'll let you know as soon as I can test it.

musty_666
Posts: 29
Joined: Tue Aug 16, 2016 8:34 am
Has thanked: 4 times
Been thanked: 2 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by musty_666 » Thu Sep 29, 2016 7:57 am

Is it possible to advice earlier that the battery is low? I would like to save my game before it turns off.

And another question, with the popup of the countdown, is it possible to still playing? For doing a savestate or something.

Thanks.

GASMAST3R
Posts: 3
Joined: Fri Sep 09, 2016 12:44 pm

Re: Tackling Graceful Shutdowns on the GBZ

Post by GASMAST3R » Sun Nov 13, 2016 7:02 am

Hy this not working on My recalboxOs.

User avatar
Camble
Posts: 877
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 487 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Tue Nov 15, 2016 6:38 am

@musty_666 You should have enough time to save your game before shutdown. You'll get a low battery alert on the screen.

User avatar
Tango
Posts: 15
Joined: Mon Nov 14, 2016 1:47 pm
Has thanked: 2 times
Been thanked: 6 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Tango » Wed Nov 16, 2016 12:48 pm

And to get around the "emergency" reset, enable the Watchdog Timer in the Raspberry Pi. This will reset the pi in the event of a kernel panic.

Dale

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest