[Guide] Graceful shutdown switch without Pololu [RETIRED]

Various user-contributed guides for hardware-related things
User avatar
skrapps914
Posts: 184
Joined: Sat May 28, 2016 8:14 pm
Has thanked: 63 times
Been thanked: 33 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by skrapps914 » Mon Jul 25, 2016 11:35 am

Camble wrote: [*] If you want to use the original DMG-01 switch, you will need to connect the switch directly to the 3.3v pin on the Pi and set up GPIO27 to GPIO.PUD_DOWN

I'm semi new to altering configs and stuff, how would i go about setting up gpio27 to gpio.pud down?

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

Re: [Guide] Graceful shutdown switch without Pololu

Post by Camble » Mon Jul 25, 2016 12:45 pm

@skrapps924 If you're using Popcorn's Power Monitor, line 25 reads:

Code: Select all

GPIO.setup(powerGPIO, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Change this line to read:

Code: Select all

GPIO.setup(powerGPIO, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
I'll be adding a script to this guide at some point in future, since Popcorn's deals with low battery in a different way.

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

Re: [Guide] Graceful shutdown switch without Pololu

Post by Camble » Tue Jul 26, 2016 8:16 am

Just a quick update in case anyone is currently building their own. I discovered last night that GPIO4 is not the best pin to use for the JFET gate. It seems to be because it's the GPCLK0 pin. The pin voltage drops to almost zero if the battery is low, preventing a graceful shutdown. Should be able to use any other standard BCM pin. See here.

On the subject of PCBs, I'm thinking it might be an idea to have one version with integrated DPDT switch and another version with space for the original DMG-01 switch. Maybe I could incorporate both into one board. What do people think? If there's enough interest, I'll be ordering about 100 with surface mount components. Should be a very affordable part for any GBZ.

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by Ganreizu » Tue Jul 26, 2016 8:37 am

Camble wrote:Just a quick update in case anyone is currently building their own. I discovered last night that GPIO4 is not the best pin to use for the JFET gate. It seems to be because it's the GPCLK0 pin. The pin voltage drops to almost zero if the battery is low, preventing a graceful shutdown. Should be able to use any other standard BCM pin. See here.

On the subject of PCBs, I'm thinking it might be an idea to have one version with integrated DPDT switch and another version with space for the original DMG-01 switch. Maybe I could incorporate both into one board. What do people think? If there's enough interest, I'll be ordering about 100 with surface mount components. Should be a very affordable part for any GBZ.
Personally i want one for the original switch, but overall the DPDT switch will be a better buy. There are inherently less DMG switches so if anything do a limited run of those.

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

Re: [Guide] Graceful shutdown switch without Pololu

Post by Camble » Tue Jul 26, 2016 8:42 am

@Ganreizu I'm hoping to have a single board ready to accept either switch. Time will tell though.

User avatar
Mischief
Posts: 225
Joined: Sat May 21, 2016 7:50 am
Location: Wolverhampton, UK
Has thanked: 29 times
Been thanked: 68 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by Mischief » Tue Jul 26, 2016 8:52 am

I am interested if you decide to make a ready to go board :D

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by Ganreizu » Tue Jul 26, 2016 8:58 am

Camble wrote:@Ganreizu I'm hoping to have a single board ready to accept either switch. Time will tell though.
Sweet. If that goes up for sale i'll buy at least 3.

User avatar
day
Posts: 129
Joined: Thu Jul 07, 2016 10:08 am
Has thanked: 87 times
Been thanked: 189 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by day » Wed Jul 27, 2016 5:36 pm

i'm in as well !

can you please develop a bit more what's the difference between the original DMG-01 switch, and DPDT for this application ?

also, will this be compatible with having the function of being able to use a powerbank or the lipo, and will this also be compatible with the possibility of having a 3.7v Li-Ion Battery Level Indicator ?

thanks a lot !!

jazzy
Posts: 23
Joined: Tue Jul 19, 2016 4:56 pm
Has thanked: 9 times
Been thanked: 1 time

Re: [Guide] Graceful shutdown switch without Pololu

Post by jazzy » Wed Jul 27, 2016 7:58 pm

I'd be interested in a pcb too :D

User avatar
Rod2D2
Posts: 131
Joined: Thu May 05, 2016 5:08 am
Location: USA
Has thanked: 80 times
Been thanked: 17 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by Rod2D2 » Wed Jul 27, 2016 8:17 pm

I would be interested in this board if its made. Maybe @Helder has plans to make one of these boards with components or atleast ready for the original switch.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest