Smart Doorbell and Video Intercom System

By David Crookes. Posted

Smart doorbells have boomed in popularity in recent months, allowing homeowners to see who has dropped by without having to swing open the door. They can, however, be a little one-way: when people ring the vast majority of such devices, you can see them but they can’t set eyes on you.

“Not many smart doorbells have a screen for the visitor and I thought creating one would be fun,” explains Aaron Tainter. Deciding that his project could also double as a video intercom system if he produced more than one device, he soon got down to work. He figured the system could connect to a virtual meeting room with the touch of a button and send a notification to a mobile phone, allowing a video connection to be made.

Aaron is a software engineer who enjoys making hardware projects in his free time and teaching others how to make them through his YouTube channel, Hacker Shack.

“For this project, I knew that I would need a computer that was small, had input for GPIO pins, could connect to the internet, and could handle video streaming,” he reveals. “A Raspberry Pi seemed like the perfect choice – they’re really easy to build with and they integrate with everything.”

Avoid putting sensitive data on the doorbell’s Raspberry Pi because it could be compromised by anyone gaining access to the USB port

Opportunity rings

Aaron approached the project in his usual way. “I always start by looking at the electronic components needed for the core features and any open-source software projects that might make the project easier to build,” he says.

“Once I’ve figured out the basic systems design and done some initial experiments with software scripts to verify that the project works, I design a housing to fit around the parts. For this project, the most important feature for me was the audio-video I/O. I had to investigate a few different options for hardware parts to make sure that the audio was good enough for a video call.”

The smart doorbell’s enclosure was designed using CAD software and it was outputted to a 3D printer. “The most challenging part of this build was finding parts which would all work with the Raspberry Pi for video calls and then getting them to fit inside a small enclosure,” Aaron reveals.

“Thankfully, I had my mechanical engineering friend help design the 3D printed enclosure, but it took several revisions to get all the components to fit together after being printed. The tolerances on my printer were great, so we had to do quite a bit of sanding and filing to make everything fit together.”

Before attaching Raspberry Pi to the case, Aaron plugged the mic into a USB port. He then connected the camera and speaker, with solder applied to the power wires

Hello world

A momentary button with an LED was fitted along with a Raspberry Pi 3 Model B connected to an LCD screen, camera, USB microphone, and a STEMMA speaker that comes with a plug-and-play amplifier. Then it was on to the coding. “The software for this project was relatively simple,” says Aaron. “It took some experimentation to get all of the electronics configured with the device, but the main script was only a couple of hundred lines.” He repurposed some code from an old Raspberry Pi smart security camera that he built a couple of years ago. He used the free encrypted video conferencing app Jitsi Meet to create the video calls.

So how well does it work? “The video stream playback was a little choppy on a Raspberry Pi 3 during extended use, but I think it might have been because the video call website that I used sucked up too much CPU,” Aaron reckons. “I haven’t tested it, but a Raspberry Pi 4 might work better. People may also want to try implementing their own webcam server and streaming at a lower resolution to optimise performance.”

Once everything was fitted, Aaron connected Raspberry Pi over VNC to enable the components and video calling

See also:

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.