Connect with us

I need to turn on an LED when switch is open

Discussion in 'LEDs and Optoelectronics' started by Neil Ives, Dec 8, 2015.

Scroll to continue with content
  1. Neil Ives

    Neil Ives

    7
    0
    Dec 8, 2015
    Hi folks, first post here.
    My knowledge of electronics is fairly shallow so sorry I know this question is simple.
    I have a magnetically operated switch on my house side gate. The switch is Normally Open so when the gate is opened the switch is also open circuit. Please will you point me to a simple circuit that will allow an LED, and possibly a buzzer to come on when the gate is opened. I've found many examples of turning on a transistor when the signal goes high but I need the opposite situation.
    Many thanks for any replies.
    Neil Ives
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,717
    Nov 17, 2011
    Welcome to our forum, Neil.

    Have a look at this thread, Specifically posts #13 ff.
     
  3. Neil Ives

    Neil Ives

    7
    0
    Dec 8, 2015
    Thanks for that. I had already thought of wiring the reed switch in parallel so shorting the LED. This is ok if you have a continuous power supply but if you were running from a battery you would not want current in the circuit all the time.
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,717
    Nov 17, 2011
    Right, this was not obvious from your post. You will not be anle to eliminate the idle current completely, as the contact is closed in idle mode, but you can reduce the idle current drastically using e.g. this circuit
    upload_2015-12-8_15-0-57.png
    When the switch is closed, the base-emitter junction of Q1 has zero bias and the transistor is off. When the contact is open, the resistor R2 biases Q1 with a current that is sufficient to turn Q1 on. Idle currrent is reduced by the gain (beta) of Q1. Use a darlington transistor for very high gain aka very small idle current. Use a MOSFET instead of Q1 to make the transistor voltage controlled (no bias current) and you can increase R1 even further.
     
  5. Neil Ives

    Neil Ives

    7
    0
    Dec 8, 2015
    Thank you for that. I kind of understand the circuit. I wouldn't know what components to buy. I think a mains PSU with my switch in parallel with the LED is going to be a lot easier for me to implement.
     
  6. AnalogKid

    AnalogKid

    2,520
    718
    Jun 10, 2015
    Last edited: Dec 8, 2015
  7. Neil Ives

    Neil Ives

    7
    0
    Dec 8, 2015
    Thanks, yes I thought there must be but I've bought a switch already and it happens to be a NO pattern. It suits my purposes because it's a cylinder of about 4mm diameter; this means I can bury it in the brick wall with just the circular end facing the magnet making it very hard to spot and less prone to damage. This is the switch http://goo.gl/hXUUEI it states it is NO/NC which is confusing as it only has two wires and states lower down that it is N/O
     
  8. GPG

    GPG

    452
    66
    Sep 18, 2015
    Check that it operates in that configuration. I think you will find that operation is more reliable with the magnet and switch parallel to each other.
     
    Last edited: Dec 10, 2015
  9. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    or go for an old style 4000/7HC series not gate ic...

    Sorry it refused to copy url!
     
  10. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    If that cylindrical microswitch is similar to what I've used many times in the past they're designed to work best on their end. They're handy for woodworkers that want to add lighting to cabinetry while hiding the magnet and switch. When I used them the magnets were also round and both the switch and the magnet were buried in a hole drilled into the cabinet door and frame.

    Chris
     
    Neil Ives likes this.
  11. Neil Ives

    Neil Ives

    7
    0
    Dec 8, 2015
    Checked; works fine.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-