Triggering an led when power is turned off

Discussion in 'The Projects Forum' started by SanctuCaryCustoms, Jul 15, 2019.

  1. SanctuCaryCustoms

    Thread Starter New Member

    Jul 4, 2019
    6
    1
    Hello everyone,
    I’m trying to make a 12v circuit that turns on a led when the 12v feed to it is lost. Led only has to stay on for a couple of seconds and will need to turn off again as soon as the power returns. Also needs to be as small as possible.
    Thanks in advance
     
  2. iimagine

    Senior Member

    Dec 20, 2010
    388
    64
    I'm not sure if this is the most efficient way and small enough, but it does the job. You will have to calculate the timing RC that suit your need.
    DeleteMe.PNG
     
  3. crutschow

    Expert

    Mar 14, 2008
    22,802
    6,748
    Below is the LTspice simulation of another circuit that performs the desired function.
    When the power is turned off (blue trace), it generates a nearly constant current (yellow trace) as the capacitor discharges (red trace), so the LED brightness stays essentially steady until the cap is nearly discharged.

    The LED stays on for over 2 seconds after the power is shut off, for the capacitor value shown.

    The LED current is about 1.7mA nominal, as determined by the value of R2, but that should be sufficient for a high efficiency LED to be readily seen.
    Higher LED current will, of course, shorten the LED on-time for a given capacitor size.

    If space is at a premium, you can save a package by using a dual 2N3904 transistor such as the MBT3904DW1.

    upload_2019-7-14_22-36-21.png
     
  4. MrChips

    Moderator

    Oct 2, 2009
    19,037
    6,116
    Here is my solution. I don't yet know if it will work.

    Power Fail LED,jpg.JPG
     
  5. LesJones

    Well-Known Member

    Jan 8, 2017
    2,285
    688
    Hi MrChips,
    If the original load (Before switch off.) does not pull down the input to you circuit you would need a pull down resistor on it's input. Other than that I can't see any reason why it should not work.

    Les.
     
  6. crutschow

    Expert

    Mar 14, 2008
    22,802
    6,748
    Below is the LTspice simulation of MrC's circuit:
    The tradeoff is the drop-off in LED brightness for this simple circuit versus the constant brightness for the more complex circuit.

    upload_2019-7-15_7-58-0.png
     
    Last edited: Jul 15, 2019
  7. iimagine

    Senior Member

    Dec 20, 2010
    388
    64
    This circuit is very efficient, it only consume 12uA which is practically nothing:
    DeleteMe.PNG

    This circuit uses least components but consume 120uA:
    DeleteMe2.PNG

    Edit: I was posting this almost at the same time as crutshow. Our circuits look similar lol
    Edit: Dont even need the 470 resistor for the second circuit if the transistor's HFE is below 250
     
    Last edited: Jul 15, 2019
  8. iimagine

    Senior Member

    Dec 20, 2010
    388
    64
    Falstad failed to simulate that circuit, and i'm trying to understand how it is possible that it worked when there is no pull down resistor?
     
  9. MrChips

    Moderator

    Oct 2, 2009
    19,037
    6,116
    Yes, you are both right, @LesJones and @iimagine.

    Add a 1MΩ pulldown resistor from base to collector. (I don't do simulations. I do real breadboarding.)

    Change LED to high efficiency blue for longer LED visibly on.
    Also, change capacitor from 100μF to 220μF for about 10 seconds of LED being visible.
     
  10. crutschow

    Expert

    Mar 14, 2008
    22,802
    6,748
    My simulation assumes that the associated circuit will pull the supply voltage to near zero when the power is removed.
     
  11. MrChips

    Moderator

    Oct 2, 2009
    19,037
    6,116
    BTW, there is a typo in my circuit. I intended to use a 2N3906 transistor.
     
Loading...