Pages: [1]   Go Down
Author Topic: Circuit review / advice - power switching  (Read 3950 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 2
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello! Long time listener, first time caller...

I am transitioning a project from a workbench prototype to a self-contained, enclosed unit powered by a Li-Po battery. I intend to use Sparkfun's basic LiPo charger (LiPo Charger Basic, #PRT-10217, http://www.sparkfun.com/products/ 10217) to avoid burning things down in the house.  I'd like to be able to run the unit from the USB supply while the battery is charging and have it seamlessly transition to battery when USB power is removed.

Because of the peculiarities of LiPo batteries, I presume that I can't just tap into the battery leads. The current draw from the unit would confuse the charger and cause problems with the cell. The current draw is not insubstantial for a microcontroller project --it will power three Atmega328 chips (a DIY dual core Arduino and a Sparkfun OpenLog board), a GPS receiver, and a backlit LCD display.

After browsing the boards, the broader internet, and various datasheets, I came up with the attached circuit. It seems to simulate well on the online, Java-based circuit simulator (www.falstad.com/circuit), but I've had issues with that simulator in the past. So I figured I'd tap into the collective braintrust that is Arduino. The thinking behind the design is that when USB power is present, USB powers the Arduinos directly, the MOSFET is off, which isolates the battery from the Arduinos and lets the charger do its thing.  When USB power is removed, the MOSFET gate is pulled low by the pulldown resistor, which turns on the MOSFET and allows the battery to send current through the MOSFET into a step-up IC which steps it up to 5V and powers the Arduinos and the rest of my board(s).

Will this work?  Does anyone have any ideas to make it work better and/or to simplify the circuit? Do I need all the diodes? In my mind, I do, but then again I'm a relative novice (or at least very rusty), especially when it comes to analog circuits.  (Note: the diode between the battery and MOSFET is there because the simulator showed a tiny reverse current flowing through the MOSFET when USB power was present...something like 5-10 nanoamps, but I wouldn't want to confuse the LiPoly charger IC).

*Note -the area surrounded by the green box in the schematic is the original Sparkfun component, which remains unmodified except for tapping into the USB power bus.  My questions pertain to the elements to the right of the box.

*Note2 - modified to correct some glaring mistakes in the circuit.

« Last Edit: January 12, 2011, 07:48:52 pm by cactusjack » Logged

Atlanta
Offline Offline
Sr. Member
****
Karma: 1
Posts: 254
Arduino still rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll have a go at this...  

Dont think a few nA will terribly upset the charger, so you can probably delete that diode.  Measure the leakage in actual hardware to make sure the current is really that low.

The reason for pickin on diodes is the forward drop is gonna hurt ya.  For one, a diode drop is a significant amount of waste is such a low voltage circuit.  But the upconverter takes care of that in the battery branch.  Its not taken care of atall in the VBUS to Arduino branch, where you could have a more serious regulation problem.

You might try to run all loads straight off the step up converter, an use just the top diode and mosfet alone to feed its input.



Ya might choose a buck-boost topology for the step-up since you will be close to out=in condition.

Just my $0.02, YMMV
Logged

Atlanta
Offline Offline
Sr. Member
****
Karma: 1
Posts: 254
Arduino still rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

btw check this application report from Texas instruments

http://focus.ti.com/lit/an/slva139/slva139.pdf
Logged

0
Offline Offline
Newbie
*
Karma: 2
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for taking a look and helping out!  I had forgotten how costly diodes are -- and even though I typically use Schottky diodes for low potential circuits such as this one, their forward drop is also not quite negligible.  (This is part of a disturbing pattern with my electronics work -- the apparent simplicity of digital circuits sometimes makes me get sloppy on the analog stuff, and tracing errors in complicated circuits is not fun.)

Your revision seems sound, is less complex than my original circuit, and will result in more regulated power.  Thanks again!

For the time being, I am using a step up IC breakout made by Sparkfun.  I have pulled many hairs out trying to tune switching regulator circuits, and though I finally got one I'm happy with (I reinvented the wheel before finding that adafruit had done the hard work for all of us with the mintyboost and its very helpful step-by-step write-up, including the decisionmaking process involved with selecting each component), space limitations imposed by this build dictate something smaller.  The final iteration of the prototype will need to accept both 5 volts from USB or a nominal 12 volts (but really 8.6-15 volts with nasty transients) from a car, so I'm not sweating the final design of the voltage regulation aspect of the circuit just yet.  But it's good to have this path management issue figured out -- if it works in testing, it shouldn't change very much regardless of the actual Vin that's ultimately used -- dirty power will have to be cleaned and regulated and at the same stepped down to 5v.  

Logged

Roanoke, VA
Offline Offline
Jr. Member
**
Karma: 6
Posts: 66
Creating order out of chaos!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is really interesting (and helpful) stuff! I am doing something very similar, except my board is running at 3.3v directly. I'm also trying to power it with a single cell 900 mAh lipo battery, and I have the basic charger from SparkFun. I can power my device directly using the lipo battery (I've tested this), and I can power it directly with a USB connection as well. The current board is actually the Teensy++ with a 3.3v mod soldered on, but I also have a couple of Arduinos for testing as well.

How much different would the circuit be in this case? Everything is the same except no step-up IC to 5V? And, is the circuit shown in your first post the one you ended up going with, or has it undergone further modifications? (e.g. taking out the diode on the MOSFET, etc.)

    Jeff
Logged

Atlanta
Offline Offline
Sr. Member
****
Karma: 1
Posts: 254
Arduino still rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You said a mouthful cactusjack,
Quote
(but really 8.6-15 volts with nasty transients)
The spec costs $65 http://standards.sae.org/j1113/11_200706/ but this whitepaper
http://www.advantech.com.tw/epc/newsletter/Whitepaper/InVehicle_Power_Control_Mechanism_and_Power_Design_Criterion.pdf and this test set brochure http://www.noiseken.com/english/equip/img/ISS7600E.pdf kinda outline what kinda "nasty transients" yer up against.

Jeff Rowberg I believe you can use the TI trick to have a FET be a low drop diode and use it for as many inputs as you wish.  There are many "ideal diode" active circuits around too, google "power management ideal diode".  In the case cactusjack has got a "free" switch, when the USB is unplugged the charger is automatically dead.  If this applies to your situation then fine.  

Otherwise your charger may try to charge the battery while the load is draining it.  Many chargers get confused and abuse the battery when that happens.
Logged

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just an opinion but specs should be free.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Atlanta
Offline Offline
Sr. Member
****
Karma: 1
Posts: 254
Arduino still rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, @smeezekitty its a racket.  

Our industry needs a technical standards.
We form a geek club to write standards.
Our industry likes our standards, adopts them.
Our geek club charges $$$ for standards and $$$ for membership.
Other companies join the club to get a discounted price.
The standards become legally mandatory.
Our geek club triples its prices and holds annual symposia in tropical locations..
Logged

Pages: [1]   Go Up
Jump to: