Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Design "HELP" for a simple LED alert circuit?

Status
Not open for further replies.

savatreatabvr

New Member
My issue is I want to know when my dog goes in and out of the pet door, I have about 20% of my hearing so those loud annoying audible devices won't work, lol! So here's my idea, I want to use a magnetic door contact from a home alarm system, a relay, a plug-in power supply and a LED! The LED, relay and power supply will be hardwired to my office and the magnetic door contact will be obviously be at the pet door! I don't need a latching circuit, I just want the LED to light up when the door opens then off when closed! I'm not sure what kind of relay I need or how to wire it all up! Sounds simple enough so can you guys help me out?
 
You don't even need the relay. This would be a good place for a 555 one-shot. The switch triggers the 555 which powers the LED for 2-3 seconds (long enough for the door to stop flapping and easier to see than a series of short flickers).

Do you have a DC power supply for this already? If so, what voltage?
 
If you just want the LED to be on when the door is open, then all you need is a DC output wall-wort power supply, an LED, a resistor, and the magnetic switch.

You wire the LED in series with the resistor and connect it to the wall-wort output (positive output to the LED anode connection). The value of the resistor is determined by the desired LED current and the wall-wort output voltage. The formula is R = (Vww-Vled) / (Iled) where Vww is the wall-wort voltage (which should be at least 5V), Vled is the operating LED voltage, and Iled is the desired LED current. (The LED parameters are given on its data sheet).

Assuming the alarm magnetic switch contact is closed when the door is closed, then just connect the switch contacts to each side of the LED. That will bypass the LED current and shut it off when the contacts are closed. This will cause continuous current to flow through the resistor and switch, but it is a small amount and should not a problem.
 
Thank you for your responses, Im kind of puzzled here, dont I need a relay to switch the direction of the current to the LED when the magnetic field on the contact is broken? Otherwise wouldnt the LED be on when door is closed and off when open? Im bad without a schematic so where can I find a website or book with this kind of circuit? Im thinking about using a normal flashlight bulb instead, it would save a trip to Radioshack!
 
Last edited:
Thank you for your responses, Im kind of puzzled here, dont I need a relay to switch the direction of the current to the LED when the magnetic field on the contact is broken? Otherwise wouldnt the LED be on when door is closed and off when open? Im bad without a schematic so where can I find a website or book with this kind of circuit? Im thinking about using a normal flashlight bulb instead, it would save a trip to Radioshack!
Below is the schematic to do what I suggested, which doesn't require a relay. The switch bypasses the LED current when it is closed, thus turning off the LED.

View attachment 65701
 
Since I think NC reed switches are hard to find, attached is a circuit with a MOSFET buffer switch to minimize standby power when the LED is off (switch closed) so it can be operated with a 9V battery. The 9μA quiescent current should allow a 9V alkaline battery to operate for several years before needing replacement. Just about any N-MOSFET will work for this circuit.

View attachment 65703
 
N/C reed switches may be slightly less common but are certainly very easy to find on e.g. eBay.

The MOSFET circuit shown is of course a very good way to do it (and generally cheaper than buying an NC reed switch).
 
Do I need a resistor if i use a 3v flashlight bulb and a 3v plug in power supply! Id rather not use a battery simply because a plug in power supply will be more reliable!
 
Do I need a resistor if i use a 3v flashlight bulb and a 3v plug in power supply! Id rather not use a battery simply because a plug in power supply will be more reliable!

No. The resistor is only needed with LEDs to limit the current to a safe (for the LED) level. No such consideration is needed as long as the bulb voltage rating is reasonably close to the supplied voltage.

Did someone say NC magnetic switch? Beware that some descriptions consider the condition of the switch "normal" with the magnet present.

View attachment 65712
**broken link removed**
 
Last edited:
Am I wrong? I thought a normally closed switch was shorted with the magnet present (door closed)? See thats why I thougjt I needed a relay becausr when the door is closed the light would be on until door is opened which breaks the circuit? I guess I am as dumb as I look, lol!
 
Ordinarily a switch is considered in it's normal condition with no actuating force present but apparently the geniuses in the alarm installation industry have redefined normal to mean the door is closed and the magnet is acting on the switch. I was as confused as you at first.

Fortunately, the switch in my link has both options available. You may be able to find a similar product locally.
 
Do I need a resistor if i use a 3v flashlight bulb and a 3v plug in power supply! Id rather not use a battery simply because a plug in power supply will be more reliable!
You still need a transistor to invert the signal if you use a reed relay that is closed when the door is closed.

I would think a battery system is just as reliable as a plug-in supply. The battery will give advance warning that it is getting weak since the light will grow dimmer. And the battery system will continue to operate even if the power goes out. Also for best reliability you want to use an LED, not an incandescent bulb.
 
apparently the geniuses in the alarm installation industry have redefined normal to mean the door is closed and the magnet is acting on the switch. I was as confused as you at first.
But depending on which geniuses you ask, both NC and NO are used to describe the same switch. Some of the products on eBay actually specify the state when the magnet is close, otherwise it's always ok to ask them.. or just get one with both N/C and N/O as you suggested and you can't go wrong.
 
Thank yoi all for the excellent advice and info, I agree the battery is probably the best way buI m still confused! If I use a normally open switch wont the light be on until the door opens? I want the exact opposite! As simple as it is Im still missing something here!
 
Thank yoi all for the excellent advice and info, I agree the battery is probably the best way buI m still confused! If I use a normally open switch wont the light be on until the door opens? I want the exact opposite! As simple as it is Im still missing something here!
You are missing the circuits I posted. Those do indeed turn the LED off when the door and relay are both closed. When the relay is closed it connects the MOSFET gate to source which turns it off.
 
You are missing the circuits I posted. Those do indeed turn the LED off when the door and relay are both closed. When the relay is closed it connects the MOSFET gate to source which turns it off.

I think you mean "switch" when you say "relay". I would've PMed this but you have that option turned off.
 
I think you mean "switch" when you say "relay". I would've PMed this but you have that option turned off.
It's often referred to as a reed relay but magnetic switch also works. Take your pick. ;)
 
My PMs is turned on, please try again! I'll try and reword this, I want the light (now flashlight bulb) to light up when the pet door is open and to be off when closed! So when the magnetic door contact (reed switch from alarm system) is open (breaking the circuit) it needs to trigger something (relay) to send power to a light (now flashlight bulb) and when the magnetic door contact (reed switch from alarm system) is closed (completing the circuit) it needs to trigger something (relay) to stop power to the light (now flashlight bulb)! I'm pulling my hair out and I'm craving a beer so please help, lol! My parts list I have to work with is:

Magnetic door contact (reed switch from alarm system)
3vdc plug-in power supply
3vdc flashlight bulb
18ga 2 conductor stranded copper wire

I guess the simplest thing to do would be buy a magnetic door contact (reed switch from alarm system) that is normally closed right?

**broken link removed**



I think you mean "switch" when you say "relay". I would've PMed this but you have that option turned off.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top