[Guide] Graceful shutdown switch without Pololu [RETIRED]
- 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
@tescorg Looks like it might work in theory. Reminds me of this solution out https://github.com/NeonHorizon/lipopi
In my experience, the PowerBoost doesn't seem stable when the EN pin is pulled high externally like this. The LEDs oscillate and I personally wouldn't use it in this state.
The only way to know is to build and test it.
In my experience, the PowerBoost doesn't seem stable when the EN pin is pulled high externally like this. The LEDs oscillate and I personally wouldn't use it in this state.
The only way to know is to build and test it.
Re: [Guide] Graceful shutdown switch without Pololu
cool @ that link. That does look very similar to my idea, even down to the resistor values. But they did not use a transistor at all, which means they're feeding VBAT directly into a GPIO pin while the button is depressed. Is that ok? vbat can potentially reach 5volts (with usb connected and battery disconnected).
Can you elaborate on what you mean about the powerboost not being stable when en is pulled high? And what LEDs oscillate?
Can you elaborate on what you mean about the powerboost not being stable when en is pulled high? And what LEDs oscillate?
- 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
@tescorg It's not a good idea to have any GPIO pins sitting at 5v. I investigated most, if not all of these solutions when I was struggling with this problem. I can't remember the specifics of them all, but I rejected them for various reasons.
I think the charging and low batt LEDs were the ones flickering away. Using the circuit in that link I posted, if you held down the momentary switch you'd get the same effect. It's not an issue with a momentary switch, but the DMG-01 doesn't have a momentary switch.
I think the charging and low batt LEDs were the ones flickering away. Using the circuit in that link I posted, if you held down the momentary switch you'd get the same effect. It's not an issue with a momentary switch, but the DMG-01 doesn't have a momentary switch.
Re: [Guide] Graceful shutdown switch without Pololu
So with the confidence that I wasn't going to fry anything with my circuit I went ahead and built a mockup on a breadboard and tested my circuit. It seemed to work perfectly fine. I did not notice any LEDs blinking, the charge LED stayed on steady while charging, and stayed off steady when not charging.
I will go ahead with this circuit in my project and hopefully I don't have any issues in the future.
Thanks Camble.
I will go ahead with this circuit in my project and hopefully I don't have any issues in the future.
Thanks Camble.
- 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
@tescorg That's great! I had tried a few enhancement mode MOSFETs when I was building the circuit, but at the time my knowledge of semiconductors was limited.
With all the problems sourcing working JFETs, using a BJT may be a more reliable alternative.
One more thing. You may notice that the EN pin sits between VBAT and GND. This is so you can use a 3 pin switch to pull EN up/down. So using a BJT on VBAT is perfectly viable.
With all the problems sourcing working JFETs, using a BJT may be a more reliable alternative.
One more thing. You may notice that the EN pin sits between VBAT and GND. This is so you can use a 3 pin switch to pull EN up/down. So using a BJT on VBAT is perfectly viable.
- bigrich424
- Posts: 16
- Joined: Thu Oct 27, 2016 10:06 pm
- Has thanked: 7 times
- Been thanked: 6 times
Re: [Guide] Graceful shutdown switch without Pololu
Following.
"Unix gives you just enough rope to hang yourself -- and then a couple
of more feet, just to be sure."
of more feet, just to be sure."
Re: [Guide] Graceful shutdown switch without Pololu
@camble: Can I get a command to remove the shutdown script from startup? I need to do things to the SD card through a separate raspberry pi 2 and the script is shutting it down since the hardware isn't there.
Re: [Guide] Graceful shutdown switch without Pololu
At the command prompt type, crontab -e, then comment out the line that starts the script by typing a # in front of it. Save with control X and then reboot. Reverse this to start script again.Ganreizu wrote:@camble: Can I get a command to remove the shutdown script from startup? I need to do things to the SD card through a separate raspberry pi 2 and the script is shutting it down since the hardware isn't there.
Last edited by HoolyHoo on Wed Nov 16, 2016 6:30 am, edited 1 time in total.
Re: [Guide] Graceful shutdown switch without Pololu
Hmm so i go into the file and there's nothing that isn't uncommented. No reference to the shutdown script at all. It just has a bunch of instructions that I assume was always in the file, all lines with # already.HoolyHoo wrote:At the command prompt type, sudo crontab -e, then comment out the line that starts the script by typing a # in front of it. Save with control X and then reboot. Reverse this to start script again.
Re: [Guide] Graceful shutdown switch without Pololu
Well that's strange. I assume you added the start up script with cambles install command correct?Ganreizu wrote:Hmm so i go into the file and there's nothing that isn't uncommented. No reference to the shutdown script at all. It just has a bunch of instructions that I assume was always in the file, all lines with # already.HoolyHoo wrote:At the command prompt type, sudo crontab -e, then comment out the line that starts the script by typing a # in front of it. Save with control X and then reboot. Reverse this to start script again.
IMG_2010.PNG
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.
Who is online
Users browsing this forum: No registered users and 1 guest