This project describes how to create an electronic doorbell chime using a Raspberry Pi Zero WH running Raspberry Pi OS Lite, an Audio Hat and a step down voltage converter. No soldering is required. And it is a relatively easy project.
The electronic chime fits in a mechanical chime case and uses the wiring for the chime to power the Raspberry Pi. The Audio Hat comes with two speakers.
I made the chime work with an Arlo Doorbell, but it should be compatible with any Smart Doorbell supported by IFTTT, just change the trigger in IFTTT
Parts
Raspberry Pi Zero WH (with Headers)
8GB MicroSD card
Low profile heat sink with fins 14mm x 14mm x 4mm (not the gold flat ones, that don't dissipate heat effectively)
Old Mechanical Wired Doorbell Chime with 16 Volt Doorbell Transformer
Waveshare LM8960 Audio Hat
16V AC too 5V DC step down converter
KNACRO AC-DC to DC Converter AC 16-28V DC 9V 12V 24V 36V 8-40V Step Down to 5V 3A 15W Power Supply Module
If you have a 24V transformer, then get 24V AC to 5V DC step down transformer
Wiring twist nuts in various sizes
Tools (all reusable)
drill
power tool to remove excess plastic from mechanical chime base
voltmeter
5V Raspberry Pi Power Supply (temporary, used during setup)
thumbtacks
CAUTION: Speakers have very large magnets and some small magnets. Both are capable of erasing a microSD Card, destroying a raspberry pi and the FM Receiver. Keep the components far away from the magnets.
Step 1. Setup Raspberry Pi Zero WH
In Step 1 when imaging, Choose Raspberry PI OS Lite (32 Bit), but it doesn't really matter which Raspberry Pi OS you choose
Since this is in effect an embedded system, the desk top is not needed
In Step 1, be sure to setup SSH and Wi-Fi
Use a 5V Raspberry Power Supply until it is replaced with the step down converter
Don't put it in a case, this is done below
Step 2. Add Waveshare WM8960 Audio Hat
Poweroff Raspberry Pi by doing the following:
$ sudo shutdown -h 0
Pull the power cable frrom the Raspberry Pi
Put the hat on the Raspberry Pi.
Put the power back into the Raspberry Pi
Open terminal window and login
Install the Audio Hat Driver driver
$ sudo apt install git -y
$ git clone https://github.com/waveshare/WM8960-Audio-HAT
$ cd WM8960-Audio-HAT
$ sudo ./install.sh
$ sudo reboot
Check if driver is installed
$ sudo dkms status
wm8960-soundcard, 1.0, 5.10.63+, armv6l: installed (original_module exists)
Get doorbell sound, You can use any doorbell sound you want.
$ wget https://github.com/dumbo25/electronic-doorbell-chime/raw/main/dingDongChime.wav
aplay shoould be installed with Raspberry Pi OS. If not, use:
$ sudo apt install alsa-utils
Play the doorbell
$ sudo aplay -Dhw:0 dingDongChime.wav
If volume needs to be raised or lowered use:
$ sudo alsamixer
Step 3. Get Software and Test
If noot logged into Rasppbery POI, Open terminal window and login
bottle.py is a. very simple, fast web server
$ wget https://bottlepy.org/bottle.py
Get chime.py
$ wget https://raw.githubusercontent.com/dumbo25/electronic-doorbell-chime/main/chime.py
Check if it works
On the Raspberry pi run the command
$ sudo python chime.py
Open a browser, and enter in the URL box:
http://♣your-raspberry-pi's-ip-address♣:8081/
The doorbell sound should play
Step 4.Find your Gateway's Public IP Address
To view my ISP's gateway, I enter 192.168.1.254 in a browser's URL. To find the gateway's public IP address, I navigate to the Broadband, and Status tabs. The Public IP address is Broadband IPv4 Address.
Step 5. Port Forwarding
In general, your gateway should block all in-coming requests.
Use HTTP and port forward to 8081 or another poort of your choosing
NOTE: When I port forwarded 8081, my gateway said port forwarding might break my internet service. It did not. But the chime rang when no one pressed the doorbell. I assume this was either my ISP sending the gateway packets or someone reading this guide and sending me doorbell presses. So, I changed to a random port. This required a change to Port Forwarding, chime.py and the IFTTT applet. You should pick a port in the user or registered port range:
Ports 0–1023 – system or well-known ports
Ports 1024–49151 – user or registered ports
Ports 49152–65535 – dynamic / private / ephemeral ports
Step 6. Arlo Doorbelll and IFTTT
If-This-Than-That is a web-based service allowing events on one device to trigger actins for another device. IFTTT is a simple way for devices to communicate.
If you don't have one, create either a free or paid account on IFTTT
Create an applet
Click Create button
On If-This, click Add
Click on Arlo icon
Click Detects Button Press
Add Your Arlo Account
Your Arlo Account and Doorbell should appear
Click Create Trigger
On Then-That click Add
Select Webhooks
Click Make a web request
Enter URL = http:<public-ip-address>:<port>/
Method = Get
Content = text/plain
Click Create action
With chime.py running, press the Arlo doorbell and see if the doorbell plays the wav file.
Step 7. Create a service to start chime.py on reboot
The directions are contained within the script
Or download the script using:
$ sudo wget https://raw.githubusercontent.com/dumbo25/electronic-doorbell-chime/main/chime.service
$ sudo chown root:root chime.service
$ sudo cp chime.service /lib/systemd/system/.
Step 8. Start chime.py automatically using
After any changes to /lib/systemd/system/chime.service:
$ sudo systemctl daemon-reload
$ sudo systemctl enable chime.service
$ sudo systemctl start chime.service
$ sudo reboot
Wait 2-3 minutes for reboot to complete, and then log back into Raspberry Pi
Ensure the chime.service in systemd is enabled and running:
$ systemctl | grep running | grep chime
$ systemctl status chime.service -l
If there are any issues with starting the script using systemd, then examine the journal using:
$ sudo journalctl -u chime.service
Press the Arlo Doorbell to ensure it rings
Step 9. Shutdown Raspberry Pi
Shut down the Raspberry Pi using the command.
$ sudo shutdown -h 0
Unplug the microUSB power to the Raspberry Pi
Step 10. Check doorbell transformer
My doorbell's transformer is in the attic
This guide requires a 16V AC transformer
If you have 24V AC transformer, then you will need a 24V AC to 5V DC step down converter
This is NOT the steps described below, but this approach may be easier:
I hung the doorbell parts on the wall near the mechanical chime's junction box.
It is probably best to wire up the step down converter to the transformer.
Attach the remaining parts to mechanical chime's back.
Thread the micro USB cable through a hole in the mechanical chime
Attach the mechanical chime to the wall.
Step 11. 16V AC to 5V DC Step Down Converter Power Supply
I used thumb tacks to keep everything in place near the chime's junction box (see image above)
Cut a USB to Micro USB cable leaving about 3 inches on the micro USB end. Keep the micro USB cable end.
Using a voltmeter and the images on the left figure which wires are ground and which are 5v.
I used a wire cutter and exacto knife to get down to the wires. In my USB cable, Red is Ground and Black is 5V. Your cable may differ. Strip 1/4 inch from each USB wire (see image below on left)
On the step down converter strip 1/4 inch from each wire.
Use electrical twist caps to connect micro USB GND to step down converter DC - (aka GND), and micro USB 5V to Step down converter DC 5V +.
Remove the wire from the mechanical transformer and label ass T and F. The T and F wires are either both blue or both white, but it doesn't really matter.
The Arlo Doorbell and the step down converter are powered by the same blue and white wires.
Twist the T and F wires with one wire from the step down converter on the AC side.
If T&F are white then cut the blue wire strip 1/4 inch from each end and twist together with the other AC step down converter wire.
Check that the Arlo still works
Insert the micro USB Connector into the Raspberry Pi, and it should power on.
USB to Micro USB cut apart
Step Down Converter
Red wires go to blue and white doorbell wires
Yellow (+) and Black (GND) wires go to USB connector
Step 120385. Prep chime back
In the image on the left, the bottom shows the chime's back wiht everything intact, and the top shows the deconstructed back.
Remove the chime cover
Disconnect the wires to Trans & Front
Remove the chime back from the wall
Remove the top and bottom metal plates
Remove the wiring box
Using a dremel or a saw cut the plastic boxes down (image top)
I used a grinder and a sander to flatten the back
Alternatively, a sheet of plexiglas could be used for the back. They key to making a plexiglass back if to ensure it is the same size as the back, and notches arre cut in the plexiglas to align with the covers tabs. The tabs keep the cover in place
Step 13. Attach parts to Chime's Back
The step down converter goes in the chime's junction box and not on the chime's back
Remove the micro USB from the Raspberry Pi, and thread the micro USB through the chime's back
Place the Raspberry Pi and speakers so everything fits. Mark and drill holes for the parts
Use bolts, nuts and standoffs to attach the Raspberry Pi and Speakers
Thread the micro USB through the backside of the chime's back
Put the step down converter in the junction box
Attach the chime's back to the wall
Insert the micro USB into the Raspberry Pi
Put the chime's cover on
Add key
Change the call to be
https://maker.ifttt.com/trigger/{event}/json/with/key/<your-key>
port forward 443 and not 80
to Edit ifttt applet, goto ifttt.com, select an applet, then click the settings button
Background:
I have a 16V AC mechanical doorbell chime, and an Arlo wired video doorbell. Everything on the Arlo doorbell and app works fine except the Arlo Doorbell cannot "ring" a mechanical chime.
The Arlo App settings are correct: Traditional Chime = Mechanical, Silent Mode = Off, Bypass Mode = O, there are no Arlo temperature warnings, Power at chime = 16V AC, Power at Arlo doorbell = 16V AC.
I've contacted Arlo support multiple times both by calling and emailing.
I paid an electrician to check the wiring.
I bought a second Arlo after frying the first one by doing a factory reset.
Do NOT do a factory reset on the Arlo Doorbell. I did this on the first Arlo Doorbell and it died.
And, I tried three different mechanical chimes and two different transformers.
The mechanical chime works until the Arlo PowerKit is inserted, and then the chime doesn't make a sound.
I tried bypassing the Power Kit.
So, with the two Arlo Doorbells, the electrician, multiple chimes and multiple transformers, I've spent about $500 trying to get a supported mechanical chime to work with an Arlo doorbell without success.
References:
need to follow format for references
<site>, <author>, <webpage with link>, <description>
WAVESHARE, WM8960 Audio Hat, technical description of audio hat with installation instructions
bottlepy.org, bottlepy.org, developer site, download and installation
indianbeantree, Controlling Anything With Alexa And Raspberry Pi, describes Alexa, IFTTT to control Raspberry Pi
Circuit Basics, How to Control the Raspberry Pi's GPIO pins remotely, uses Alexa, IFTTT to control Raspberry Pi
If-This-Than-That, IFTTT, web based utility to trigger an action when another action occurs
Alternative Solution 1:
A simple workaround is to create a routine to have an Amazon Echo play a doorbell sound when the Arlo Doorbell button is pushed.
Open Amazon Alexa App on smartphone
Go to Home, 3 line Hamburger Menu, Routines, and then +
Enter Routine Name = Arlo doorbell press
When this happens, Smart Home, doorbell, Doorbell, when doorbell is pressed
Scroll to Sounds, Bells and buzzers, select one
Alternative Solution 2:
An alternative is to connect the Arlo Doorbell to multiple Echos and have the chime play on whichever Echos you want.
Open Amazon Alexa App on smartphone
Click Devices icon
Click All Devices
Select Arlo Doorbell
On the Settings Page
Enable Doorbell Announcemeents
I prefer this approach, however, I don't want Alexa to say anything, just ring the bell (Post on Arlo Community)