Author Topic: Battery/External power supply automatic switch circuit  (Read 11013 times)

0 Members and 1 Guest are viewing this topic.

Offline FinndersenTopic starter

  • Newbie
  • Posts: 6
Battery/External power supply automatic switch circuit
« on: April 14, 2016, 02:08:36 pm »
Hi,
I'm making a portable Rpi 3 project that will be battery operated but switch over to external supply and charge battery when connected.

I'm planning on using a USB power bank thing which has a 5V charging input and 5V USB power output, with in-built battery charging circuit etc.

I just need a circuit which effectively switches Rpi and external power source from battery output to charge input when external plug is connected.

I've got this P-channel MOSFET/diode circuit which would work great, except for the diode voltage drop, since USB power/battery output is 5V and Rpi needs 5V (sorry for horrific sketches):


I can also use a DC jack which has a switch to disconnect battery output when plug connected, however the battery ends up being connected to itself normally and would just drain to death...


I would like to avoid multiple input power ports/manual switches etc. It would also need to supply at least 2A. Surely there's a way to make this work without diode voltage drops?

Thanks for any help
« Last Edit: April 14, 2016, 02:15:13 pm by Finndersen »
 

Offline Wobbegong

  • Newbie
  • Posts: 8
  • Country: us
Re: Battery/External power supply automatic switch circuit
« Reply #1 on: April 14, 2016, 07:55:44 pm »
http://www.linear.com/product/LTC4413

That thing is probably your best bet so that way you can prioritize the actual USB input.
Here is the logic:

USB to INB, ENBA
Battery to INA

When only the battery is connected, USB is low by the internal pull-down so INA is enabled
When USB is connnected, the USB voltage drives ENBA high which disables INA, and INB is always enabled by virtue of the internal pull-down on ENBB.

That said, it looks like the only reason the Rasperry Pi needs 5V is because the supervisor chip they picked has a reset threshold of 4.63V so if you found a diode that dropped less than 0.37V at the max current and min temperature you wanted to operate at, or you changed the supervisor one with a lower threshold (or removed it altogether), then your original idea might work fine.

- Steve
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13125
Re: Battery/External power supply automatic switch circuit
« Reply #2 on: April 14, 2016, 08:51:03 pm »
http://www.linear.com/product/LTC4415 might be a better choice.  Its a bit beefier (4A max) so if your Pi 3 has a lot of USB devices plugged into it or any expansion hats, it would be a better choice.  Its also available in a 0.5mm pitch MSOP-16 package that can be hand soldered far more easily than a 3mm square leadless DFN-10 package.  If you don't have a hot air station or reflow oven, you'll  need a pair of 1.6mm PTH holes under it so you can reflow the thermal pad with a heavy duty ordinary iron.
« Last Edit: April 14, 2016, 11:37:33 pm by Ian.M »
 

Offline FinndersenTopic starter

  • Newbie
  • Posts: 6
Re: Battery/External power supply automatic switch circuit
« Reply #3 on: April 14, 2016, 11:28:21 pm »
Ok cool thanks so that basically just has ideal diodes in it (no voltage drop).

Why did nothing like that come up when I Google power source switcher circuit etc haha

Do you think there's some kind of breakout or module with this kind of chip? looks like a pain to connect manually since its so small
Also where can I buy this or something equivalent for cheap... its $50 minimum shipping from the Linear site to Aus for something the size of a fingernail????

Edit: found a good source: https://au.rs-online.com
I'll let you know how it goes!
« Last Edit: April 15, 2016, 01:34:34 am by Finndersen »
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9238
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Battery/External power supply automatic switch circuit
« Reply #4 on: April 15, 2016, 03:06:24 am »
The Pi 3 has a built in "ideal diode". Most USB battery packs are also fine with having an external 5v supply biasing the output.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline FinndersenTopic starter

  • Newbie
  • Posts: 6
Re: Battery/External power supply automatic switch circuit
« Reply #5 on: April 15, 2016, 03:19:16 am »
The diode will be internal right, so the battery will still be connected back to the mosfet on the outside(which is why the diode is there)

Since the battery pack will take in usb power  5v+-0.2v or something, same as it outputs, I think it would discharge itself with losses?
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9238
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Battery/External power supply automatic switch circuit
« Reply #6 on: April 15, 2016, 05:36:24 am »
The 5v pins on the header are after the diode.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf