Tackling Graceful Shutdowns on the GBZ

Various user-contributed guides for software-related things
User avatar
dirtybeagles
Posts: 386
Joined: Thu May 05, 2016 6:04 am
Has thanked: 34 times
Been thanked: 64 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by dirtybeagles » Tue May 31, 2016 12:45 pm

Popcorn wrote:You are right. This probably belongs in the guides section now that it's complete. The only question is which guide section? hardware or software? :)

I would suggest hardware.

Is there an option to just run a script to just display the low battery if you don't have the hardware? If so I would put that in software and just note you could combine both.

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Ganreizu » Wed Jun 01, 2016 12:52 pm

[mention]Popcorn[/mention] Can you explain and/or post pics of how to make the part of the switch with the resistor? You use a breadboard like in part 4 of the guide and put the resistor and what else on it? Can we combine this board with the power board from part 4?

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Wed Jun 01, 2016 7:57 pm

I soldered mine directly on my PI. I would take a photo of it but wrapped it in heat shrink so it would be a very uninteresting photo. Also, I dont think it makes sense to put it on that power strip because its quite far away from the pi which is where it's going to be going

It's pretty simple though.

Take a wire and solder it onto the Low Battery LED on the Powerboost.

Image

Attach the other end of the wire to a 47K resistor.

Attach the other end of the 47k resistor to the base of the transistor (the middle pin).

Now if you have the flat side of the transistor facing towards to you, the collector is on the left and the emitter is on the right. Attach the collector on the left to the GND pin on the Pi and the emitter on the right to GPIO17

That should be it.

Follow my the wiring diagram when in doubt.

User avatar
Bubble
Posts: 35
Joined: Sun May 08, 2016 7:33 am
Has thanked: 7 times
Been thanked: 4 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Bubble » Thu Jun 02, 2016 5:50 am

I've put the transistor and the resistor on a breadboard, but I have room to waste on my build ^^
Image
Sorry for the poor quality picture, wich was extracted from a video.

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

Re: Tackling Graceful Shutdowns on the GBZ

Post by SidSilver » Fri Jun 03, 2016 5:53 am

Pardon me if the question has already been asked but, with this wiring, the powerboost is always "On".
Is it ok like that ? Won't it discharge the battery slowly or lower the lifetime of the powerboost ?

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

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Fri Jun 03, 2016 6:57 am

SidSilver wrote:Pardon me if the question has already been asked but, with this wiring, the powerboost is always "On".
Is it ok like that ? Won't it discharge the battery slowly or lower the lifetime of the powerboost ?
The point of this setup is so that the power supply is off when the Pi shuts down.

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

Re: Tackling Graceful Shutdowns on the GBZ

Post by SidSilver » Fri Jun 03, 2016 7:07 am

Camble wrote:
SidSilver wrote:Pardon me if the question has already been asked but, with this wiring, the powerboost is always "On".
Is it ok like that ? Won't it discharge the battery slowly or lower the lifetime of the powerboost ?
The point of this setup is so that the power supply is off when the Pi shuts down.
Yes, everything is shut off after the pi shuts down, but the powerboost stays always on (see the blue led)
It would be better if everything including the powerboost were shut off.

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Ganreizu » Fri Jun 03, 2016 7:37 am

Popcorn wrote:I soldered mine directly on my PI. I would take a photo of it but wrapped it in heat shrink so it would be a very uninteresting photo. Also, I dont think it makes sense to put it on that power strip because its quite far away from the pi which is where it's going to be going

It's pretty simple though.

Take a wire and solder it onto the Low Battery LED on the Powerboost.

Attach the other end of the wire to a 47K resistor.

Attach the other end of the 47k resistor to the base of the transistor (the middle pin).

Now if you have the flat side of the transistor facing towards to you, the collector is on the left and the emitter is on the right. Attach the collector on the left to the GND pin on the Pi and the emitter on the right to GPIO17

That should be it.

Follow my the wiring diagram when in doubt.
Oh so you don't even need a breadboard or anything. Sounds super simple, thanks for the help. Gotta find that transistor now and i'm all good haha.

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Fri Jun 03, 2016 7:47 am

Ganreizu wrote:
Popcorn wrote:I soldered mine directly on my PI. I would take a photo of it but wrapped it in heat shrink so it would be a very uninteresting photo. Also, I dont think it makes sense to put it on that power strip because its quite far away from the pi which is where it's going to be going

It's pretty simple though.

Take a wire and solder it onto the Low Battery LED on the Powerboost.

Attach the other end of the wire to a 47K resistor.

Attach the other end of the 47k resistor to the base of the transistor (the middle pin).

Now if you have the flat side of the transistor facing towards to you, the collector is on the left and the emitter is on the right. Attach the collector on the left to the GND pin on the Pi and the emitter on the right to GPIO17

That should be it.

Follow my the wiring diagram when in doubt.
Oh so you don't even need a breadboard or anything. Sounds super simple, thanks for the help. Gotta find that transistor now and i'm all good haha.
Nope, exactly. I bent the pins of the transistor to fit the GPIO sockets and soldered everything directly onto my PI. That's what I was using in my prototype that you see in the videos

User avatar
Bubble
Posts: 35
Joined: Sun May 08, 2016 7:33 am
Has thanked: 7 times
Been thanked: 4 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Bubble » Fri Jun 03, 2016 9:27 am

Popcorn wrote:Now if you have the flat side of the transistor facing towards to you, the collector is on the left and the emitter is on the right.
I only see this now, but I thought for 2N3904 it was the opposite ? Emitter on the left & collector on the right.
https://www.sparkfun.com/datasheets/Com ... 2N3904.pdf
This is the way I wired and it seems to be ok.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest