How to make a Bluetooth doorbell and phone app

So you want to know how to make a bluetooth enabled Doorbell that you can build in a day?

What about controlling it from your smart phone? This tutorial will show you how easy it is!

Tutorials-UberDoorbellPart1-5-512x

 

Basic Requirements

Since this was the “first model” of the Uber Doorbell I restricted it to five basic functions:

  1. Play a custom tune of my choice.
  2. Log doorbell presses.
  3. Log door movements, (EG someone closing the door).
  4. Mute the doorbell.
  5. Manage it from my iPhone.

Parts List

All of these requirements are trivial when using the Simblee. I used the Lilypad version of the Simblee as it was cheap, had inbuilt LiPo charging, and I had a few leftover from another project. The rest of the parts list below:

I’m always on the lookout for cheap project boxes for electronics. One thing I discovered was the plumbing section at my local hardware store have 90mm storm water caps and lids. The make fantastic sturdy boxes and only for AU$4.00! So I grabbed a stack of them for other projects.

Tutorial-UberDoorbell30-512x Tutorial-UberDoorbell31-512x Tutorial-UberDoorbell32-512x

Now that I had all the bits I was ready to get stuck into it.

Soldering

We’re going to use all the Lilypad GPIO pins plus steal the onboard LED GPIO and use it to enable/disable the audio amplifier. I’d suggest watching the video on how I soldered everything up, but the following GPIO pins were used.

Tutorial-UberDoorbell06-512x

  • Doorbell pin – is a standard Normally Open door press button with the other end connecting to ground.
  • I2C bus – used to access the Real Time Clock.
  • Audio out – uses Pulse Width Modulation to achieve analog tones.
  • Knock sensor – is a “poor man’s” movement sensor which consists of a spring that connects when moved. Fairly basic!
  • “Wake Up” connection. More on this next.

The knock sensor and doorbell button will wake the Simblee up from Ultra Low Power mode. So the Simblee will sit there drawing just 4uA. Great for battery life.

The “Wake Up” connection is required because there was no way of waking up the Simblee from ULP mode when connecting to it from your smartphone. There is a callback function within the Simble API that will execute code on connects and disconnects. However, the Arduino loop() function will never execute when in ULP mode until woken by interrupt.

So, I made use of two GPIO pins, one set to output, the other set to input. The input pin was set to wake up the Simblee by interrupt from ULP mode. So all I had to do was set the wake up GPIO output to HIGH from within the BLE connect callback function. A bit of a waste of GPIO pins, but I didn’t want the battery to run flat in a day!

The soldering last element was tricky. Since there were no other GPIO pins available on the Lilypad, I had to make use of the onboard LED GPIO. The meant I had to desolder the surface mount LED. Normally this is a tricky operation, but all you have to do is just heat up the LED and push it off the surface mount pads. Make sure you check it up close for solder bridges.

Tutorial-UberDoorbell20-512x

Then solder up a wire off one of the surface mount pads to the audio amplifier.

Tutorial-UberDoorbell19-512x

Here’s the front and back of my Uber Doorbell all soldered up. In Australia we’d call this a bit of a Dog’s Breakfast. However, it’s all soldered up well and secure.

Tutorial-UberDoorbell22-512x Tutorial-UberDoorbell22b-512x

And the final elements.

Tutorial-UberDoorbell29-512x

That fitted snugly into the storm water caps.

Tutorial-UberDoorbell51-512x

Once fitted up to the back of the door it didn’t look too bad.

Tutorial-UberDoorbell57-512x

 

The smartphone app

The Simblee allows you to create a smartphone app without ever touching Apple’s Xcode or Google’s Android SDK. You can do it all from the Arduino IDE. The app I wrote was basic, but functional. There was no real security as of this writing, but I plan to add it soon. You can pick up the source code from my Github Uber Doorbell page. Feel free to modify or update. It’d be great to hear if you made it yourself!

 

Screenshots:

Tutorial-UberDoorbell53-512x Tutorial-UberDoorbell54-512x Tutorial-UberDoorbell55-512x Tutorial-UberDoorbell56-512x

 

If you like this YouTube channel please subscribe by clicking the in-video button, or the little red “Subscribe” button in your browser or app. You can also get updates by subscribing to me on Facebook, Twitter, Google+, Pinterest, and also Tumblr.

  • Bill Valvik

    Hey Mick, Love the tutorial. I am thinking of doing one myself. About the Lilypad.. Any replacement boars you recommend? I am not a great solderer and desoldering that tiny led to make use of the GPIO just makes me think I am about to waste the whole board.

    Anyway love the projects and keep up the good work.

    • MickMake

      Yup, this tutorial was more than a year ago now and there’s a lot more boards around. I would look at using an ESP32 as you can pick these up very cheaply, (US$5 a pop), easy to solder and can run for a fair while on battery.