Main Content

So I need to be able to detect every time someone puts a letter into the box and also detect the movement of the rear flap, indicating someone has removed letters. Being able to do this without having to destroy the letter box and have it work reliably, was hard. I want to avoid any microswitches as they are more exposed to the elements, are messy and can be unreliable. So a sensor was needed that could respond to something moving from a distance. I didn’t want to use a PIR as I may get false readings, especially if the back flap was left open. Same story with ultrasonic sensors and most of them run off 5 volts which limits the choice of MCU. An IR shooting sensor could work, but would rely on some fiddly positioning in the mailbox. 5mA current draw was also a little high. Likewise Phototransistors would be fiddley to work with and would require more cables that I’d want. So, I eventually settled on this simple distance sensor, which is capable of responding to an object between 20 and 200mm away. Perfect size for my mailbox and there won’t be any noisy bounce or false triggers. I also needed something on the flap that was cheap and reliable. This Fast Vibration sensor would do the trick and is dirt cheap. It also needed to be battery operated, charged by solar, and since there’s going to be an ESP8266 onboard, might as well chuck in some humidity and temperature sensors.”

Link to article