Remember that thing in front of your house? The letterbox. In this multi-part video I’ll show you how easy it is to get your letterbox to send you alerts via MQTT when you get new mail. So you won’t have to guess anymore.
Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.
Well, with this particular project, this is where I start.
You know how some weeks you get no letters and other weeks your mailbox is full? This is one problem that I had to solve.
I want 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.
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.
So, the complete Bill Of Materials ended up being:
- ESP8266 Huzzah Feather
- 1W Solar Panel 80X100
- Solar LiPo Charger (3.7v)
- VeroBoard, or StripBoard
- Sharp GP2Y0D810Z0F Digital Distance Sensor
- Fast Vibration Sensor Switch
- AM2302 temperature-humidity sensor
- Adafruit TSL2561 Lux Sensor
- 3.7V Polymer Lithium Ion Battery – 1000mAh