[Guide] Graceful shutdown switch without Pololu [RETIRED]

Various user-contributed guides for hardware-related things
User avatar
KrxXxiT
Posts: 25
Joined: Sat Jun 18, 2016 3:13 am
Location: Croatia
Has thanked: 27 times
Been thanked: 6 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by KrxXxiT » Mon Sep 19, 2016 2:56 am

Camble wrote:@KrxXxiT All I'll be doing is releasing a modified version of Popcorn's script for each of my shutdown boards. The videos and everything else will remain the same.
Still, a modified version will work, the current one doesn't. Man I'm looking forward to this, it's the last part I need to complete my build. :)

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 » Mon Sep 19, 2016 4:34 am

@KrxXxiT Sorry! I could have sworn I added steps on how to modify Popcorn's script.

Make the following changes:

Code: Select all

25. GPIO.setup(powerGPIO, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
Last edited by Camble on Mon Sep 19, 2016 6:20 am, edited 3 times in total.

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 » Mon Sep 19, 2016 5:56 am

So, I reformatted and reimaged the SD card that had the Retropie 4.0.2 install go bad last night. Made it through the first boot and was able to install Popcorn's power monitor, and modify the THREE lines of code. Reboot the Pi, and it's stuck at the splash screen. So I think that SD may have truly died(??)

Pull out SD card #2 that has RetroPie 3.8.1 already installed and all the changes we knew about as of last night. Made the 2 additional changes we just found out about on Popcorn's power monitor this morning. Put this on a Pi with Camble's recommended circuit from yesterday. The Pi boots, and then immediately issues a shutdown command.

Is there maybe another power monitor script change we need, besides those 3 lines????

Also, when @myPiZero apparently had this exact same issue a couple pages back, he mentioned that he mounted the SD to a Windows PC to disable the startup script. How does one do that?
Image
Image Image

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 » Mon Sep 19, 2016 6:06 am

@RxBrad Try only modifying the first line of code. Sorry, I'm not at home right now so I can't confirm. I can confirm however, that the version of the script I have running at home works flawlessly.

This was already in my guide before, but when the guide was changed to reflect only needing one circuit diagram, I must have pulled something out unintentionally.
Last edited by Camble on Mon Sep 19, 2016 6:11 am, edited 1 time in total.

myPiZero
Posts: 30
Joined: Mon Aug 15, 2016 11:34 pm
Been thanked: 5 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by myPiZero » Mon Sep 19, 2016 6:10 am

@RxBrad I used a freeware by paragon
paragon
I would disable the option to turn off during boot. If the shutdown signal is active during boot, for safety reasons, disable the graceful shutdown feature.
Last edited by myPiZero on Mon Sep 19, 2016 6:19 am, edited 1 time in total.

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 » Mon Sep 19, 2016 6:14 am

Any chance this need to be changed also, on line 96? Maybe from GPIO.FALLING to GPIO.RISING (sorry, I know nothing about Python), since the power GPIO was modified from pullup to pulldown?

Code: Select all

GPIO.add_event_detect(powerGPIO, GPIO.FALLING, callback=powerSwitch, bouncetime=300)
Image
Image Image

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 » Mon Sep 19, 2016 6:17 am

@RxBrad Nope.

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 » Mon Sep 19, 2016 6:21 am

Alright, just change the first line. I was getting mixed up between the two versions of the script (the BangGood version of my board requires yet more changes to the script).

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 » Mon Sep 19, 2016 6:41 am

@Camble Back to the drawing board, I guess.. :) I'll just keep waiting for the Vishay FET.

Any chance you could post your working Powerboost script somewhere in its entirety? Thanks..
Image
Image Image

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 » Mon Sep 19, 2016 6:43 am

RxBrad wrote:Any chance you could post your working Powerboost script somewhere in its entirety? Thanks..
It's identical except for that one line. It's the BangGood version that has a few more changes.

Your Layout #02 should work with that one change to the script.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest