[Guide] Graceful shutdown switch without Pololu [RETIRED]

Various user-contributed guides for hardware-related things
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 » Sun Oct 16, 2016 2:27 pm

Hi,

I have a problem:

when I use the switch my Pi reboots instead of shutting down

I got the Siliconix JFET

Here's my wiring:
wiring.PNG
wiring.PNG (9.54 KiB) Viewed 3052 times
Using the wiring shown in the first post my Pi shuts off immediately
Reversing Source and Drain works, but I'll get Kernel panic when the Pi tries to shutdown :(

The label on the backside of the JFET reads:

Image2N
5460
T8630

User avatar
Camble
Posts: 882
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 » Sun Oct 16, 2016 3:39 pm

@fdeluxe Your diagram shows the gate as being connected to the EN pin, where it should be connected to GPIO22. The gate may be pin 3 on the JFET, but it's the one with the arrow on the symbol.

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 » Sun Oct 16, 2016 4:21 pm

Camble wrote:@fdeluxe Your diagram shows the gate as being connected to the EN pin, where it should be connected to GPIO22. The gate may be pin 3 on the JFET, but it's the one with the arrow on the symbol.
Yup, I know that the gate is the one with the arrow. Sorry, my diagram is faulty. For my diagram just pretend that the arrow one is drain.

User avatar
Camble
Posts: 882
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 » Sun Oct 16, 2016 5:32 pm

@fdeluxe Test it without the 100K resistor, then try it with the resistor between the Gate and Source.

larsen2011
Posts: 35
Joined: Sun Jul 17, 2016 11:37 am
Has thanked: 16 times
Been thanked: 4 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by larsen2011 » Thu Oct 20, 2016 2:30 am

Due to business trips I've not been catching up on all the topics over the last couple of months, but have all the components available since to build the graceful shutdown on my own.
Now I see that the low battery indication is a new functionality, also considered in the printed board.

As I understand the first post, I can put the additional circuit somewhere, as it does not directly interact with the switch or the FET, correct?

One more question: the reset button can directly be installed between the EN and GND lines of the graceful shutdown board, correct?

User avatar
Camble
Posts: 882
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 » Thu Oct 20, 2016 2:31 am

larsen2011 wrote:As I understand the first post, I can put the additional circuit somewhere, as it does not directly interact with the switch or the FET, correct?

One more question: the reset button can directly be installed between the EN and GND lines of the graceful shutdown board, correct?
You are correct on both counts. The Raspberry Pi also has pins marked "Run" which can be used for your reset button. If you use these pins instead, all your other components will remain powered when you press reset.

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 » Thu Oct 20, 2016 9:35 pm

@camble

I got a metric ass ton of wiring and whatnot done these past few days. Fully wired up the shutdown pcb today and it works great! I noticed that when the battery is plugged into the powerboost and it is charging through the micro usb, it doesn't safely shut down (and similarly when the battery is unplugged and the system is powered by the micro usb). When the battery is the only power source it works like it should though. Have I done something wrong or does the graceful shutdown just not trigger for those cases?

PS: When i was setting up the script I noticed that rasppi's default keyboard is for the UK and had trouble finding "~" for a good half hour lol. May want to mention changing the keyboard default to people's "normal" layout in the guide. :D

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 » Thu Oct 20, 2016 10:32 pm

Ganreizu wrote: I noticed that when the battery is plugged into the powerboost and it is charging through the micro usb, it doesn't safely shut down (and similarly when the battery is unplugged and the system is powered by the micro usb). When the battery is the only power source it works like it should though. Have I done something wrong or does the graceful shutdown just not trigger for those cases?
You may have done something wrong because it works even with usb plugged in.

ReFl3x0r
Posts: 1
Joined: Tue Sep 13, 2016 2:43 am
Has thanked: 1 time

Re: [Guide] Graceful shutdown switch without Pololu

Post by ReFl3x0r » Fri Oct 21, 2016 12:28 am

@Camble

I run into a kernel panic, when shutdown is initiated by low battery, because your script uses "shutdown -h now" and with the modification in the /boot/config.txt it's waiting for a GPIO-Powerdown.

Instead of using "shutdown -h now" couldn't we just overwrite GPIO27 to initiate shutdown? Would be more clean from my point of view.

User avatar
Camble
Posts: 882
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 » Fri Oct 21, 2016 1:44 am

@Ganreizu Glad to hear it! I'm not sure how you'd find the tilde on a US keyboard if the layout is UK to be honest. I know the tilde is beside the "1" for you, but it's beside Enter for me, along with # (our pound is £, on the 3 in place of # funnily enough) :roll:

It should shutdown regardless of power source, so as @SidSilver has said you may have missed something. I can take a look to confirm if you post some pics.

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest