I made a Custom DIY Zigbee Doorbell
|This little thing is a wireless doorbell I bought off of Amazon for £17, but with some blood, sweat, tears, 10p in ethernet cable, and a £6 ESP32 board, it’s now a Zigbee doorbell! This is how I made it, including the code side of things, which by the way is now live at least on my Github as a fork of the ESP32 arduino core. I’ll submit a pull request to make this all public soon, but I’m happy to say it’s all working well so let me explain.
First, the stock doorbell. It’s actually pretty cool on its own. The outdoor button part is completely wireless and battery-free. The action of pressing the button wipes a magnet past a coil of wire, which induces just enough power to let the transistor onboard pulse a bunch of data at 433MHz, which the doorbell speaker receives and plays the doorbell sound. Since this outdoor bit doesn’t need wiring or battery replacements it should be pretty reliable, even if it isn’t 100% sealed – something I might consider fixing with some silicone or RTV, but still. The speaker is a passthrough plug – kind of like a few powerline ethernet adapters actually – and inside it is just a small PCB with the RF chip, the main microcontroller, and what is either a speaker driver or op amp. It has a FULL BRIDGE RECTIFIER that converts the 240V AC into 330V DC, then this little LDO power supply takes that 330V and drops it to a stable 4.77V. Why it isn’t 5V or 3.3V exactly I don’t know.
The speaker actually has two buttons onboard, one for changing which sound it plays, and one for volume, and there’s an LED onboard that flashes when it’s playing a sound. Importantly for me, this pin here goes high when there’s a sound playing. The pin above it is the one the LED is connected to, so it pulses on and off, but the one below is just a constant 4.65V so that’s what we’ll use to trigger the Zigbee board. I should explain why I want this to be a Zigbee device though – basically I want a regular doorbell that rings when someone is at the door, but I’d also like to get a push notification to my phone too no matter where I am to know someone is at the door. It isn’t as good as a video doorbell where I can see them and talk to them, but where I live that’d be a little uncomfortable for my neighbours so this is a decent compromise.
So, how to make this dumb-bell a smart-bell? Well, this little ESP32-C6 from Seeed Studio, obviously! Its diminutive size makes it perfect for stuffing into small spaces like this. I just soldered some ethernet wires to 4.77V, ground, that switched pin, and the top switch too. That switch is used to put the board back into pairing mode if needed. It’d be a massive pain to have to open this thing back up just to reconnect it to a Zigbee network, so co-opting an externally accessible button seemed like the best choice. I’ve used a couple resistors especially to limit the voltage from that switched pin. The ESP32 runs at 3.3V so I’ve picked 33K and 56K resistors to essentially drop that 4.65V to around 3 volts for the input pin. I’ve also added an in-line resistor from the button just in case too. The board itself then just tucks in down at the bottom and that’s pretty much for the hardware, so let’s take a look at the software.
Check out the video for the software section!
So, that’s the software side, now let’s look at it in action! Pressing the button both triggers the bell to ring like usual, but I also then get a push notification to my phone letting me know that someone is at the door. Pretty sweet right! I do appreciate that this is a bit of a niche project, seeing as how most people would want a video doorbell instead of just a notification, but this works well enough for me so I’m happy, and I use projects to give me a reason to learn stuff, and in this case I’ve learned a a fair bit about how to make Zigbee devices, so in future when I want to make something a little more complicated, I can!