5
\$\begingroup\$

Following an earlier question about how to switch between battery and USB power,

I would love to implement the TC2014 LDO as suggested by Russell McMahon.

That way I could switch between 4AA batteries (1.2V*4 or 1.5V*4) and USB power. The battery voltage would nicely be regulated to 5V too. And the idea was to use the shutdown pin of the chip IF USB power is detected. The device also has to work when no batteries are present.

I am not too experienced with this, but I thought to connect the 5V from the USB to the SHUTDOWN pin from the LDO chip. Pitywise, the pin function is inverted, if SHUTDOWN is low, Vout from the LDO chip is low. I am now considering using an XOR gate to make the thing work:

schematic

simulate this circuit – Schematic created using CircuitLab

I would love to limit the amount of components, but the number of diodes is already high, and the whole thing feels a bit crafted

My questions:

  • Is there a better suitable chip (with an inverted shutdown pin)
  • is there a better circuit (without voltage drop) to get this (I would prefer to get rid of D1, but then, the XOR has no desired operation)
\$\endgroup\$
  • 1
    \$\begingroup\$ The text editor here has a circuit diagram editor you can access by pressing Ctrl+M \$\endgroup\$ – RedGrittyBrick Jan 10 '14 at 22:41
  • \$\begingroup\$ THX Brick for mentioning! \$\endgroup\$ – lode Jan 10 '14 at 23:10
13
\$\begingroup\$

How about using an alternative circuit like this:

circuit

Q4 is a P-mosfet, kept off when there is a voltage in the main supply (USB in this case). When the main supply is disconnected the gate is pulled down and the mosfet conducts and provides output from the battery source.

The diodes are Schottky type for low Vf and the mosfet should apparently be selected to have a low Vgs-th to turn fully on with the battery voltage level.

\$\endgroup\$
  • \$\begingroup\$ In this circuit, I guess Q4 plays no useful role, you could omit it altogether. The two Schottky diodes would do the job alone. -- Okay, I read the previous post, so the OP fears the battery voltage could be higher than 5V, so then Q4 would have real function. \$\endgroup\$ – Laszlo Valko Jan 10 '14 at 23:47
  • 2
    \$\begingroup\$ @LaszloValko In this circuit, I guess Q4 plays no useful role His battery level can be higher than the USB voltage so the two diodes alone will not cutoff the battery as source when the USB is connected. Also if the battery and USB have similar voltage levels the output current would be shared instead of supplied just from the USB. \$\endgroup\$ – alexan_e Jan 11 '14 at 0:03
  • 1
    \$\begingroup\$ Thank you very much! Yes, indeed, not opting for for the solution with Schottky diodes was exactly because power is shared instead of switched! The solution looks very simple and elegant (at least compared to my schematic :) ), I love it! \$\endgroup\$ – lode Jan 13 '14 at 19:41

protected by Dave Tweed Jan 10 '18 at 12:12

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.