book collections email follower instructable user

Step 10: Installation

Picture of Installation
20190420_165242.jpg
20190420_170245.jpg

To prepare for the installation I painted some thin conduit brown to match the front door, and drilled a hole to poke the cables through, using rubber grommets to fill the gap. I left myself about an hour to fit it, but this wasn't nearly enough time! In theory I just needed to mount the doorbell unit, feed the wires through the door and reconnect the alarm cable to the base unit, which should have been straightforward - it was anything but.

The intercom fixed to the doorframe easily, using strong 3m velcro pads rated for double the weight of the unit. When I came to reconnect the cables I found I'd snapped the stripped ends off two of them, and having them at different lengths needed some delicate work with tweezers to make the connections. Soon enough it was all connected though, and I powered up the Pi to test it. Here came problem number two - very weak WiFi in the porch. Not to worry, I thought, and added in an ethernet cable and powerline adaptor, which fixed the problem.

Next came the real-world test, and I logged in via VNC to set up Duo - this worked fine as before, but while I was setting the audio sources the PyUserInput actions fired as if I'd pressed the doorbell - and again and again, making video calls almost as fast as I could decline them. This set me sweating, and I carefully dismantled everything to check the connections, as it'd been working perfectly on the workbench for nearly a week. After checking the connections and finding nothing amiss I replaced the doorbell lever switch and tested the resistance of the whole unit with a multimeter. Then I tried a different pHAT BEAT. Then a different Raspberry Pi. And lastly a fresh pico hat hack3r. Nothing worked, it was as if someone was outside constantly leaning on the doorbell, the script just kept firing and making calls.

The only thing that was different to the workbench setup was that the cables were now fixed in place inside conduit, and in a much busier environment - and that turned out to be the problem. Interference was causing the GPIO to interpret pretty much anything as a button press. To try and combat this I first added in a 1k resistor between the switch and the Pi - this confirmed my thoughts as it slowed the false positive presses to one or two a minute. Next I shortened the cables inside the base unit as much as possible, and replaced the 1k resistor with a 10k version. This did the trick - I built a simple script to test it and each button press only fired it a single time, with no phantom presses in between.

For a part of the project I'd assumed would be fun & easy this turned out to be a frustrating problem solving exercise lasting over the Easter weekend, but finding the solution was very satisfying. The silver lining to the whole thing was swapping out the Pi - I was now using a Pi 3 B+, and there was a noticeable improvement in both call speed and quality - if you plan to build one of these I'd definitely encourage you to spend the extra few pounds on the highest-spec Pi possible.