Doorbell button to alarm relay

Discussion in 'The Projects Forum' started by ShopRat59, Aug 4, 2015.

  1. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    I am trying to use the doorbell button push to activate a relay to create an alarm (N/O zone) in my M1 Gold alarm. Based on testing the relay must stay latched for approx. 1 second. I have bread boarded a standard npn transistor time delay circuit (http://4.bp.blogspot.com/-Oz6JGdDDcTs/T5_a_S8fwDI/AAAAAAAABOc/74USacFNzkM/s1600/simple+delay+timer+circuit.png), substituting a relay for the led, that works perfectly. But when I test it on the actual alarm it fries the transistor. The only difference between my breadboard and the alarm circuit is the power supply - 1.0A breadboard, 1.5 A alarm. The components I'm using are as follows:
    Transistor: 2n2222
    Capacitor: 10uf
    Base Resistor: 33K ohm
    Relay: OUAZ-SS-112D, 12V, 1A, 320 ohm coil resistance, 37.5mA coil current
    Flywheel Diode: N4001

    I suspect I need a different size base resistor (calculated 12.8K ohm?) which will cause me to change the capacitor, but before I try this out, I thought I would ask for some advice here. Please look at my components and comment on if they are sufficient and/or what values are needed to make this circuit function properly. Also, do I need a resistor between Vcc and the relay?

    Thanks in advance
     
    Last edited: Aug 4, 2015
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,804
    833
    Before we get into the resistor values, when you substitute the relay for the LED, are you including a reverse biased diode in parallel with the relay coil to absorb the back EMF when the relay is shut off?

    simple delay timer circuit.png
     
    Last edited: Aug 4, 2015
  3. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Yes - that is the listed flywheel (some call it a snubber, suppressor of flyback) diode - N4001
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,535
    1,251
    Does it fry the transistor when the button is pressed and held, or after the button is released? And, of course, check your connections. There are several "standard" pinouts for small transistors, giving lots of opportunities for poof.

    ak
     
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Why use a transistor at all? Can't you accomplish what you need with just the relay, including the 1sec delay?
     
  6. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1

    My origianal design was solid state, using another transistor instead of a relay. I could not get that one to work on the breadboard so I decided to switch to a relay - which has the added advantage of isolating the current from the alarm zone circuit.

    How would I get the delay with just a relay?
     
    Last edited: Aug 4, 2015
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    257.gif
     
    ShopRat59 likes this.
  8. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Mike, thanks for the quick reply, I will try that in the morning. Just two questions:
    1) Your circuit shows 10m next to the relay coil, what does that mean?
    2) R1 shows 10 - is that 10 ohms? I don't know that I have a resistor that low?
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    10mH, the inductance of the coil. The simulator needs some value, not critical. I set the resistance of the coil to 320Ω (not visible on the schematic). The capacitor and 320Ω creates the discharge time constant.
    Yes, Ten Ω. This is required component. Without it, you will burn the contacts in the push button.
     
  10. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    The 10 ohm resistor isn't dead critical. A pair of 22 ohm resistors in parallel would work. Just get something in there to avoid welding the switch shut.
     
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Ok, I didn't mean 10Ω +-1%; I'd settle for +100%, -50% ;)

    If you make C much bigger, we will have to revisit the inrush problem...
     
  12. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Mike,
    I found some 10Ω resisters, but the largest capacitor I had on hand was 1000uf. I just breadboarded it and it worked great! Due to the smaller capacitor the delay was less than 1 sec, but probably long enough for my needs. Does using the 50% small capacitor necessitate a different value for R1? Also, I included the N4001 flywheel diode, I assume this is still required?

    Thanks again for the great solution, I'm afraid once I started down the transistor solution, I got tunnel vision, I should have relooked the whole design when I switched to a relay.
     
  13. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No, R1 just sets the peak current through the switch. With the capacitor across the relay coil, the diode is not needed.

    You still looking down the tunnel? :cool:
     
  14. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Mike,

    Well just tested on the alarm and I still have an issue. When powered by a 12v/1A wall wart, it works perfectly. When the only change I make is to pull power from one of the Vaux ports of the alarm it works inconsistently. The Vaux is rated at 12v/1.25 amps. I put my meter on it and the voltage swings between about 12.5 and 14.5. I don't really understand why this would matter since it is driving a relay, but those are the results. I guess I will just have to add a voltage regulator to my circuit to ensure I get 12 clean volts.

    Thanks again for your time
     
  15. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No, not a regulator. The relay circuit cares not much about the voltage as long as it is at least high enough (~9V t0 pull-in the 12V relay). I suspect that the problem is that the aux alarm output voltage sags when asked to deliver ~1A through the 10Ω resistor to charge the large capacitor. A regulator will not help that.

    Try holding the push button longer before releasing it. I suspect that the timing capacitor is not charging during the time the button is pushed, likely because the voltage out of the alarm box sags. If you hold the button in longer, the power supply in the alarm box will have time to get the capacitor voltage up.

    In the simulation, the 12V voltage source was stiff. The wall-wart was stiff enough, the alarm box isn't.

    If you really want it to work off the 12V out of the output from the alarm box, then you may have to add the NPN back in...
     
    Last edited: Aug 5, 2015
  16. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    I really don't want to use another wall wart (the alarm is in my home automation wiring closet which already has half a dozen wall warts) but I do have another power supply dedicated to roller shade automation - I suspect it is more "stiff". I will try to tap in to that this afternoon and get back to you.

    If we have to go back to the alarm power supply and an NPN solution, I still have the problem with it frying the transistor.

    This has been a very frustrating project as I'm now on my third design, all of which worked perfectly in the test bench world, but none of which worked in the real world. I would never have thought a power supply would be such an issue.
     
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here is a way of reducing the inrush current (by making the C much smaller, and using the aforementioned NPN):

    257a.gif

    Note the supply current, I(V1) red, it shows about 80mA peak just as the button is pushed. It then drops to the relay coil current until Q1 turns off.

    Note that the transistor remains saturated until about 0.8s, at which point it begins turning off. Note that its power dissipation (violet trace) spikes as the relay turns off, but 110mW for 0.2s shouldn't heat it much...

    I still show R1 as the inrush limiter. This is what sets the peak current of 80mA.

    R3 increases the rate of turn off of Q1, getting it out of the high dissipation zone quicker.

    Q1 turns off so slowly that no snubber diode is needed.
     
    ShopRat59 likes this.
  18. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Thanks again for all the help. I did try your original solution attached to the other power supply, and it worked perfectly. I also breadboarded your latest solution and it works great - I prefer this as the smaller capacitors will be much easier to fit into the project box I am using. I won't have time to try it on the actual alarm circuit until Sunday, I will post back with my results again.

    I do have a couple of questions for my educational experience:

    1) Every relay circuit I have seen says that you MUST have a snubber diode - can you explain the logic/current flow that your design allows to not have a snubber.

    2) When you talked about stiff voltage, that was a new term to me so I did a little internet research. I found an article concerning this that said you can stiffen the voltage with a voltage divider and an "emitter follower" circuit. The circuit looked exactly like yours except it had an additional resistor attached to the emitter and said that was necessary to prevent the load from "blowing up." Could you explain why I don't need a resistor on the emitter in this application?
     
  19. ShopRat59

    Thread Starter Member

    Nov 27, 2013
    39
    1
    Tried to edit my post but was too slow, what I should have said is could you explain when I would need a resister on the emitter?

    Also, would you mind telling me the circuit/sim software you are using?

    Thanks again for the patience and help.
     
  20. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The need for a snubber diode is related to the rate-of-change of coil current vs time (Ldi/dt). In a circuit where the driver transistor turns off abruptly (instantaneously), isolating the coil, the diode is need to provide a path for the coil current to flow as the energy stored in the coil's magnetic field is dissipated. If the transistor turns off slooowwwly, like this one does, then the current created by the collapsing magnetic field just adds to the collector current and flows to ground through the transistor's collector-to-emitter path as it turns off...

    STIFF POWER supply

    [​IMG]

    Not so STIFF Power supply

    [​IMG]
     
Loading...