# 5v and 3.3v from 2xAA and/or USB

I'm working on a project that requires both 5v and 3.3v rails. It will usually be powered from 2xAA batteries, but the user will occasionally use USB to set parameters and perform firmware updates. I want the circuit to be powered from USB when USB is attached and from 2xAA when USB is not attached. Total current draw will be < 250ma at all times. I've come up with this circuit:

The MAX1797 will boost the battery voltage to 5V. The MAX1837 will convert the 5V to 3.3V. The MAX1797 will accept input voltages from 1 to 5.5v. The voltage drop across the SS2 diodes should be < .5v with the planned current draw. This will give around ~4.5v on the input of the 1797 when powered from VBUS and around ~2v when powered from the batteries. Is it appropriate to use schottky diodes this way? Would using a MOSFET switch be a better solution? Also the Maxim devices are quite expensive!! Are there less expensive devices that will do the job?

update:

After much thought and research and after implementing the suggestions above this is where I am.

Please understand that I'm a noob at this sort of thing. I may be totally wrong. But here is my thinking:

During normal operation, without USB, current should flow through the P-MOSFET and power the circuit. The voltage divider on LBI sets a shutdown voltage of ~1.6V. When the voltage on LBI is above 1.6v, LBO is open-drain and sinks current to ground, holding SHDN low. When the voltage drops below 1.6v, LBO goes high impedance and SHDN goes high. This shuts down the MAX1797. When USB is attached, the MOSFET disconnects the battery causing the voltage at LBI to go to zero and causing SHDN to go high. During shutdown, OUT becomes a high impedance node allowing VBUS to be connected directly to the 5v rail without fear of 'back pressure' on the 1797.

I changed the output capacitor to 10µF to help reduce the inrush current from VBUS. Is 10µF low enough? Is it sufficient for a 250ma load?

A few more questions:

Do I have the MOSFET orientation correct? I'm not completely clear on the body diode. What would be a good choice for this device? Do I need a current limiting resistor on the gate?

Will this work?

• Why not use 2 regulators that both source from the battery? Its inefficient to go from Battery -> regulated 5V -> regulated 3.3V vs Battery -> regulated 3.3V You can also get dual rail/output power ICs that can supply 5V and 3.3V. Not sure if that would be any cheaper but it could reduce cost/PCB footprint/component count. – Michael Choi Oct 23 '15 at 18:26
• I considered using 2 regs. But the efficiency of this circuit is surprisingly high ( > 90% per Maxim). I looked at the dual output IC's but couldn't find one with comparable specs. Perhaps I didn't look hard enough. – w4smt Oct 23 '15 at 18:40
• It's fine to use diodes like this, if you can live with the voltage drop. You may be asked to use two components to prevent inadvertent charging of the batteries in case of a single failure. Linear Tech and TI are people who might have a wider range of cheaper PSU parts than Maxim. – user1844 Oct 23 '15 at 18:43
• I would not put 47 uF on USB. The inrush current will pull down the USB rail. I would replace the diode in series with the batteries with a FET. (PMOS, with drain connected to USB, and body diode oriented same direction as current Schottky). Look at TI, onsemi, linear technologies, national semiconcductor for alternates. Ideally, you should have some kind of low voltage cutoff below 1.8 V or so. Might want a fuse in series with the batteries. – mkeith Oct 23 '15 at 18:46
• @mkeith has a good point about the inrush current to comply with the USB spec. But for personal projects I've put 47+uF caps that I had lying around in parallel w/ USB with no ill effect. Obviously some circuits may be more sensitive to that. That MAX1797 seems to have a programmable low voltage battery shutdown. – Michael Choi Oct 23 '15 at 19:06