Friday, 27 December 2019

switches - Dual power supply: Battery and 5V


I am currently using a MCP73831 to charge my Li-Ion battery. Once the battery is charged I can use a switch to turn on my circuit.


Power Supply


So right now : USB-B -> MCP -> Li-Ion -/-> Circuit.


It means that when my battery is charging, the rest of the circuit is turned off. What I'd like to do is to do both at the same time: charge the battery and power the circuit. So that when the USB cable is not connected, the circuit drains the battery. And when the USB cable is connected, the circuit is powered directly from the USB while the battery is charging.


Ideally I don't want to use any manual switch, so that everything is automatic.



I thought of two options that obviously don't work:



  • Removing the switch on the schematic above. But the battery would not be charged properly. (And I'm not even sure the circuit would work because of the battery charger behavior).

  • Using a parallel branch from the USB but it would short-circuit the battery charger. (Unless I keep the switch...)


Some technical details:



  • The supply voltage can be anywhere between 3.7v and 6V.

  • The switch between Battery supply and (USB supply + battery charging) should be automatic (Unlike on this schematic).




Answer



Place a diode from Vdd (or Vin - same junction though) to the cathode of D1.


schematic


simulate this circuit – Schematic created using CircuitLab


This will work just like an OR gate: Your circuit will be powered from Vin if (Vin - 0.6V) > Vbattery. Otherwise, the circuit will be powered from battery. You can use a germanium diode in order to reduce voltage drop on that extra diode.


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...