[Guide] Graceful shutdown switch without Pololu [RETIRED]

Various user-contributed guides for hardware-related things
User avatar
WoodMill
Posts: 181
Joined: Tue Sep 06, 2016 11:57 am
Location: Indianapolis, Indiana, USA
Has thanked: 21 times
Been thanked: 29 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by WoodMill » Sun Oct 02, 2016 4:34 pm

RxBrad wrote:@Woodmill

I can probably send you 2 for $2 shipped or 1 for $1.50. Since I've run into a dud in my "good" batch (ordered here), I'll want to test it out on the breadboard before I send it. Whether I really have spares also depends on how many good ones I have in the batch of 10 that I ordered.

PM me on Monday if I don't get back to you before then. Or you can order from that same supplier I used. It took a little over 2 weeks to get to Michigan, and that was with it getting stuck in customs in Chicago for about 5 days.
If you're still offering, I'd pay $2 for 2. I have no real way to check to make sure they work before I put them in my install.
Follow my Youtube Vlog about Filmmaking
https://www.youtube.com/playlist?list=P ... P0H6UZe1ds

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: [Guide] Graceful shutdown switch without Pololu

Post by RxBrad » Sun Oct 02, 2016 6:43 pm

@Woodmill I didn't get a chance to check my stock this weekend, but should get it done in the next day or two. I'll PM a PayPal link to you once I'm good to go.
Image
Image Image

User avatar
fdeluxe
Posts: 71
Joined: Tue Aug 23, 2016 10:16 am
Has thanked: 12 times
Been thanked: 27 times
Contact:

Re: [Guide] Graceful shutdown switch without Pololu

Post by fdeluxe » Wed Oct 12, 2016 12:14 am

Sorry if this has been asked before: Do I need the power monitoring script in order to make the Pi shutdown when I set the switch to off? I've added "dtoverlay=gpio-poweroff,gpiopin=22,active_low="y" to my config.txt, but my Pi just stays on when I use the switch :(

SidSilver
Posts: 263
Joined: Sun May 22, 2016 6:22 am
Location: France
Has thanked: 137 times
Been thanked: 37 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by SidSilver » Wed Oct 12, 2016 12:24 am

Yes you need it.

lordalex
Posts: 4
Joined: Wed Oct 12, 2016 10:09 am

Re: [Guide] Graceful shutdown switch without Pololu

Post by lordalex » Wed Oct 12, 2016 10:14 am

RxBrad wrote:
BREAKTHROUGH!!!!! (Urk. Most of the time, at least. It occasionally still insta-kills the power.)

In the battery monitor script:

Code: Select all

25. GPIO.setup(powerGPIO, GPIO.IN, pull_up_down=GPIO.PUD_UP)
64. if GPIO.input(powerGPIO) is 0:
87. if GPIO.input(powerGPIO) is 1:
In config.txt:

Code: Select all

dtoverlay=gpio-poweroff,gpiopin=22,active_low="y"
Wire it up like this:
Image

It frickin' WORKS!!!! Tested with a Fairchild 2N5460 and a Fairchild 2N5461.

Reminder that this is the pinout on the Fairchild FET:

Hi, can anyone help me. Im running out of ideas. Tried almost every configuration shown in this post and i dont know how to get it to work.

With this configuration above i am able to use the power switch the right way. Pins above, left off, right on. I installed the power monitor. After the boot it wants to shut down immediately, saying im out of capacity. The thing is, the cable is plugged in.

Have to test it with charged battery, but this shouldn´t behave so, right?

jsawhite
Posts: 31
Joined: Fri Aug 26, 2016 5:45 am
Location: Lutz, FL
Has thanked: 23 times
Been thanked: 7 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by jsawhite » Thu Oct 13, 2016 6:07 am

lordalex wrote: Hi, can anyone help me. Im running out of ideas. Tried almost every configuration shown in this post and i dont know how to get it to work.

With this configuration above i am able to use the power switch the right way. Pins above, left off, right on. I installed the power monitor. After the boot it wants to shut down immediately, saying im out of capacity. The thing is, the cable is plugged in.

Have to test it with charged battery, but this shouldn´t behave so, right?
if you installed Camble's power monitor as it is (from github), it's expecting 3.3V on one of the GPIO pins (don't remember off the top of my head) from the battery monitor. If you don't have the battery monitor hardware, you'll have to either modify the python script to remove the battery monitor or tie low battery gpio pin on the zero to 3.3v (read: NOT the lbo pin on the 1000c)...

lordalex
Posts: 4
Joined: Wed Oct 12, 2016 10:09 am

Re: [Guide] Graceful shutdown switch without Pololu

Post by lordalex » Thu Oct 13, 2016 12:03 pm

jsawhite wrote:
if you installed Camble's power monitor as it is (from github), it's expecting 3.3V on one of the GPIO pins (don't remember off the top of my head) from the battery monitor. If you don't have the battery monitor hardware, you'll have to either modify the python script to remove the battery monitor or tie low battery gpio pin on the zero to 3.3v (read: NOT the lbo pin on the 1000c)...
Can you tell me the last part?

Im running this configuration now. Same behavieur. Like you said right? But isnt working at all

Edit: switch is the other way. Off, when EN and GND are connected


Beside this: Graceful shutdown isnt working either. Just switched to off and it immediately went off. :/
Attachments
Shutdown.jpg
Shutdown.jpg (28.35 KiB) Viewed 8544 times

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

Re: [Guide] Graceful shutdown switch without Pololu

Post by Camble » Fri Oct 14, 2016 12:43 am

@lordalex The switch behaves that way by design. When you break the connection between EN and GND, the PowerBoost turns on.

If you don't have the low battery connection, you need to remove this line from the script:

Code: Select all

GPIO.add_event_detect(batteryGPIO, GPIO.FALLING, callback=lowBattery, bouncetime=300)
Please make sure you're running the latest version of the script.

User avatar
fdeluxe
Posts: 71
Joined: Tue Aug 23, 2016 10:16 am
Has thanked: 12 times
Been thanked: 27 times
Contact:

Re: [Guide] Graceful shutdown switch without Pololu

Post by fdeluxe » Sat Oct 15, 2016 4:50 am

I already asked this on Youtube, but Ill repeat my question here so anyone can read it:

I noticed that the Powerboost never really turns off (blue LED keeps shining). @Camble answered that "this issue can be resolved with a JFET in series with your power switch."

Does anyone have a guide on this? Does this mean I need two JFETs?

Thanks

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

Re: [Guide] Graceful shutdown switch without Pololu

Post by Camble » Sat Oct 15, 2016 6:11 am

@fdeluxe No, just one. Follow the guide to build the circuit, but be mindful there are counterfeit JFETs in the Chinese market. We originally thought some brands didn't work in the same application, but I suspect most of the trouble people have had are due to counterfeits. If you need help sourcing, or identifying a JFET, give me a shout.

You may have reached Popcorn's video from my github clone of his power monitor. Maybe that's where the confusion lies? His original solution used a Pololu switch and the PowerBoost would remain enabled.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest