Smart Door Bell Project

I have already developed my own smart doorbell as part of my smart front door project and it incorporates this classic, mechanical 'ding dong' doorbell unit. I left this in place because it's very distinctive, quite loud and my family are familiar with the sound it makes:

The challenge being addressed here though, is to make sure we can hear this doorbell everywhere in our home by replicating the sound it makes in other locations. They most important being outside in our garden but, it also makes sense to replicate it in our conservatory (on the back of our house) and possibly in our bathrooms too. I'm also tempted to replicate it in our kitchen as I often play music in there quite loudly whilst I am cooking.

Because my current doorbell is connected to my contextual smart home, I get a notification if the doorbell is pressed and it will also use our Amazon Echo devices to make an voice announcement.

If we are all outside in the rear garden during the summer months it would also be nice to get the doorbell sound repeated in our garden and also in the conservatory. This would only happen if our house was occupied though. The advantage of this approach is that it works for everyone and has no dependencies on smartphones and other devices. This project is going to use the existing Arduino installed in my conservatory and smart garden lounge.

The project goal is to build another of my smart home building blocks, to enable simple audio capability at very low cost and which also works in challenging environments, such as outside. The plan is to use sealed enclosures with waterproof speakers for the garden room installation, to deliver doorbell repeater functionality. I will be very reliable too, with no cloud dependencies and using a protected 12V dc power supply.

Design

I did look at using an 'off the shelf' doorbell sounder, like this one from Amazon. I even bought one but it simply didn't work, so I sent it back. This got me thinking of better ways to do it and solutions that are much more reliable too.

My design works on the principle of using Pulse Width Modulation (PWM) on an Arduino output pin. The frequency can be set using the Arduino tone library but the amplitude cannot be adjusted. This means my doorbell doesn't fade out like the physical chime does but I'm not too worried about this. The tones will then be amplified and played out via a suitable sounder or speaker.

To get my repeaters to sound exactly like the existing doorbell, I recorded the sound it makes and uploaded it into Audacity. This software allows you do do frequency analysis, to determine the main frequencies used in the two-tone sound. The frequencies were 736Hz and 586Hz.

Note:  Arduino processors are not multi-tasking, so they whilst they lend themselves well to short audio feedback, they are not so useful for continuous audio playback as they can only really do one thing at a time. That said, if no tone duration is specified the tone will continue until a call to noTone() is made. So a continuous alarm tone will requires one short call and the processor is then free to do other things.

Implementation

Hardware

The circuit is designed to be easily connected to my smart home building blocks using a 4-way Molex connector. As such it uses 3 connections: +12V, GND and an output pin. It also works with a 5V supply but, a higher volume is achieved using 12V.

I typically use my Smartisant Arduino PRO1 PCB (V3) to connect various smart sensors and to provide the secure control and reporting functionality. This PCB is connected using a cheap Ethernet module. This is one of my smart home building blocks and it provides a huge amount of reusable functionality at a very low cost. It provides great performance and is incredibly reliable too. I can also populate the PCB with just the parts required for each project, so it is also very cost effective. It also exposes 12V to some of the 4-way Molex connectors.

The circuit uses a 2N2222 transistor to drive the speaker via capacitor C. The value of C is chosen to allow all the required frequencies through. In this case, I'm using a 220uF capacitor. The 1KΩ resistor is to stop excessive noise from the open-collector output when programming the Arduino or when it is reset.

Initially, I used this 53mm diameter, 0.5W, 8Ω speaker.

I also tried Piezo sounders and they worked but, getting enough volume out of them was challenging.

Software

The code to generate the doorbell ding dong is very simple and uses the in-built Arduino tone library functions:
tone(SOUNDER_PIN, 736, 600);
delay(700);
tone(SOUNDER_PIN, 586, 800);

Over the years, I've developed my own set of smart home libraries for Arduino, which enable me integrate any sensor or device and allow query and control them via my unified communications protocol. This means my Home Control System can 'see' when the doorbell has been pressed and send an encrypted JSON event to all slave processors that support this doorbell repeater functionality.

Testing

This is what the end result sounds like using the 53mm speaker:

It hasn't got the depth of tone that you get with the mechanical doorbell or the reverberations but, it's close enough and still recognisably our doorbell.

For really quick testing, I also use these 5V passive sounders. They cost very little (about 50p) and just need a 2-wire connection to an output pin and ground. They are not very loud but they allow me to test end to end functionality before installing a more powerful sounder.

So far, I've deployed two doorbell repeaters, one in the conservatory and one in my smart garden lounge. When the front doorbell is pressed, the repeaters sound almost instantly but only if the House and/or Garden are occupied.

Waterproof Marine Speaker

Because one of my installations is going to be outside, I'm also testing these Herdio HMS-5104 speakers. I just happen to have a pair sitting around from a previous project. These are 4" speakers, 4Ω impedance and rated at 80W. These speakers give a much richer/softer tone. I could quite easily integrate one into the face of the enclosures I use for my external projects or into a dedicated enclosure.

Summary

This is actually a really simple project to implement as it builds upon smart home hardware and software that I've already put in place. Whilst it is being used to replicate our doorbell sound around our contextual smart home, the functionality could be used for many types of applications, including alarm sounders, etc.

I know I could use smart speakers to do what this project does but, that would mean leaving them powered (and in some cases outside in all weathers) all year round. The solution described here is weather proof, much more reliable and much cheaper, using local networking only. It has no dependencies on 3rd party products or services and this is very important to me.

This project is a really good example of how important occupancy is to the contextual smart home. It allows conditional doorbell repeaters to work, resulting in a much better user experience.

The next steps are to test what other use cases are possible and improve our quality of life, the primary driver for all of my smart home work.

Examples

My @smartest_home will occasionally tweet when the front doorbell is pressed.

Further Reading