Easy Doorbell Integration

project_doorbell

#1

I had been searching for a way to add in my existing doorbell in to SmartThings. There were lots of posts on the topic and creative solutions, but the simplest that worked for me I read in a post from christopher.lawrence.

It was as easy as purchasing an AEOTEC Dry Contact Sensor Gen5.

The device paired as a Z-Wave Door/Window Sensor without any issues. I don’t believe I had to exclude before including. I’m pretty sure it paired as easy as setting my iOS app to look for the thing and then pulling the battery tab. I might of needed to push the inclusion button on the devices…either way, it paired easily which isn’t always the case for me.

Once I had the device paired, I wired up some 18 gauge wire to the device and tested it with a 1.5V AAA battery. I just held the negative wire to the negative side of the battery and the positive wire to the positive side of the battery. To my surprise the sensor change from ‘closed’ to ‘open’. Looks like this is going to work.

I didn’t bother turing the power off to the doorbell, but I would imagine that would be a good idea (not sure why through), and just hooked my positive wire to the transformer side and the other to the front.

I couldn’t place the sensor in the doorbell box, so I just have it placed on top…but it doesn’t look too out of place and I don’t think anyone will lookup that way anyway…

I tested with some SmartThings Rules and with IFTTT and all works well. What I think is really great is that this sensor will pickup even a quick push of the doorbell button and SmartThings recognizes that quick push. I know some people were mentioning that they had issues with short pushes and the sensor they were using recognizing that push.

I’ll let you know how it works over time and how the reliability is. I’m not sure why I am so excited about adding this into my devices, but for me it adds a lot to our security system as there is a trend of knocking or ringing to check if someone is home before you decide to case the place. Lots of other useful applications as well.

I wouldn’t have figured this out without this community, so thanks to everyone who has posted about this type of integration.

DING DONG!


Doorbell
(Lee Florack) #2

Great idea! I’ve ordered my dry contact switch and I will be hooking it up when it arrives. Thanks! My only concern is the size of the switch, but I may be able to fit mine inside the ringer box. I’ll be using Rule Machine to integrate this into SmartThings.


(Joe) #3

The thing doesn’t get fried by attaching it to the transformer? Do you happen to know what the output is from you’re transformer? Every time I tried to hook a dry contact up the way you’re doing it, I lost $50.


(I got a hair cut from Alexa) #4

I think you’re right Keo. You’re supposed to connect the sensor to a dry contact device like an old fashion wired reed switch or something powered, but that doesn’t provide power to the closure itself. Connecting across the terminals like that basically runs the 16v (or what ever your transformer provides) through the sensor…instead of the sensor providing power to sense the dry contact closure. Perhaps that particular brand/model sensor has some “protection” built in to keep it from smoking. The ones I use are cheap and would smoke too if connected like that. :wink:


#5

Hey Keo. Its running 16V.


#6

Hi N8XD;

I’m sure you are right and maybe I’m just getting lucky with that hookup. However, I would like it to be correctly wired for safety reasons.

Can you point me in the direction of what I need to place between the dry contact sensor and the transformer?

I was just following the instructions I had for another doorbell sensor device which looked liked this:


(I got a hair cut from Alexa) #7

I’m not suggesting that you are doing it right or wrong, if it works and it keeps working, who can argue with that right? …it’s just most dry contact sensors are different from that doorbell sensor in the diagram, and require something attached that clicks on and off without supplying any power. I don’t have any experience with the model you are using. I did look through the instructions for the Aeotec model you posted and it does suggest the proper method is to connect it to a dry contact type of sensor.

In the real world, that would look something like this…and you would place this next to the solenoid that “dings” the tone bar so that when activated, it’s magnetic energy would cause the magnetic reed switch inside to open or close.


#8

Thanks N8XD.

Thanks for the added information. I’m sure you are correct in understanding the proper wiring and that there is either something with the Aeotec Dry Contact switch or my doorbell that is allowing it to work where it otherwise shouldn’t.

My doorbell is digital, so I not have a solenoid that is dinging the soundbar. It’s just playing some digitized chime file. But, I understand what you are saying now.

I contacted Aeotec and shared my hookup just to see if they have any insight on why it is working. If/When I hear back from them I will share what I find out.


(I got a hair cut from Alexa) #9

Nice, I’d be interested in what they have to say. My guess is the 16vac power is flowing through the sensor and when the doorbell is activated the sensed voltage goes to zero. It shows closed normally, but shows open for a moment when the doorbell is pressed, right? It’s a good thing it works this way if you don’t have a solenoid to pick up on with a reed switch. :wink:


#10

Yes.

When I tested with a multimeter that is exactly what happened.

Thanks for all the information, it’s really appreciated and I let you know what Aeotec says. I’m assuming I will be working one a better wiring approach.


( I hate Mondays) #11

Wouldn’t a zigbee/z-wave push button replacing the doorbell button and a micro relay inside the alarm box to “push” the button work? One would end up with a wireless doorbell button (no wiring yeeey), the “know” of when the button is pushed and - behold!- the possibility of also triggering the door bell. Imagine a presence sensor ringing your door bell. No button at all LOL. Confuse the heck out of visitors…


( I hate Mondays) #12

One way to ensure the safety of your dry sensor is to use a 100Kohm (start with 100K and go down if that doesn’t work) resistor in series with it to ensure a current limit that won’t fry your sensor. If the dry sensor is polarized (i.e. has a plus and a minus), you may also want to add a diode bridge to ensure polarity is not reversed (since a transformer is involved, we’re talking AC - meaning the voltage swings from -X volts to +X volts 60 times a second). Maybe some sensors are polarized and don’t really enjoy a reverse polarity on the terminal? Or maybe it’s just their internal impedance is low enough that those 16V create too much of a power load on it, in which case the resistor should fix it.


(Joe) #13

It’s been 20+ years since my High School electronics class. Would we need (1) 100Kohm resistor on both positive and Negative?


( I hate Mondays) #14

No, just one in series to the sensor. The trick is to not overload the resistor, it has a very low power dissipation capability. You want to keep it high and for 16V you probably want to stay over 10kohm to avoid problems with heat dissipation. I don’t know the internal impedance of neither the source nor the sensor. Start big, go down if it doesn’t work, don’t go below 10k. Or do so at your own risk ;)) 16V at 10k total impedance is about 25mW of power (U*U/R)


( I hate Mondays) #15

Also, is the sensor polarised? Does it have a + and a - terminal?


(Chris Fichter) #16

Most systems from where I am from use 24 volt Transformers for door Bells. I just used this 24 volt relay from a furnace to attach to a cheap window / door sensor


#17

almost two months know and my setup is still working with the Aeotec Dry Contact. Not sure why it doesn’t get fried, but it doesn’t…still working.


( I hate Mondays) #18

Ok, to shed some light on the subject, here’s how the sensor “probably” works. There are two variants, don’t know which one Aeon uses, but essentially, they do the same. However, which they use may impact the complexity of the circuit.

chris2vic is correctly asserting that a relay is a cheap and effective way to go, though you may need to match the relay to your transformer voltage and ensure you are being provided the proper current (AC in this case).

Phobiac is providing an essential piece of information here:

My doorbell is digital

What that means is that his line is most likely using DC (not alternating current) which may explain why his sensor didn’t fry. It never saw a reverse voltage on it’s terminals, plus the impedance of that digital door bell is much higher than that of a coil, meaning a lot less of the total voltage falls on the sensor.

On to the sensor, there are two variants I could think of: pull-up resistor and pull-down resistor.

To explain the parts:

  • R1 and R2 are resistors of unknown value.
  • U1 is an inverter logical gate, converts the input into a 0/1 value. When the voltage at input is over the threshold, the output will be very close to 0V, when the voltage at input is under the threshold, the output will be very close to Vcc (typically 4.5V - 5V in TTL circuits).
  • U2 is a buffer logical gate, does the same as U1 but without inverting. Low voltage in outputs a 0V, higher-than-threshold voltage in outputs a close-to-Vcc voltage.
  • BT1 and BT2 are battery holders inside the sensor
  • S1 and S2 are single throw single pole switches - your door bell switch

The pull-up resistor variant uses R1 to keep the input voltage high, causing U1 to output a logical 0 (U1 is inverting, so 0 >>> 1 and 1 >>> 0 - also note that these may be reversed, it’s all a matter of personal preference - how they translate 0 = open and 1 = close or the other way around is irrelevant as long as the output of the z-wave controller is understood correctly by the user). When the switch closes, it brings the input voltage to 0V (negative pole of the battery holder), causing U1 to toggle to a logical 1. At this point, the R1 is there to protect the batteries, it should be high enough to limit the current flow between the + and - poles of the battery holder as to avoid a short circuit.

The pull-down resistor variant uses R2 to keep the input voltage low, causing U2 to output a logical 0 (U2 is non-inverting, so 0 >>> 0, 1 >>> 1). Push on the switch and that connects the input to Vcc, causing U2 to output a logical 1.

Now all these work without any external power. The power is provided by the battery holder in the sensor and no external voltage is expected whatsoever.

Due to power constraints, it is very likely that the pull-down resistor variant is being used, to avoid a constant current flowing through the battery due to the pull-up resistor R1 if the pull-up variant was used. But I am only assuming…

We are assuming that the switch is being traversed by AC current from a transformer through a coil in the doorbell.

If the pull-down variant is used, you guys may be lucky. BUT not that lucky. One would have to ensure AC current does not flow into the input of the logic gate and also that the voltage applied does not exceed its capabilities. We can do this by using a rectifying diode to ensure only one way of current passes through. We also need to limit the current and the voltage so we’ll use two resistors to slice that voltage so that the peak won’t reach over the Vcc of the sensor. We can also use a Zener diode to protect the input of the logical gate and a capacitor to slow things down.

Here’s what it looks like:

Note: SPK2 is there to show the doorbell itself, even though the doorbell is most likely mechanical. The coil pulls a bar that hits a bell, causing it to vibrate. Couldn’t find an object for that to put on the schematics, so I used a speaker instead.

Relying on the low impedance of the L2 doorbell coil, we’re closing the circuit through D2, R3 and R4. D2 is there to ensure the top side of R3 always has a higher or equal potential to the bottom side of R4. R3 and R4 effectively act as a potentiometer, splitting the voltage between them. Equal values for R3 and R4 will split the voltage applied to them in 2. C1 is there to slow things down. Or further rectify the current we’re dealing with. Since we’re dealing with AC, half of the time we’ll have current flowing through the diode D2, and half of the time we’ll have nothing (while the current tries to flow backwards). In the US, this happens 60 times per second. When current flows through D2, there will be voltage on the R4, just the same as the C1. The C1 will start charging. When the current flows the other way, D2 will stop it. At this point, C1 will slowly start discharging. The recharge/discharge time is given by the RC product, in our case R4 times C1 (there are other resistors in the circuit we don’t know the value of, like R2 so we need to trial and error here to get our timing right). The goal of the timing is to keep the gate in a stable position while S2 is open. If we don’t do this, we’ll get a lot of 0/1/0/1/…0/1 transitions. The Zener diode is there to ensure the voltage never goes over a certain value. In other words, for protection. May be optional if R3 and R4 are sized appropriately. R3 acts as a current limiting resistor too, so we can’t go too low on it.

Now, assuming the 16V people talked about earlier is peak to peak, it means the voltage swings between -8V and +8V, so on the positive half of the cycle, we’ll have 8V applied to D2-R3-R4. D2 will eat some 0.6V of it, leaving the rest of 7.4V to the resistors. Let’s assume R3 is 4.7kohm and R4 is 10kohm. If voltage on them is 7.4V, we’ll get 2.37V on R3 and 5.03V on R4. C1 will never let the voltage reach 5.03V and will pretty much average it. We only use half the time, and it is safe to apply a square root of 2 factor on the capacitor averaging, so we may see a 5.03 / sqrt(2) / 2 = 1.78V. This is where tinkering starts. make R3 2.2kohm and see if it works, if not, start increasing R4 slightly. C1 needs to be sized according to R4. Start with a 100uF and see how it works. Unfortunately, there are so many unknowns in the sensor that I can’t do the sizing for you. And, at the end of the day, this may not work at all. It all depends on how the sensor is doing its job. Also note that we’ve reversed the way the sensor works. S2 is open, you get a 1 at the digital output. S2 is closed, we get a 0 at the digital output. Reversed.

As for the Zener diode, if your sensor takes 2 AA batteries, use a 3V Zener, if you use 3AA batteries, go for a 4.5V Zener (if available) or a 5V Zener diode.

The pull-up variant is much more complicated to work with.

Also, an opto-coupler should always be used to separate circuits. Makes things more complicated still.

Conclusion:
If you have AC power through the doorbell switch, measure it and use a properly sized relay or a reed sensor attached to the doorbell coil to drive your dry contact sensor. Easier and cleaner than building electronics boards. If your doorbell is digital, you may be lucky enough that you have DC currents flowing through it and that the doorbell itself is actually using a dry contact. In which case hope your dry contact sensor is the same kind (i.e. they are both pull-up or pull-down). And with no knowledge of what’s inside the sensors, It’s a trial and error world we live in :slight_smile:

Good luck,
Adrian


#19

@ady624 Thanks for all this information / knowledge…very useful.


(Never Trust @bamarayne) #20

Can you recommend a specific relay for this? I measured my AC voltage at the transformer to 21.4 volts. I assume the 24v AC relays would work - but my concern is that as someone mentioned they were not firing in his setup when the button was pressed really quickly…

This is one that would seem to be good, again I am just worried about it not picking up quick presses…

https://www.amazon.com/gp/product/B00PZXGHZY/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A1THAZDOWP300U

BTW I found this device which I think is a good fit… but it’s not cheap…