I built a wireless two-way office doorbell! It gives my father a do-not-disturb indicator for when he's on calls and lets him respond when I ring without having to mute. It utilizes ESP-NOW with two ESP8266s.
I styled these after some of the intercoms in Star Trek: The Original Series for a few reasons. Firstly, my father and I have watched a lot of Star Trek together. Secondly, trek devices had abstract & tactile interfaces which compel me. For example, buttons are coloured & shaped, not labeled. This is mostly because they're props, but it inspires me to think about the different ways we interact with tech.
Here, 7 LEDs, 4 buttons, 2 microcontrollers, and 1 speaker can tell me when my father's in a call, and when I can bug him about dinner. And I'm hopeful the functionality is pretty intuitive.
I believe the functionality of my device is substantially different from the functionality depicted in the show, and I've made some alterations to the design. Still: I DO NOT OWN STAR TREK, NOR WAS THIS PROJECT AFFILIATED WITH PARAMOUNT IN ANY WAY. Paramount owns the design for their intercoms. If you represent Paramount or an affiliate and you'd like me to remove these images, please contact me.
For more details on this fancy two way office doorbell, and more pictures, read on:
Client/Visitor (Doorbell)
The client has one button for "May I come in?" which I call Request.
Hub/Occupant (Feedback)
The Hub sits upright on your desk for visibility & easy access. When someone outside hits Request, it plays a beep from a MicroSD card, allowing the user to change or disable the beep.
The hub has 3 buttons, ordered closest to farthest / bottom to top, by how often I expect they'll be used.⬤ - Yes
: Least often. A circle for Accept!
◻ - Wait
: Most often. The square is for stop or pause.◖ - No
: Second most often. A down arrow which points to the Do-Not-Disturb light.
If you hold the 'No' button, it enables Do Not Disturb.
Both units show the lights in sync. When Request is pressed, both devices flash blue. When Decline is pressed, both devices flash red. This reinforces the functions with use.
Goals
- Hub/Occupant can indicate when they're busy
- Client/Visitor should be able to request entrance unobtrusively
- Hub/Occupant should be able to respond easily and quietly
Implementation
Painting
I didn't have PLA that matched the light blue, so I took the opportunity to try painting PLA. I used acrylic over a white primer, and this had mixed results. It made the devices look wooden rather than plastic, but I was hoping the paint would be smoother. While I sanded the PLA significantly before and slightly after priming, the paint remained fragile.
Microcontrollers & Firmware
This project is powered by two ESP8266 microcontrollers, programmed in C++. I used PlatformIO, but stuck with the Arduino framework. They communicate via ESP-NOW, which was fairly painless to implement once I got over the gotchas. ESP-NOW already includes features like receive-confirmation, so I built a minimal shared communication library with message structures and a few fun features.
Communication Protocol
I addressed potential communication interruptions in a few ways.
- State-based messages
This way I can safely ignore lost messages, and only the latest message is needed. It also means that state can't get "stuck" if an intermediate message is lost, only if the devices lose communication for extended periods. - A buffer which continues to re-send the last message until confirmation
If the latest update has failed to go through, it'll keep trying. This prevents state from getting stuck, as above. - keep-alive messages
The devices will naturally check if they're connected once a minute. If they're disconnected, there's an error status light that plays. This way, the user knows if there's an issue (ie. the target device goes offline) before they try to send something.
Learned for Next Time
- To get even diffusion of LEDs, the client device could have been thicker.
- The ESP8266 (Or at least this D1 Mini breakout) had barely enough GPIO.
- ESP-NOW is pretty easy to use if you can work inside the 250 byte packet limit.
- I should come up with a cooler project name than 'doorbell'
- I intended this for use within speaking distance, like waving. My father's actually deployed the hub/client much farther apart. This usage has suggested a few features:
- Notification sounds at the client/visitor side (symmetric functionality)
- Improved the message loss handling to address the larger distance
- I've already done some of this
- An external/non-PCB antenna for greater reliability
Bill of Materials
- 2x Wemos D1 Mini ESP8266
- 2 MicroUSB Cables (Power/Programming)
- 7x WS2812b Addressable LEDs
- 4x Omron B3F-4155 Buttons
- Speaker
- DFRobot DFPlayer
- MicroSD Card
- M3 Bolt
- Wax Paper (Diffuser)
- Wire
- Solder
- Primer
- Acrylic Paint
- ~100g of PLA Filament
Tools
- 3D Printer
- Wire Cutters/Strippers
- Soldering Iron
- PlatformIO & C++
This is the first post in the new Maker category! You can expect more projects in this category in the future.