Indicator LED error circuit- Help!

Discussion in 'General Electronics Chat' started by ekremgusani, Sep 4, 2018.

  1. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    FB4B9E79-EC2F-4617-8A89-D68D63015AA6.jpeg i want the Green LED to be on as power indicator of a 12v dc sensor switch and when a sensor switch is activated i want the Green LED to turn off and the RED LED instead to be ON as a warning light. The output is 12v siren.
    This circuit it doesn’t seem to work correctly.
    When using the red-green 3 pin led instead the power light to be green it’s lights red and when sensor switch is activated then led lights even more red.
    When i switch the Red LED to be power indicator and then Green Led to be warning light then it works fine.
    **
    When using 2 separate LEDs red and green (normal 5mm 2 pin led)
    The both led lite as a power indicator and when sensor switch is activated only one led going off.

    Please fix this circuit or upload new working one.
    Thank you.
     
    Last edited: Sep 4, 2018
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    What is the nature of the switch? How is it powered, what is it's output when it's activated, and how much current can it sink/source?
     
  3. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    It is 12v dc power supply, no sink. Sensor alarm switch.
    When activated then the siren 12v is activated.
     
  4. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    There is no 12V in your schematic. You indicate that the "switch" switches between 0 and 5V.
     
  5. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    Is not my circuit, user from this forum gave me
     
  6. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    Post a schematic of your alarm circuit.
     
  7. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    There is no schematic!
    It is basic 12v plug and play sensor switch with alarm. I want just to ad those led as power indicator and warning led using only 1 led (red-green 3 pin led common cathode)
     
  8. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    What triggers the alarm? What are it's voltage and current sink/source characteristics?
     
  9. MisterBill2

    Distinguished Member

    Jan 23, 2018
    3,458
    680
    OK, you do not provide even any indication of what the "plug and play" alarm voltages are at wherever you are wanting to connect to. If you are wanting to connect to the output siren horn, it may be that a circuit can be created. If you are hoping to connect to a switch connection point and the power supply connection, +12 volts, that can probably be done. We have no clue about what the voltage at the top of the "activated" symbol would be, that matters a great deal. Then, for the 3-lead LED, is one terminal a common cathode? Or is it something different? If the alarm is triggered by a switch, does the switch open or close to trigger the alarm.

    Please be advised that very few of those folks who post on this forum are 100% infallible. AND, in addition, not everything that you see on the internet is correct.
     
  10. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    If you only need a few mA in the LEDs, you can use CD4049 operating from a 12V supply:
    upload_2018-9-4_19-32-5.png
    "in" is the control signal that switches nominally between 0V and 12V.

    To double current, parallel unused inverters with IC1A and IC1B. For even more current, use IC1A and IC1B to drive PMOS transistors.
     
  11. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    A9BBACA3-44A5-4809-96D0-DDCCCDEFEA56.jpeg
    Can you just simple just inverse the circuit so as i mention above, the green led as power indicator and red as warning led doesn’t work as both staying lite but when red led is as power indicator and green acting as warning led then the circuit working fine!
    I want the power indicator led to turn off when warning led turns on, simple like that!
    This in the photo is 12v motion sensor switch that activates 12v siren.
     
  12. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    Can you just simple just inverse the circuit so as i mention above, the green led as power indicator and red as warning led doesn’t work as both staying lite but when red led is as power indicator and green acting as warning led then the circuit working fine!
    I want the power indicator GREEN Led to turn off when warning RED Led turns on, simple like that!
    This in the photo is 12v motion sensor switch that activates 12v siren. 07949BE9-6C2D-4FAA-AA36-0E978BF38308.jpeg
     
    Last edited: Sep 5, 2018
  13. MisterBill2

    Distinguished Member

    Jan 23, 2018
    3,458
    680
    The circuit shown works, but there is another option, because the 4049 can sink a lot more current than it can source, and also it can sink still more current when it is running on 12 volts. That is what you will find on the specifications pages, which provide a lot more information about how things function.
     
  14. MisterBill2

    Distinguished Member

    Jan 23, 2018
    3,458
    680
    Are you able to measure the voltage on the wire that would power the siren when the alarm is triggered? Meter positive to that wire, meter negative to the 12 volt power source negative connection. Also, measure the same voltage when the alarm is not triggered. This is the information needed to design the indicator circuit you request.
     
  15. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    I don’t have the meter but this is the 12v BA8E2961-2416-4FF5-BE4B-1D853C2ADDF2.png siren from amazon
     
  16. dendad

    Distinguished Member

    Feb 20, 2016
    2,829
    764
    R:G LED.jpg
    A simple circuit.
    The left hand is to show one way to do it if you had a voltage free contact.
    With the switch open, the Green LED lights. "D" may not be needed, depending on the voltage drop of the "G"reen LED.
    As green LEDs usually have a higher voltage drop than "R"ed ones, the red LED switched across the green led will turn the green one off. The extra diode just ensures it.
    The right hand circuit is probably more like what you need.
    A line switched to 12V powers the siren, and once again, the red LED robs the volts from the green LED. D1 stops the reverse volts across the red LED from damaging it, and also trying to run the siren from the power supply.
    D2 cancels out D1 voltage and may need to actually be 2 series diodes.
     
  17. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    Thanks, will try this circuit later on. Those are 2 circuits there or 1?
    What are the components, diodes and resistor only?
    Can you draw it better?
     
    Last edited: Sep 5, 2018
  18. dendad

    Distinguished Member

    Feb 20, 2016
    2,829
    764
    G = green LED.
    R = red LED.
    D = 1N4148, or 1N914, or just about any diodes.
    1K resistor will give about 10mA through the LEDs.

    Bi-colour LEDs are available in 3 lead packages (don't get the 2 lead variety) in both common anode and common cathode configurations so the LED appears to change colour. Otherwise, 2 single LEDs can be used.
    Try it on a breadboard. Hook up one green LED and resistor, then place the other red LED across the green one to make sure your LEDs work ok without the added series diode for the green one. It will not hurt to have the diode there anyway.
     
  19. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,534
    2,054
    OP is using a 3 pin common cathode LED, so drive needs to be high side.

    Do you know why most CMOS devices can sink more current than they can source?
     
  20. ekremgusani

    Thread Starter Senior Member

    Mar 20, 2011
    157
    1
    Bravo! It’s working perfect. Just what I need. Some people here trying to act smart by asking too many questions for a simple circuit. You come and done it in a minute.
    Thank you, you are the best!
     
Loading...