PowerBoost 1000c "trigger" power on?

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
CCurvin
 
Posts: 2
Joined: Fri Sep 23, 2016 3:56 pm

PowerBoost 1000c "trigger" power on?

Post by CCurvin »

Hi!

I'm using the Adafruit PB 1000c ( https://learn.adafruit.com/adafruit-pow ... st/pinouts ) to power my Raspberry Pi. The 1000c has a battery attached and is used as a UPS. When power is running to the 1000c, it both charges the battery and powers the Pi. When main power (Micro USB input) is cut to the 1000c, the battery continues to power the Pi. When battery power gets low to a certain threshold, the LBO pin on the 1000c sends a signal to pin 4 on my Pi and I wrote a Python script that then safely powers down the Pi using 'shutdown -h now'.

I've read several articles/posts/forums that suggest I can power the Pi back on by shorting pins 5 and 6. By "shorting" I read that to mean I can connect up a momentary switch with the 2 connectors coming out of that switch connected to pins 5 and 6 on the Pi, then when I press that button on the momentary switch, it "shorts" those pins and starts the Pi booting up. Pretty sweet!

However... I'm wondering if there is a way to short these pins without me pushing a button and having it "automatically" short when the main power to the PB 1000c is resumed without me having to be there or push a button. There is a pin on the 1000c that gets 5V when the MicroUSB connector on it has main power applied to it, so I am hoping to use it as the "trigger", but I'm unsure how to set it up to work without me manually making it happen.

Any thoughts, ideas or suggestions are welcome!
Thanks!
-Chad

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PowerBoost 1000c "trigger" power on?

Post by adafruit_support_mike »

This should do it:
switch.jpg
switch.jpg (14.28 KiB) Viewed 394 times
If we assume that the points labeled 5v, A, and B are all at 0v, the N-mosfet will be shut off and any charge stored in the capacitor will drain through the resistor in parallel with it.

If the 5v line is reconnected, it sends the left end of the capacitor high and pulls the right end with it. For at least a short time, you'll get a 5v pulse at the mosfet's gate, turning it on. When the mosfet is on, it essentially shorts points A and B together.

The voltage at the mosfet's gate will drop as the right end of the capacitor drains toward GND, eventually falling low enough to shut the mosfet off. From that state, the circuit can't re-trigger until the 5v line goes low and allows the capacitor to drain again.

User avatar
CCurvin
 
Posts: 2
Joined: Fri Sep 23, 2016 3:56 pm

Re: PowerBoost 1000c "trigger" power on?

Post by CCurvin »

That's perfect, thank you very much!!

User avatar
davekofo
 
Posts: 4
Joined: Fri Feb 17, 2017 2:46 am

Re: PowerBoost 1000c "trigger" power on?

Post by davekofo »

Dear Mike and CCurvin,

This is precisely what I wish to do also and have been trying to figure out for a while; I am very much a noob and would deeply appreciate if either of you might share with me exactly what components I would need (resistor values, capacitance, etc.) as I would love to try this out.

The Powerboost is a brilliant product by the way!

Cheers

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PowerBoost 1000c "trigger" power on?

Post by adafruit_support_mike »

The two horizontal resistors should have high values.. 1M would work.

The vertical resistor needs to be smaller so the cap will drain far enough for the mosfet to turn off. 100k would be good there.

The cap needs to be large enough that it will hold the mosfet open long enough to boot the RasPi, while still draining through the vertical resistor. Something between 1uF and 10uF should work.

User avatar
davekofo
 
Posts: 4
Joined: Fri Feb 17, 2017 2:46 am

Re: PowerBoost 1000c "trigger" power on?

Post by davekofo »

Thank you so much for your help Mike, I really appreciate it. I have built the circuit but having trouble still, got a mate looking at it with me tomorrow who knows his stuff so will post my progress once done.

Ccurvin I would love it if you would share that script you wrote please.

Thanks again

User avatar
davekofo
 
Posts: 4
Joined: Fri Feb 17, 2017 2:46 am

Re: PowerBoost 1000c "trigger" power on?

Post by davekofo »

That worked like a charm! Had me stumped for a while for a couple of reasons which I will jot down for utter noobs like myself:
1. The mosfet is an N channel mosfet, I used a BUZ71
2. You wouldn't think it but the polarity of the A and B pins makes a difference

Get them the wrong way around and your circuit won't work; the right way around and you don't need the ground pin (on the pi) at all, works fine without it.

Thanks for all your help gents, really appreciate it.
Attachments
mosfet-pin-11.jpg
mosfet-pin-11.jpg (24.97 KiB) Viewed 283 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PowerBoost 1000c "trigger" power on?

Post by adafruit_support_mike »

Yeah, the polarity of a mosfet does matter.

A mosfet's gate is isolated from the channel which connects the drain and source by a thin layer of glass.. only a few atoms thick in most cases. The voltage from static electricity can blow a hole through the insulation, leaving you with a device that never really turns off. These days almost all discrete mosfets have built-in diodes to protect against that. The diode is connected so it's reverse-biased under normal operation, but will conduct in the event of a random shock before the gate insulation can blow.

If you connect a mosfet with its drain and source reversed, the diode will be forward-biased, and will conduct as soon as you put more than about 0.5v across it.

User avatar
davekofo
 
Posts: 4
Joined: Fri Feb 17, 2017 2:46 am

Re: PowerBoost 1000c "trigger" power on?

Post by davekofo »

Hi Mike,

Testing the circuit with only the battery connected to the 1000c worked perfectly, however when I connected my power supply to the 1000c as well as the circuit, it no longer turned on the pi. I then tested the circuit without the wall wart power going to the 1000c and as I was plugging in the plug, I realized it was switching on the Pi when only the ground from my charger was touching... So in summary

1. the circuit powers on the Pi as expected when the AC power pack is only connected to the circuit, and not the 1000c
2. the circuit does not switch on the pi when connected to the 1000c also
3. the circuit when connected only to the pi switches on the pi with just the ground pin from the wall wart making contact

I could share my suspicions but I think they are fairly obvious. Any ideas?

Thanks again for your incredibly helpful advice Mike!!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: PowerBoost 1000c "trigger" power on?

Post by adafruit_support_mike »

Post a photo showing your hardware and connections and we'll take a look. It sounds like you have a missing ground connection somewhere.

800x600 images usually work best.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”