Doorbell Notifier

Convert your existing wired doorbell into a ‘smart’ doorbell, allowing for notifications, integrations, etc.

Similar projects worth following
One of the first projects I tackled after getting back into microcontrollers was converting my wired doorbell into a ‘smart’ doorbell. I wanted to simultaneously trigger the appropriate camera to record on a doorbell press (even if I was home) notify me on my phone (in case I wasn’t home) and blink all of the smart lights in my house (if I was listening to music, etc.). Originally, I used Stringify to achieve this integration beautifully (it is now defunct) but have since moved to IFTTT which has allowed me to do most of the same things. I constrained myself to make no permanent changes to my existing doorbell setup: I both wanted to leave everything intact so as to annoy my wife minimally but still allow for the integration I wanted. Homemade optocouplers proved to work splendidly for reading the doorbell states and I was ultimately able to give the entire project a polished and professional look while making it suitable for a wealth of other microcontrollers.

My first (recent) microcontroller project turned me onto Particle Photons and got me looking for projects that would specifically benefit from having Wi-Fi functionality. Having recently gotten both security cameras and ‘smart’ lights, being able to have the doorbell trigger them seemed like a logical progression. As mentioned in the description, I didn’t want to alter my existing doorbell setup: partly for aesthetics/functionality but also as an added challenge. The first and primary hurdle was figuring out how to read the (relatively) high voltage AC that powers my doorbells.

A quick primer on wired doorbells: in the U.S., 12V AC is pretty common for powering them. (While I know in my case the transformer is rated for 12V, for whatever reason the voltage that each of my doorbells sees is actually 20V.) A quick google search will show you some diagrams for how things are typically wired. At each doorbell there are 2 wires (20V difference in my case). When the wires are shorted, the doorbell is activated. What this means, is that I needed a way to tell when the voltage difference between the 2 wires at each doorbell went to 0.

After doing a fair bit of googling to see how other people approached reading the state of a wired doorbell, I was surprised to find very little. I did however stumble upon a forum where someone was attempting to do this (or something similar) and optocouplers were recommended. The forum never resolved whether this worked for the original user but I decided to try it myself. (Optocopulers allow for signal isolation and simply consist of one side driving an LED and another side with a photoresistor reading the state of the LED.) While you can buy pre-made ones for quite cheap, I initially opted for making my own. I should also mention the fact that this would ideally be done with a DC power source on the LED side as AC voltage is constantly pushing and pulling or going high/low, so when directly powering an LED it will flicker (since they only allow current flow in one direction). In the US, this will be at a rate of 60 times a second. Not terribly noticeable to the human eye, but happening nonetheless. At the time I honestly didn’t know if it would meaningfully affect my use.

To test this, I simply took an LED and photoresistor from my parts bin and faced them towards each other, held in place and covered by black electrical tape (being careful to avoid shorting any of the wires). Wiring each up as you normally would (with the LED being driven by the doorbell wiring and the photoresistor being driven by the microcontroller), I was able to read the voltage on the photoresistor side with a multimeter and compare the pressed and un-pressed states. Somewhat to my surprise, my homemade octocoupler worked quite well: I was able to see very clear differences between the two states. Subsequently, I wired in the microcontroller and arranged things so that I got a ‘high’ state when the doorbell was un-pressed and a ‘low’ state when it was pressed. While there was definite variation due to the AC voltage, my photoresistor seemed to lag enough that it stayed pretty constant.

Fast-forward a little further and I was able to wire things up inside the house, connected to the wiring for both doorbells. I put it in a project box (but left it all on a breadboard) and put together some simple code to send Particle Publish commands when either doorbell was rung.

I actually left it this way for quite some time (read: over a year), both to fully test it out but mainly because it was working as-intended. Recently I started playing around with Eagle and designing my own boards; this seemed like a perfect project due to its small size and simplicity (it’d be awfully hard for me to mess up). However, before making a board I definitely wanted to use an actual optocoupler instead of my homemade ones. I found some quite inexpensive ones that fit the bill, ordered them and then proceeded with testing them as I figured they would act a little...

Read more »

Doorbell Notifier.sch

sch - 54.53 kB - 02/14/2022 at 14:59


Doorbell Notifier.brd

brd - 45.45 kB - 02/14/2022 at 14:59


PC817 Datasheet.pdf

Adobe Portable Document Format - 280.50 kB - 09/19/2019 at 18:46


  • 1 × Particle Argon or Xenon or other Featherwing compatible board
  • 1 × Custom PCB or wire up your own
  • 1 × Stacking Headers for microcontroller, optional
  • 2 × PC817 Optocouplers
  • 4 × 1kOhm Resistors

View all 8 components

  • FINALLY working again

    Ben Brooks02/08/2022 at 21:43 0 comments

    After Stringify went defunct, I was never particularly happy with how this project functioned. IFTTT was pretty rough at best (it frequently took a while for notifications to arrive, which kind of defeated the whole point of getting/sending them). After IFTTT started charging for more than a couple integrations, I stopped using this project.

    THEN I stumbled upon Home Assistant and saw where I wanted to take this and several other projects I have. Took me FAR longer than I would have liked (funny how being responsible for multiple kiddos makes these kind of projects fall by the wayside), but I finally got this project setup with my instance of Home Assistant and it's working smoothly again! Unfortunately my Arlo cameras don't really play nice with Home Assistant, so I can't integrate them as I could with Stringify, but notifications on my phone are completely instant and I'm able to include flashing some lights to get my attention as well. Because I'm using a Xenon and Argon with my setup, the base code on the Xenon didn't really change but I had to add code to my Argon since it's the only one actually on my local network (the Xenon is a Bluetooth only device). I've included that code on Github (I had to manually pair down the code, as I use my Argon for several other projects too). I think it should be functional as-written, but it's always possible I messed up.

    While my use of Home Assistant is still somewhat limited, I'm slowly working on using it to replace how I interact with other things in my house (be that purchased 'smart' items or my own creations).

View project log

  • 1
    Order and Print Components

    The first thing you’ll want to do is order and print all of the necessary components. The printed components are all available on Github here.

  • 2
    Solder up the board

    Since I was using this as a self-made Eagle tutorial, I printed up a board. As I mentioned in the details, I had 10 printed so message me if you’re interested in me getting one to you. Otherwise, you can pretty easily make your own board using a protoboard.

  • 3
    Assemble everything

    With the board finished and the enclosure printed, assemble everything.

View all 5 instructions

Enjoy this project?



doorman wrote 07/26/2021 at 15:48 point

Hello sir , where can i get the file for pcb? 

  Are you sure? yes | no

Ben Brooks wrote 02/08/2022 at 22:16 point

Sorry I never replied, somehow I didn't see this!

So I'm a total PCB noob; I used Eagle but I'm not sure the best way to export a file for sharing. Obviously I could share the gerber files but I'm assuming there's a much better way to do things? Feel free to hit me up with a message if you're still interested in the files!

  Are you sure? yes | no

doorman wrote 02/13/2022 at 17:52 point

I'm sure there are better ways but I like this way is much simpler it will work with my setup , if you can upload or email me the files at 

Thank You

Take Care

Have A Good one.

  Are you sure? yes | no

Ben Brooks wrote 02/14/2022 at 15:01 point

I've uploaded both the Eagle Schematic and Board files; should be able to open up the project with both of those.

  Are you sure? yes | no

Scott Prive wrote 10/21/2019 at 23:13 point

How exactly are you dropping the doorbell's 12VAC down to what the Xenon needs (I assume, 5v)?   

 I see no regulator in the BOM, nor power resistors. The resistors I do see look small and specific to the photocoupler.

  Are you sure? yes | no

Ben Brooks wrote 10/21/2019 at 23:40 point

I'm actually just powering it via USB. In the Description I mention the possibility of trying to power it directly from the doorbell wires in a future iteration. In my specific case, I already had an outlet right next to it so USB was the easy option.

  Are you sure? yes | no

Scott Prive wrote 10/23/2019 at 00:54 point

Ahh, OK. I'd missed that, and let myself be misled by what I thought were terminals meant for the 12VAC.

Following, in case you pursue that challenge. I have been chasing this problem on the forums for years, and basically found (as you did) lots of breadcrumbs but no posted success.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates