Capacitor to power switch controlled LED

Discussion in 'General Electronics Chat' started by surfline, Sep 21, 2009.

  1. surfline

    Thread Starter Active Member

    Aug 12, 2009

    Attached is the schematic of what I'm trying to do. (The diode is an LED). I am trying to figure out the best circuit to power one LED, chosen from many, when the microcontroller PIC send's a 3.2Volt signal to the gate of the n channel mosfet. However, I wan't the LED to stay on for approximately 10 seconds when the power supply 12V is removed. That is why I have the 2000 uF capacitor in parallel with 12V source. The smaller capacitor's on the gates of the n-channel mosfets are to hold the on / off state to keep the switch on / off. The resistor is parallel is just to allow it to slowly discharge.

    The problem I am having is keeping the LED on for a while when the power is removed. This circuit configuration provides strange results and the LED won't stay on very long without very high resistance in front of the LED, however this makes the LED too dim.

    Without the transistor, and just: 12V capacitor -->> 2k resistor -->> LED allows for the LED to stay on and bright for at least 10 seconds, but with the transistor it's not working well. I also tried hooking up the source to ground and moving the LED and resistor on the drain side and this made it even worse.

    The N-Channel Mosfet data sheet I am using is here:

    Any idea's or suggestions?

  2. Audioguru


    Dec 20, 2007
    You are using the mosfet as a voltage follower. Then its gate voltage must be 3.2V plus 2.7V= 5.9V for the source to be near +3.2V.
    If you have the LED and its current-limiting resistor at the drain to positive supply and ground the source then the Mosfet inverts and turns on when its gate is 2.7V.

    When the PIC output goes low then the mosfet instantly turns off. Maybe you can add a series diode so that the 200k resistor can slowly discharge the 100uF capacitor and turn off the Mosfet later.
  3. surfline

    Thread Starter Active Member

    Aug 12, 2009
    The mosfet gate capacitor is holding its charge just fine, it's the bigger capacitor's that's connected to the drain that's powering / driving the LED's that's discharging too quickly.