Smart Doorbell

doorbell press.MOV

DRAFT - not ready to build yet

I had a Ring doorbell with just the basic plan. In mid-2020, Ring raised the monthly fee. For me, it is ridiculous to pay for someone to press my doorbell. Most Smart Doorbell manufacturers have a similar priced monthly fee (e.g., Nest's Hello, Remo).

I tried to find a no monthly fee replacement and failed. Eufy has no monthly fees, but the resolution is low. Remo has one-month free trial and then goes up to Ring's prices.

I want a Smart Doorbell with no monthly fees.

So, it is time to build my own.

Step 1. Google

While the project's references come at the end, I spend a significant amount of time googling and using other search engines to find relevant projects. So, this is really step 1 of any of my projects.

I read through many projects and then keep links to the appropriate parts for my project. To a much lesser extent, I watch You Tube videos. My goal is to find what people have done, what can be done, and then decide on what I will build.

As an example, I read through about 20 websites regarding voltage regulators until I understood enough to decide on my requirements. In each site, I learned something or an idea was re-enforced through repetition. I whittled the reference list to the most pertinent. I started with the idea that I would use a step down converter, which only requires a handful of resistors. However, heat and wasted electricity is an issue). I changed to a linear voltage regulator solution. Then, I switched to a switching regulator, which is not that hard to build, uses less electricity and dissipates much less heat. However, when I measured the voltage at the doorbell it was not DC like I expected, instead it was AC. So, I flipped to a step-down buck converter.

I followed a similar process for the speakers, audio amplifier and microphone. I started by building my own. I found the speakers used in the Nest Hello, added an audio amplifier and a surface mount microphone. Later, I found the RaspiAudio and switched to that because it was so much easier.

Anyways, googling is always Step 1.

Notes:

  • I create reusable steps so they can be used on more than one project. Steps 5 and 6 are examples of reusable steps.

  • I also use ♣name♣ to represent a name that needs to be replaced by an actual value. I use this for passwords, email addresses, host names or IP addresses

  • Fair warning: In this project, I put things together; took them apart and put them back together again until it all worked. This is a fairly difficult project

Step 2. Requirements

After I have googled and learned what a Smart Doorbell can do, then I need to decide what I want it to do.

Here are my requirements:

    • Audio

      • Two-way audio doorbell to/from Smart Phone/Alexa

    • Camera / Video

      • Resolution = 1080p

      • Takes photos or videos

      • Capture video either on MicroSD Card, or home server, or cloud storage

      • HD live streaming video to Smart Phone (Android or iPhone)

      • Night vision video

    • Case

      • Professional looking case

      • Weather resistant

    • Compatibility

      • Get alert on Alexa / Echo on doorbell press

      • Talk with other person through Alexa / Echo

      • Get alert on doorbell press or motion detection alerts to Smart Phone

      • See video on Smart Phone

      • Talk to person from Smart Phone

    • Doorbell

      • Lighted doorbell button

      • Doorbell plays outside

      • Press activates inside chime

      • Activate video on doorbell press

    • Motion sensor

      • Configurable

      • Activate video on motion detection

      • Alert to Smart Phone on Motion Detection

    • Power Supply

      • Use existing wiring from chime and transformer to power the Raspberry Pi

      • 16V to 5.1V switching power supply 1A for Raspberry Pi Zero

    • Wi-Fi Connection

Step 3. Iteration or Prototypes [skip this step]

When doing a project like this, I try our various scripts, steps and hardware until I finally settled on the items that work best.

For example, I bought various amplifiers, speakers and microphones. I hooked the parts up and tried them with other devices. Sometimes there are collisions, like two devices using the same I2S pins, and I work around these. Sometimes the steps require rebuilding a kernel or driver, which can be done but why do it?

I started by finding the speakers used in a Nest Hello Doorbell and then found a small microphone and used an amplifier hat. However, the biggest issue with the amplifier was getting volume loud enough, such that a visitor could hear the doorbell or me talking to the visitor. So, I flipped to a hat that has all of these pre-built.

I spent well over $200 trying out various parts until I chose the parts in the next step. The final Bill of Materials is about $120.



A very low profile heat sink for Raspberry Pi Zero. It looks cool, but really doesn't do much to cool down the CPU.

It's better to use some headers and add a heatsink with fins.

Step 4. Parts & Tools

Here are the parts required to meet the requirements:

        • Raspberry Pi Zero WH, Amazon $19.99 - ordered (5v, ~300mA *** what do peripherals draw ? *** need to know for voltage regulator)

        • Heat sink, Low Profile Raspberry Pi Heatsink

        • RaspiAudio MIC+, Amazon, $25.99

        • Arducam Raspberry Pi Camera v2, Amazon, $29.99

            • Connecting a Camera to a Raspberry Pi Zero requires a 22 to 15 pin cable. Several cameras say they are compatible with a Zero but without the 22 to 15 cable they are worthless

        • Motion Sensor, Amazon, $7.99

        • Low profile, push button, normally open, blue LED, Mouser, $17.52

        • Polycase ID-1741P, Polycase, $3.85 plus shipping

        • Fintie Silicone Cover for Nest Hello Video Doorbell, Amazon, $8.95

        • AC to DC Step Down Buck Converter AC 5-30V to DC 2.5-35V, Amazon, ~$5

Here are the tools required:

        • Hot Glue Gun and glue use to hold stuff in place

        • Soldering iron and solder

        • Drill and drill bits

        • Wire stripper, needle nose pliers, Blue Tack, prototyping board, jumper cables, electrician's tape,

        • Dumb doorbell powered by mechanical chime (standard in most homes)

        • Xacto knife

        • Dremel, drill and grinding bits used to create and refine holes in lid

        • Paper, pencils, fine point Sharpie

Step 5. Setup Raspberry Pi Zero WH

In the RPi Setup directions in Step 4, choose Raspberry Pi OS Lite (raspbian was a very much better name). Always use the latest version of raspbian.

Step 7. Install Python Modules

Install python gpio modules

$ sudo apt-get install python-rpi.gpio python3-rpi.gpio

Other steps add other python modules.

Step 8. Install and Setup RaspiAudio MIC+

GPIO Pins used by RaspiAudio MIC+ that cannot be reassigned:

12 = Clock

23 = Button

35 = Word Select

38 = Microphone

40 = Data

Other required pins

2 = 5v

6 = Ground

25 = LED

Step 9. Get Doorbell Sound to Play when Pressed

Often the inside doorbell cannot be heard by visitors. So, the doorbell will play a sound outside when pressed.

I found several free doorbell sounds. I like this site and these two doorbell sounds the best:

Orange Free Sounds Doorbell Chime

Orange Free Sounds Sound of a Doorbell

Download and unzip the file (double click on it)

A folder is created and inside it contains the file:

Ding-dong-chime.mp3

Sound-of-a-doorbell.wav

Copy the files to the Desktop. I renamed them to ring1 and ring2 and converted ring2.wav to m4a format using Apple Music, but I don't think this is required. I know mp3 and m4a sounds play.

Copy ring2 from the MacBook to the Raspberry Pi

$ scp ring2.m4a pi@♣hostname♣.local:/home/pi/.

♣raspberry-pi-password♣

Add the file to mpd and allow writes to log file:

$ sudo chmod og+w /var/log/mpd/mpd.log

$ mpc insert "file:///home/pi/ring2.m4a"

$ mpc volume 80 # this is with temporary speaker; might be too high for mini speakers

$ mpc play # check if it works