garage door monitor

Discussion in 'The Projects Forum' started by coeng, Oct 29, 2009.

  1. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    Newbie here. I have a limited background in circuits (I had some EE courses in college on my way to a CoE degree) so I'm not completely clueless, but hardly savvy.

    I am attempting to install a circuit for a garage door monitor. I went to my local electronics store today to get the parts. First off, the guy told me that I shouldn't be using an AC transformer (as per the wiring diagram) because it would required the use of a rectifier and something else (he lost me at that point). Instead he sold me a (much cheaper) simple 12V plug-in transformer (sort of like the kind you use to power a cordless telephone base). He told me to cut the socket end off, split the leads (striped lead is positive), solder one side of the resister to the positive lead, solder the other end of the resister to one end of the switch, solder the other end of the switch to the anode (long lead) of the LED, and solder the cathode back to the the negative lead of the transformer. Does this sound about right?

    Being that the LED (basic 5mm red LED from Radio Shack) has a typical voltage of 2.25 volts, that would require a ~488 Ohm resistor to produce a 20ma current.... (12v-2.25v)/20ma = 488. I believe he sold me a 510 Ohm. Does this sound about right? The original wiring diagram called for a 4.7K resistor....why I don't know...but that would only produce a 5ma current which would barely illuminate the LED, right?

    Another thing he told me to do was use 18 gauge speaker wire instead of solid bell wire that the diagram called for. Is there any difference? I plan to run the wire 100 feet from the switches to LED.

    As far as the switches are concerned, I was going to use the pushbutton switches (from the instructions) but then I decided to go with magnetic switches (that have three terminals to support both NC and NO configurations). Which configuration should I use, NC or NO? I want the LED to light up and stay lit as soon as one (or both) garage door opens. When BOTH doors are in the closed position, the LED should be off. I assume it would be OK to connect both switches to the circuit. The only questions are: should they be NC or NO, and do I wire the two switches in series or in parallel. I am betting that they should be NO and wired in series.

    Thanks in advance.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Welcome to AAC. We have people on here with a broad range of experience levels.

    Capacitor, probably. Actually, just another single diode would take care of the problem; which is LEDs have a reverse breakdown voltage of around 5v, which shouldn't be exceeded. A transformer puts out AC. Using a single rectifier diode just gives you 1/2 of the AC waveform. A capacitor can be used to filter out the "ripples" if necessary.

    Those are commonly referred to as "wall wart" supplies.
    Yep, sure does.

    Well, wall wart supplies are generally unregulated. The're stamped with a voltage @ current rating; at the rated current they will output that voltage, +-10%. If you use less of a load, the voltage can be higher. 20mA isn't much of a load. Better check the voltage output of the wall wart before you hook things up. Don't be surprised if it measures 14v or more with no load.

    It's not bad to operate an LED at less than it's rated current. It just won't be quite as bright. If you exceed the LED's rated current, it will have a very short life. Besides, LEDs nowadays are really bright.

    Could have been that he had speaker wire in stock, but not bell wire.
    Either would work. Speaker wire has stranded conductors; bell wire is generally solid conductor. If you're going to be stapling the wire in place, I think I'd go with the bell wire. If the wire is going to be flexed where it's installed, use the speaker wire.

    N.C. and wired in parallel. Place/align/adjust the switches so that when the doors are completely closed, both of them are actuated.
     
  3. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    Wow, that was quick. Thanks for the warm welcome. I have some followup questions, sorry if they sound too basic for this forum. I took EE courses over 15 years ago so I'm basically relearning everything. At least the second time around it will be easier.

    What problem does the lack of a rectifier/capacitor introduce in the original diagram? Or is this just considered a crude and less elegant solution?

    Why?

    So basically just hook up my multimeter to the two leads, plug it into the wall and check the voltage, right? What if it is as high as 14V? What if its lower than 12V? My guess would be that all I need to do is verify that I would not exceed the max current for the LED (28mA), right? How would I compute that? The max voltage for the diode is 2.6V....(14V-2.6V) / 510 = 22mA (and change), which is still less than the max current for the LED. Did I do that right?

    How do you determine an LED's "rated current"? The specifications say 28mA max. It also says "Typical Voltage is 2.25, with a maximum voltage of 2.6V".

    Man, I was off....could you explain? If a garage door is closed both contacts (the moving and the non-moving sides) are parallel to each other. This is the normal position, is it not? I would assume that you would not want the current to flow (i.e. open circuit) and therefore it would be considered to be NO. When the garage door is opened, the contacts move apart and are no longer in the normal position. I would expect the gizmo inside the non-moving contact to complete the circuit and allow current to flow through and thus illuminate the LED. Is this incorrect? This assumption is also why I thought they had to be in series.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You just happen to luck out. The forums aren't interactive; sometimes it can take a few days for people to get responses.
    That's OK. I was plenty rusty when I first came on here a few years ago.

    Well, like I said - it's not good to exceed the reverse breakdown voltage of the LED. They used a 4.7k resistor in their circuit to minimize the reverse current, but the LED would've been quite dim when forward biased.

    re: wall wart
    Because they look like an ugly bump on the wall when they're plugged in!

    You usually go with the "typical Vf @ current" specification. It's better to err on the cautious side; you won't burn up the LED if the current is on the low side.
    Rlimit >= (Vsource - Vf_LED) / Desired_Current
    Let's say your source voltage is 14v, and your LED has a typical Vf of 2.2v @ 20mA.
    Rlimit >= (14 - 2.2) / 20mA
    Rlimit >= 11.8/0.02 = 590 Ohms.
    Here is a table of standard resistance values: http://www.logwell.com/tech/components/resistor_values.html
    I suggest that you bookmark that page.
    The closest E24 value >= 590 is 620.
    11.8v/620 Ohms = 19mA (rounded off)

    It should be specified on the package. Radio Shack's specifications marked on their packaging leaves a good bit to be desired, unfortunately. Assume that the typical Vf of 2.25 was measured at 20mA. You really should not go higher than that if you want the LED to have a long life.

    re: N.C. and wired in parallel. Place/align/adjust the switches so that when the doors are completely closed, both of them are actuated.
    Nope, you want the switches to be normally closed.
    Arrange each switch so that when it's door is closed, the switch actuator is depressed. This will open the circuit so the LED will be off. When the door moves out of the fully closed position, the switch contacts go back to their "normal" position, which is closed, and the LED lights up.

    If you wire two NC switches in parallel, either switch closing will complete the circuit and light the LED.

    If you used normally open switches in series, the LED would only light when both doors were fully open.
     
  5. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    Something is still not adding up....if the two magnetic contacts are next to each other, which is what happens when the garage door is closed, isn't this considered to be the normal position? In that case wouldn't you want the circuit to be open at that point to prevent the flow of current? Doesn't this sound like the circuit is "normally open"? Or is the whole concept counter-intuitive and I just can't quite grasp it?
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, I stand corrected; you're using magnetic switches.

    If the magnet is right next to the switch, the NC contacts should be open, NO contacts closed.
    If the magnet isn't anywhere near the switch, the NC contacts should be closed, NO contacts open.

    You don't have to believe me. I invite you to experiment with them and your multimeter set to Ohms at the lowest scale.

    Your magnetic switches probably has three terminals; NC, NO, and COM. Measure between the COM and either the NC or the NO contacts. You want to use the connections that are OPEN when the magnet is next to the switch. These will be the NC contacts.
     
    Last edited: Oct 30, 2009
  7. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    Whew! I thought I was losing it. I tested the setup on a breadboard tonight and it worked. The switch worked as I wanted it to when I had them in the NO configuration.

    That being said, do I wire two like NO magnetic ;) switches in parallel? or in series? I tore the breadboard setup before I had a chance to test this. By the way...18 gauge speaker wire is tough to but in breadboards. Is there any trick to make it easier?

    Going back to the voltage issue with the wall wart. I got a reading of 15.3V on my meter with no load. Does that mean I need to change my resistor? I don't think so, do you? (15.3-2.25)/610 ~ 21mA which is still below my 28mA max. In fact, at this point I'm not quite sure why you pointed the voltage issue with the unregulated wall wart. I want to understand what your concern was when you said: Better check the voltage output of the wall wart before you hook things up. Don't be surprised if it measures 14v or more with no load. In other words, when would I need to take corrective action? As far as I can tell, I would still be OK if it produced 19V ...(19-2.25)/610 which is just under 28mA.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Wasn't there ar project extremely similar not too long ago?
     
  9. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    I just realized that the 18 gauge speaker wire pair will probably be too thick to fit through the 1/4" hole that I plan on making in the wall for the LED socket. Any suggestions on how to get around this? Can I use a smaller diameter wire? What's the smallest wire I can use for the parameters involved?
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here's a schematic diagram for you:

    [​IMG]

    The switches are shown in the positions they would be in if the doors were both open.

    100 feet of 30 gauge wire would have a resistance of 10.31 Ohms. Your current draw is so low that the resistance of the wire wouldn't have much effect on the current through the LED.

    You don't use large gauge wire in breadboards. You use 26 gauge jumper wires. Trying to force large-gauge wires into your breadboard will damage it. You should not use stranded wire with breadboards, as the strands may break off in the holes, causing problems later.

    I suggest that you use a resistor large enough that the current through the LED will be 20mA or less. You're better off using a resistor that is a bit too high than one that is too low in resistance.
     
  11. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Just to clarify something... When referring to magnetic switches, both N/O and N/C refers to the state of the mag switch contacts when the magnet is not in proximity of the switch. ;)
     
  12. coeng

    Thread Starter Member

    Oct 29, 2009
    32
    0
    Phase 1 complete...I ran my wire from the basement into the garage. Inside the garage I mounted a terminal block so that I could connect the switches to them rather than having to solder them to the wire from the basement. I then mounted the sensors on top of the garage doors and connected them to the terminal block. I then connected the wires to my breadboard in the basement and tested each garage door. When either door was up, the LED lit up. Perfect.

    Phase 2....running the wires to the other side of the basement and connecting the LED and power supply.

    Phase 3 ?? How complicated would it be to add a chime feature to my circuit? When a garage door opens a little chime would play (like when you enter an alarm protected door). The LED should light and stay lit (until both doors are closed), but the chime should only play when a garage door opens.
     
  13. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    You can get Piezo Chimes at Radio Shack. A 555 Timer could be used to Chime for only a few seconds. These are also available at Radio Shack.
     
  14. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    You could also do something like this. R2 represents your Piezo chime. You can see by the graph that current is supplied to the piezo for only 2.7 seconds after the switch is closed. The FET is used as a momentary switch here.
     
    Last edited: Oct 30, 2009
Loading...