“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.”
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.”
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.”