Electrical – Charge battery through the transistor

battery-chargingledtransistors

I wonder if the circuit below is correct. What I need to do is: When SW1 is open, the LED is off and there is no connection between the battery and the 5v source. When SW1 closes the LED turns on and then the battery starts to be charged by the source through the short between collector and transistor emitter. Is correct? Is there a better way to do this?

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

This circuit will never work, as the base-emitter junction is back-biased. When SW1 is closed, the emitter sees the full 3.7 volts, while the base sees only a fraction of this voltage as determined by R1R2. For the circuit to work, disconnect R1 from the emitter and connect it to the collector. This will make sure the base is more positive than the emitter (if you design voltage divider R1R2 correctly). Here's how I would modify your circuit.

[Edit] That said, I should emphasize that you should be extra careful when charging lithium-based cells; they may explode or catch fire if mishandled. Don't use this schematic until you know exactly what you're doing and how the values of critical components affect its operation.

schematic

simulate this circuit – Schematic created using CircuitLab