Tutorial - Use a 5V Relay to Disable You Doorbell

This thread will show you how to use a 5V relay and raspberry Pi to temporarily disable your doorbell. (on command, or perhaps, by schedule)

Originally, (and perhaps still to come) I wanted to configure openHAB to trigger events (rules) when my doorbell was pressed. (For example, mute SONOS, flash the shop lights etc. However, the doorbell trigger wires are not accessible as the doorbell box is sealed inside the drywall. So I have parked that that for now. Instead, I made a way to disable the doorbell which is great when you do not want to be disturbed or if you have hardwood floors and are dog sitting… :):smiley:

I am running openHAB2 on a Raspberry Pi3 and recently started to explore and use the GPIO pins and a 5V relay board (to control my landscape wiring).

Prerequisite:

install the GPIO bindings (using Paper UI)

Here is my Services/GPIO.cfg

sysfs=/sys
debounce=10

My door bell is powered by a 16V transformer which is wired to the side of my electrical panel. 2 wires come off and run up to the bell/buzzer (black and white).

I used a 5V relay that is controlled by the GPIO pins on the Pi, I am now able to cut power to the doorbell.

I wired it in a Normally Open position, so that the doorbell will default to “ON” or working. To do so, used the C and NO terminals in the relay.

I chose to use GPIO # 13 which is pin 33.

Here is a quick diagram:

OpenHAB-Doorbell_Disable

Items file

Switch GPIO_DOORBELL_POWER "Doorbell Power"  { gpio="pin:13 force:yes activelow:no" }

Sitemap

		Switch item=GPIO_DOORBELL_POWER

Now I can toggle the switch “Doorbell Power”. I could also incorporate this into a rule file for quiet hours.

I am still interested in detecting when the doorbell has been pressed (assuming it is enabled)…
I am going to look into whether i can use a voltage sensor that monitors the transformer to detect changes in voltage.

If anyone has suggestions that does not involve cutting open my drywall, they would be great to hear.

I have implemented door-bell detection.
I have used an enocean device that detects a range of low-voltage current and uses that current to send a telegram to my enocean USB stick.
I have put this little cube into the device that is mounted to the wall and holds the Bell and the hand-piece for talking to the person at the door.
Basically you can install it anywhere that you have access to the wires that trigger the actual bell. I am sure the Bell is not behind drywall.

I can’t tell you which device exactly it is because it is in the casing on the wall but it is a small white one. After some googling i think it is something like this:
https://www.sensocasa.de/Sensoren/Logik/Spannungsgesteuerter-Funksender::248.html

Sorry for German site.
I think it is triggered on the 12V doorbell voltage if I remember correctly.

Darm, because that is my next project. I literally just started researching that today. My big outstanding question is figuring out what voltage it runs at so I know whether I can safely hook up an RPi 0 or use one of my spare Arduino Unos.

I’m not great with diy electronics so it is not clear what I can safely plug into what. But my thought was I would wire the two wires coming from the button to the pi/Arduino and when the circuit is closed or opened signal oh. I can get to the bank of the doorbell itself no problem and I’m successfully doing something similar in my garage. But in my garage, the Pi is providing the power and in this case the doorbell will.

RFXCOM and cheap Kerui Doorbell button = unlimited possibilities. As I have multiple tablets around the house running habpanel. I use the button push to play back audio depending on where I am in the house.

I use an arduino to monitor my doorbell. The transformers (in the US) are 16v as far as I know. Mine is and that seems to be standard. The important part is they are AC not DC. I created a little circuit for that.

I got a small 12v reed relay, small bridge rectifier, 12v regulator and a capacitor and soldered them to a small breadboard. I don’t recall the capacitor value as I just experimented until I was happy with its performance but it was relatively small. You could probably use a single diode and a bigger capacitor also.

A traditional doorbell circuit is simple. Voltage travels from the transformer, to the button, through the button when pressed to the electromagnet in the bell itself and then back to the other side of the transformer. My circuit is simply added in-line somewhere… frankly anywhere. Until the button is pressed, the circuit is broken and no power is moving. When the button is pressed, power starts traveling through the circuit which energizes the bell’s electromagnet as well as my tiny circuit.

Rectifier bridges have two ac input lines, cut the doorbell circuit someplace and put one side to one and the other side to the other. The output of the bridge is + and - DC 16v minus usually around 1v drop for the forward voltage of the diodes so assume 15v. You can do whatever you like with this 15v. In my case I simply wanted it to short an arduino pin to ground. Easy way is a relay but 15v relays are hard to come by so a 12v regulator goes in-line. Then enters the capacitor. Rectified AC is a square wave instead of a sign wave. As such, the relay will buzz like a bee as it slaps open and closed super fast. Add a small maybe 60 or 100 microfarad capacitor to smooth this square wave out and you are in business.

This was how I did it. I’m not an electrical engineer so I’m sure there are likely 100 better ways but it works and has for years. Actually, I have thought of like 3 more ways to modify this circuit while typing this.

As for powering the pi off of it… not going to be easy. Doorbells can drain a little power through which is how they power the little lights in the buttons. That’s power leeching through the electromagnet coil of the bell. Not nearly enough to move the hammer but enough to power a small light. The more power that travels, the more likely your hammer will move even slightly. Most importantly, the more heat will be created in said coil. My inverter based Heat Pump actually uses this induction coil concept to warm the oils and refrigerant in cold temps… neat idea if not somewhat of a misapplication of an induction coil but that’s my opinion. I digress. Your next problem. is that the light is usually shorted across the button but is high resistance so low current. When you push the button, you have a lower (nill) resistance through the button so the light goes out and the bell rings as electricity follows that shortest path. Your pi would power down every time you push the button so you would need a battery that would slowly charge or a large capacitor long enough to hold it until your wild grandchildren let go of or stop playing sos on the button 5 minutes later.

My suggestion, if at all possible, is to tap in right at the doorbell transformer which is often near the power box. You could at this point either find an additional source of power or run two new wires off of the transformer to an independant circuit that powers your pi.

2 Likes

My Pi (running openhab) is right next to my main panel and thus right near the doorbell transformer. (all easily accessible)

So if i can tap in and capture the doorbell, I will be in business. I will use your post as a jump-off for topics to google and read more about. Definitely sounds promising!

Thank you

I have been using my doorbell automation for a year or so now…

So what I did was to hack the siemens intercom doorbell.
This device has a button for opening the door as well as a inbuilt speaker. So its an easy hack, to open the door connect a relay in parallel with the open door button on your device. To find out is someone is ringing the doorbell I used a 2usd mic shield for arduino hooked up in parallel with the speaker element on the intercom. This is then wired to my GPIO on rpi as an input.

So whenever I have guest over or lost my keys I just ring the doorbell in a specific order and my doors open… Works brilliant :slight_smile:

Only thing I am still considering is to install a phone that is hooked up to the doorbell so if I am not home it would actually call my phone… Now I just get push notifications, but I have no idea who was at the door…

More in this thread

Thanks @Moxified and @skatun for the two different approaches. It certainly gives me a lot to think about. It might just be easier to replace the doorbell entirely rather than try to wire something up inline. Much to ponder.

I have an optocoupler to detect pressing of the doorbel. A rule then shows the last time the doorbell was pressed.
The bell as well as an arduino and my raspi are in a hall closet so pretty easy to wire up

1 Like

How did you wire that one?

It occurs to me that I might be overthinking things. The one job a doorbell has to do is to make a noise. I already have some spare sound sensors like these. I can turn the sensitivity way down and house it and an Arduino or RPi 0 inside the bell case itself. I think it should be pretty reliable and I can build it with parts I already have.

The Magazine “ct-wissen-smart-home-2017” has an article about doorbell with optocoupler@pi.

image2image1

1 Like

Hi Rich - Neat idea. Any idea what kind of sampling rate would be needed to detect a short ring of the bell? (500ms?)

I am not familiar with the “cost” or impact of running a sensor with a high sampling rate. What kind of setup would you be looking at?

I don’t know but in the experiments I’ve run in the past on an Arduino is plenty fast enough (dozens of milliseconds) to detect a doorbell ring. On my Pi 1 I use a 100 msec polling period which would also be plenty often enough to detect the door bell. But if I used a Pi 0 dedicated to this one job I could probably get that down to 20-30 msec.

Of course the faster the poll the more power it will consume so if this needs to be battery powered a shorter period is not a good thing.

I was actually pondering whether I should do some filtering on the sensor controller itself to only report if it senses two loud noises within 1 or 2 seconds.

But no matter what, a sampling rate half the typical ring length is all you need. Of course, I’ve no idea what a typical ring length is. I’ll need to do some experiments and tracking.

1 Like

This was one of the other ideas I thought of while writing the post :slight_smile:

At the time I focused on things I could source locally at radio shack as shipping from mouser or something was 10 times the cost of the component. Well, radio shack is gone so if I were to do it again, I might try the optocoupler route. It looks simpler.

1 Like

Primary (diode) side parallel with the bell and an antiparallel diode (as it is AC), with a suitable series resistor, the secunday site with a small capacitor and (if desired a pull up resistor on an arduino pin.
Sure there will be a few pulses but thats ok.
I once had the idea to use it to trigger a flipflop, but it works well without

that is indeed exactly how i have done it, be it that I added a small resistor to smooth the signal

Hey guys,

just found that thread, because I want to do that too.

  1. Disable the doorbell via rule.
  2. Send notification (telegram+picture). (I am still looking for a door spy, which also works with a static jpeg; I got 2 different sounds at my door bell - one ist at the main door and the other at the apartement door; still need to find out how that works)

Do you have any hints what to use/get? I have several Pi 3, but they are quite far away from the bell. Best would be a little circuit board I can put in the wall, where the bell is. I do not have any experience with Pi 0 and Arduino boards.

Thank you in advance.