Electrical – Battery indicator connected with bicolor led

batteriesled

Battery indicator connected with bi-colored LED.

I need to make a system that indicates when a 3.7V battery is connected to a 5V source or not. When the battery is NOT connected a red LED stays on, when the battery is connected the red LED turns off and the green LED is on. I do not want to show a low battery or something like that, I need to show through the LEDs if the battery is ON or not, just that. Below what should be the circuit, but do not know how to make the connections to make the system work as I want.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

I'd do it this way using two MOSFETS if it's individual or common anode bi-color LEDS.

This way the LED current comes from the 5V supply in both cases and does not drain the battery significantly other than the 3.7uA through R3.

When the battery is present M1 will be on lighting the green LED, and turning off M2. When absent, M1 will be turned off by R3, and the gate of M2 will charge up through the green LED, and will turn on illuminating the red LED.

schematic

simulate this circuit – Schematic created using CircuitLab

Common cathode would require P-Channels with a suitable turn on threshold like this.

schematic

simulate this circuit