In many applications, it's desirable to disable LEDs used for system verification. Many options are available for the disabling function, including manual SPST (single-pole single-throw) switches, enhancement- and depletion-mode MOSFETs, bipolar-junction transistors, and JFETs. The circuit in Figure 1 automatically disables the LEDs when a mechanical housing encloses the circuit card, thereby preventing you from accidentally leaving the LEDs on to waste power. The main switch portion of the circuit comprises an amplified photovoltaic cell (photodiode) and a small, n-channel MOSFET. The amplified photodiode signal provides drive to the MOSFET's gate when enough light is available. Because the photodiode generates its own power from the available light, the amplified photodiode IC consumes only microwatts in a unity-gain configuration.
|Figure 1.||This circuit configuration turns off unneeded LEDs when it’s dark.|
Originally, I considered using a series string of photodiodes to directly drive the MOSFET's gate. However, the integrated OPT101 design provides reliable operation under a number of light conditions. If you adjust the gain of the amplifier, the circuit can function in both bright and dim applications. I use multiple MOSFETs for unique voltage ranges in which the LED would suffer damage from excessive reverse-bias voltages. This precaution is important in a design with multiple power-supply voltages. For instance, if you used only one MOSFET to control the LEDs in a design using 3.3 and 12 V supplies, the reverse voltage across the 3.3 V LED would be 8.7 V when the switch is off. This reverse voltage exceeds the absolute maximum rating for many LEDs. If you need to control status LEDs using a microcontroller or some other logic-level device, add another MOSFET between the LED and the light-switch circuit. This configuration allows the light switch to act as a master on/off switch and the logic device to act as a secondary on/off control.