[SOLVED] POWERBOOST switch + hotswap on custom PCB

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

[SOLVED] POWERBOOST switch + hotswap on custom PCB

Post by AKstudios »

A very quick question regarding the PowerBoost:

My setup has a LiPo battery connected to the PowerBoost 1000, but the main power is via the USB out from the PowerBoost. The circuit will be plugged in most of the time and the battery is only used as a hotswap backup when USB is disconnected. I plan to incorporate a switch and use it turn the whole project off or on when it is running on battery power.

Should I be switching the GND (or positive terminal) of the battery before it connects to the PowerBoost by using one of these: https://www.adafruit.com/product/1863? Or should I connect the switch to the EN pin of the PowerBoost and switch that to GND to disconnect the battery from the rest of the circuit? Would it be fully disconnected when EN pin is grounded or will the circuit still draw some uAs?

Would they perform the same function or is one more elegant/safe than the other?
Last edited by AKstudios on Tue May 23, 2017 1:30 am, edited 1 time in total.

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

Re: POWERBOOST switch

Post by adafruit_support_mike »

Using the EN pin is the standard way to shut off a PowerBoost.

It doesn't completely disconnect the LiPo, but it shuts down the boost converter which is almost the same thing. The output on the USB jack goes to 0v. There is still some minor current load.

If you want to physically disconnect the LiPo when shutting down, it's best to put the switch in the positive wire between the LiPo and the PowerBoost. Leaving GND connected at all times and switching the positive supply is standard for safety reasons.. if you disconnect GND there's a chance that accidental contact can create another path to GND. That isn't really a big deal in 5v circuits, but is important when you start working with wall voltage, and it's best to use the same standard everywhere.

User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: POWERBOOST switch

Post by AKstudios »

Thanks Mike. My circuit has a 3.3V regulator, so I'm wondering how the regulator input should be connected without causing problems. At the moment, current from the USB pin is going straight to the regulator which is converting it to 3.3V. Now when I disconnect the USB, I want the 5V output from the PowerBoost to go to the regulator instead and keep the circuit running. If I have the 5V boosted output pin and the USB pin both connected together (but only one will be active at one time, from what I understand about the PowerBoost), will there be any issues? Or should I be grabbing power from the VS pin instead?

TLDR: what's the proper way of powering a voltage regulator in a circuit that is meant to receive power from USB, and in the event of power loss, from the PowerBoost instead?

Edit: Perhaps I can grab 3.7V directly from the LiPo and feed that into the 3.3V regulator. That way I'm not boosting and then stepping-down to 3.3V. But there's still the problem that the VIN of the regulator would be shared with VBUS so it should work when USB is connected and should also work when disconnected and power source is switched over to the LiPo. I'm not sure what sharing VBUS and VLIPO would do in this case. Perhaps a diode on both?

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

Re: POWERBOOST switch

Post by adafruit_support_mike »

Connect the LiPo to the voltage regulator through a Schottky diode:
dual-power.jpg
dual-power.jpg (16.49 KiB) Viewed 521 times
When 5v is connected, it will reverse-bias the diode, cutting off the LiPo. When the 5v supply is disconnected, the voltage going to the regulator will fall far enough for the diode to be forward biased, and power from the LiPo will take over.

That's how we handle 5v/LiPo power on the Feather boards.

Technically you can use any kind of diode, but a Schottky has the lowest forward voltage. That gives the 3.3v regulator more headroom between the input and output voltages.

User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: POWERBOOST switch

Post by AKstudios »

Thanks, that makes sense. What about current from LiPo going back into the 5V line? The Adafruit feather boards are so meticulously designed; I'm going to buy some for some projects around the house. You guys do great and innovative work, keep it up!

I'm sharing my board and schematic files for my project with this setup (GitHub). It is essentially a temperature, relative humidity (SHT31) and carbon dioxide (K-30) data logger that logs data on a microSD card at predefined logging intervals (interrupts via a DS3234 RTC). The original circuit had just this setup, now I wanted to add a switch, a PowerBoost + charging circuit so the logger can work on battery for a while in the event of a power loss. I've tested a similar setup using the breakouts from Adafruit, now working to incorporate it into my own PCB board with your help of course.

The two main things to check: 1. is the switch at the LiPo correctly placed and routed? (I added a jumper just in case the switch fails) 2. what about the diode at the regulator's VIN?
Last edited by AKstudios on Fri Jun 09, 2017 5:27 am, edited 1 time in total.

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

Re: POWERBOOST switch

Post by adafruit_support_mike »

AKstudios wrote:Thanks, that makes sense. What about current from LiPo going back into the 5V line?
That can't happen with 3.3v to 4.2v on the LiPo and 5v on the USB cable. The diode will be reverse-biased.
AKstudios wrote:The two main things to check: 1. is the switch at the LiPo correctly placed and routed? (I added a jumper just in case the switch fails) 2. what about the diode at the regulator's VIN?
Those both look good.

User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: POWERBOOST switch

Post by AKstudios »

Thanks for your support Mike, really appreciate it!

User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: POWERBOOST switch

Post by AKstudios »

adafruit_support_mike wrote:Connect the LiPo to the voltage regulator through a Schottky diode:
dual-power.jpg
When 5v is connected, it will reverse-bias the diode, cutting off the LiPo. When the 5v supply is disconnected, the voltage going to the regulator will fall far enough for the diode to be forward biased, and power from the LiPo will take over.

That's how we handle 5v/LiPo power on the Feather boards.

Technically you can use any kind of diode, but a Schottky has the lowest forward voltage. That gives the 3.3v regulator more headroom between the input and output voltages.

Just two follow-up questions regarding this:

1. Would reverse current leakage going back through the diode to the battery affect it in any way?

2. If I replace the LiPo battery with 2 AA batteries (3V total) instead, can I still use the same circuit to cut off the batteries when 5V USB power is present? I'm assuming even with some minor voltage drop, the PowerBoost should be able to squeeze most of the power out of regular alkaline batteries before the total voltage falls under 1.8V. Same question from above as well - can reverse current through a schottky diode damage AA batteries over the long run?

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

Re: POWERBOOST switch

Post by adafruit_support_mike »

AKstudios wrote:1. Would reverse current leakage going back through the diode to the battery affect it in any way?
No. The few microamps that leak through the diode will only charge the LiPo slightly.
AKstudios wrote:2. If I replace the LiPo battery with 2 AA batteries (3V total) instead, can I still use the same circuit to cut off the batteries when 5V USB power is present?
The PowerBoost isn't designed to work with AA cells. They can't provide the instantaneous current the boost converter needs.

For other circuits that could run from AAs and an external 5v source, the cutoff diode would work equally well, and the small reverse leakage current wouldn't hurt the AA cells.

User avatar
AKstudios
 
Posts: 79
Joined: Fri Jun 27, 2014 10:09 pm

Re: [SOLVED] POWERBOOST switch + hotswap on custom PCB

Post by AKstudios »

That's interesting -- the datasheet of the boost converter specifies that it can be used with alkaline cells on page 1:
The TPS6109x devices provide a power supply solution for products powered by either a one-cell LiIon or Li-Polymer, or a two-cell alkaline, NiCd or NiMH battery and required supply currents up to or higher than 1 A.
and on page 14:
Additionally, two or three primary and secondary alkaline battery cells can be the power source in systems where the TPS6109x is used.
Are they referring to some other type of cells and not the typical alkaline AA cells? It would be very convenient to have a cheaper source of power for projects apart from the reliable but expensive LiPo batteries.

I've tried using it with just two alkaline D batteries and it worked well for loads around 250-300mA, so I assumed it would work with AA or even AAA batteries as well. I read somewhere that internal resistance of cells is also a factor that decides how effective a boost converter is.

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

Re: [SOLVED] POWERBOOST switch + hotswap on custom PCB

Post by adafruit_support_mike »

Hmm.. our experience with alkalines has been marginal, but you're welcome to give them a try.

Only try them with a PowerBoost 500/1000 Basic though. The LiPo chargers on the 500C and 1000C definitely won't work with alkalines.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”