[Guide] Graceful shutdown switch without Pololu [RETIRED]

Various user-contributed guides for hardware-related things
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 » Wed Nov 16, 2016 6:17 am

HoolyHoo wrote: Well that's strange. I assume you added the start up script with cambles install command correct?

echo "@reboot /usr/bin/nice -n 19 /usr/bin/python ~/GBZ-Power-Monitor_PB/gbz_power_monitor.py" >> mycron; crontab mycron;rm mycron

If you did then that's where it would be unless you decided to start it in rc.local for some reason.
Yeah i used that command. o.o

User avatar
HoolyHoo
Posts: 758
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 204 times
Been thanked: 734 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by HoolyHoo » Wed Nov 16, 2016 6:28 am

Ganreizu wrote:
HoolyHoo wrote: Well that's strange. I assume you added the start up script with cambles install command correct?

echo "@reboot /usr/bin/nice -n 19 /usr/bin/python ~/GBZ-Power-Monitor_PB/gbz_power_monitor.py" >> mycron; crontab mycron;rm mycron

If you did then that's where it would be unless you decided to start it in rc.local for some reason.
Yeah i used that command. o.o
Ok, type crontab -e without the sudo. That should do it.

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 Nov 17, 2016 7:35 pm

HoolyHoo wrote:Ok, type crontab -e without the sudo. That should do it.
That did it. :D!

Johnputer
Posts: 7
Joined: Wed Sep 28, 2016 11:27 pm
Has thanked: 2 times
Been thanked: 2 times

Re: [Guide] Graceful shutdown switch without Pololu

Post by Johnputer » Sat Nov 19, 2016 12:00 pm

I don't have a 2N2460 on hand, but have several 2n2462. I'm thinking it should work. Anyone see why it wouldn't?

Thanks.

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 » Sat Nov 19, 2016 1:17 pm

Johnputer wrote:I don't have a 2N2460 on hand, but have several 2n2462. I'm thinking it should work. Anyone see why it wouldn't?

Thanks.
2N5460?

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 » Sat Nov 26, 2016 6:45 am

Just another quick mention of the kernel panic issues. I suspect 100K may be too high for the pull-down to ground. Something under 50K should do the trick. I've had success with 10K, 16K, 22K and 47K.

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 » Sun Nov 27, 2016 6:16 am

Hi there,

I have two issues on this (with the second potentially being a result of the first):

1: My power switch works "vice-versa", in off position it switches on, when sliding to off position, the GBZ shuts down. I have posted pics in my build log: http://www.sudomod.com/forum/viewtopic. ... 891#p20891

2: When trying to setup the power monitor, putty input "freezes". I can't do anything after entering this command, and nothing happens on the screen, so I'm not quite sure what to do here.
Shutdown.JPG
Shutdown.JPG (53.81 KiB) Viewed 3794 times
I'm happy to hear any idea on how to fix this.

Thanks!

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 Nov 27, 2016 6:21 am

@larsen2011 You have your switch wired up backwards. And you won't see anything in PUTTY while the python script is running, until it acts and causes a shutdown.

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 » Sun Nov 27, 2016 6:24 am

That's what I figured.

Any help on what to change?
Do I only need to swap top and bottom row?

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 Nov 27, 2016 6:27 am

@larsen2011 You're using the original DMG switch, so yes. Swapping the pairs around should be fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest