This is a super simple design for a USB charged nightlight, with a rechargeable Li-Ion battery (e.g. a 3.7V 16340).
When the switch on the left is closed the device is charging (i.e USB is connected), until 75% of the reference voltage are reached (to avoid overcharging the battery).
When the button on the right is pressed, the battery is discharged through the LED.
Could you please comment on this design?
a) Would this even work?
b) Will the battery explode?
c) Is the diode necessary?
d) Areas to improve?
As an alternative to the OpAmp I thought about using a small PIC with a analog comparator and two states (charging, full).
Please let me know your thoughts.