Monday, 4 December 2017

batteries - Switch between 3V battery and 5V USB as power source


I know there are several other threads with similar questions, but my requirements are different. So far I couldn't find a solution even though I read through several of these topics.


My circuit is normally powered with a 3V coin cell battery. I would like the circuit to be powered by USB as soon as a 5V USB power source is connected to my circuit - to save power from the coin cell.


Obviously I was looking at the well known diode-or setup but in my case I cannot use diodes, because even Schottky diodes would have a voltage drop of around 0.3V. Thats too much when running on the coin cell. I cannot accept any voltage drop on the coin cell rail and max. 0.1v drop on the 5V USB rail.


Then I was trying to experiment with a p-channel mosfet, but I'm not sure, if my solution works out in reality. I'm just a maker, not an electronics guy :-( Attached is the schmeatic.


Beside using a power mux ic (which would cause quiescent current), is there any other discrete solution with high energy efficiency I could use?


Thanks! Circuit




Answer



One way of doing it in case you got an op-amp, N-mosfet (or NPN BJT) and P-mosfet laying around is doing something like this:


enter image description here


Here's the link if you want to interact with it.


The scaling is to get the values to safe voltages, not all op-amps can work outside of their voltage supplies, so using a voltage divider will help scale the input to safe intervals. If all the resistors in the voltage dividers would've been 100 kΩ, then the op-amp would have to compare 1.5 V and 1.49 V, this means that any small noise or mismatch of the resistors would incorrectly shut off the 3 V supply. However, using a 80 kΩ resistor instead of a 100 kΩ gives some margin for error, now the op-amp has to compare 1.5 V and 1.33 V. And 1.5 V and 2.22 V when the 5 V is connected.


All in all it's just an op-amp acting as a comparator turning off the 3 V supply, if you are feeding with anything above 3.4 V (because of the 80 kΩ resistor) then the 3 V supply gets shut off, otherwise the 3 V will supply. This mean that if you connect, say, ground or any other voltage that is lower than 3 V to where the 5 V should go, then you got yourself a transistor that will make some magic smoke.


In case you've not noticed it yet, the P-mosfet is upside down, and that is on purpose. If you do choose to make this circuit, make sure you connect the drain and source correctly. The diode in parallel with the P-mosfet is not an actual component, it is the body diode which is a part of the P-mosfet.


The load, which is a resistor in this case, can contain the op-amp in the circuit above.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...