![]() The end result should be fairly weatherproof and self contained unit.This tool to find your nearest postbox is only possible as Royal Mail was forced to disclose the location of all of its 116,000 postboxes by the Freedom of Information (FoI) Act. These are expensive, but are very waterproof and really something that's needed when working with solar panels. I also used some Deutsch connectors between the solar panel and LiPo charger so I could remove one or the other for maintenance. So I drilled holes and ran the wires into the case and secured it with a small nut and bolt. The humidity sensor also needed to be external as it'd be useless inside the case. Then place some more on each corner and place firmly into the case. This will provide a "stand off" to avoid anything touching the case. First place a small amount on each corner, and wait to cool. I mounted both PCBs to the bottom of the case using hot glue. The distance sensor poked out the lid via a square hole. The external antenna connector was then screwed onto the lid of the case. This greatly extended the range of the ESP8266 and I didn't see any dropouts. You can solder this up directly to the PCB antenna and the shield on the ESP8266 module. Since I was using an all aluminium case and my letterbox was a fair distance from my house I had to use an external antenna. Once you have everything soldered up, of course, make sure you program the ESP8266 with my code. The placement I used here minimized the number of cross-over wires that had to be soldered. You'll have to get creative with the stripboard and placement of components. During overcast days the LiPo may not be charged, so the ESP8266 has to be able to run for a couple of days on a single charge. The TSL2561 I used so I could see how much sunlight was around so I could potentially drop down into ultra-low power mode to save battery when it was cloudy.įor power the solar panel connects to the LiPo charger, and then the output of that connects to the ESP8266, which does have it's own LiPo charging system, but this system allows you to charge your LiPo as well as run the ESP8266 at the same time. The distance sensor, (SENS2), uses GPIO14 and will set this HIGH when something passes in front. If you are using your ESP8266 for other things and need GPIO13, then just use any ground point instead. GPIO12 is an input with internal pullup resistor and I used GPIO13 as a "lazy man's" ground point to avoid soldering extra wires. The vibration sensor, (S1), connects to GPIO13 and GPIO12. The AM2302 humidity sensor attaches to GPIO0, (which just so happens to be the LED as well, but that doesn't matter). I suggest breadboarding it all up first as then you'll have an idea of where everything fits. In the photos you can see the end result, everything fitted well into a sold aluminum case. MQTT Broker - you can either build one yourself, or use one of the many Internet based ones.Enabled support for the ESP8266 in the Arduino IDE.3.7V Polymer Lithium Ion Battery – 1000mAh.Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm.Adafruit TSL2561 Digital Luminosity/Lux/Light Sensor.AM2302 (wired DHT22) temperature-humidity sensor.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. This Fast Vibration sensor would do the trick and is dirt cheap. I also needed something on the flap that was cheap and reliable. Perfect size for my mailbox and there won't be any noisy bounce or false triggers. So, I eventually settled on this simple distance sensor, which is capable of responding to an object between 20 and 200mm away. Likewise Phototransistors would be fiddley to work with and would require more cables that I'd want. An IR shooting sensor could work, but would rely on some fiddly positioning in the mailbox. Same story with ultrasonic sensors and most of them run off 5 volts which limits the choice of MCU. I didn't want to use a PIR as I may get false readings, especially if the back flap was left open. So a sensor was needed that could respond to something moving from a distance. I want to avoid any microswitches as they are more exposed to the elements, are messy and can be unreliable. Being able to do this without having to destroy the letter box and have it work reliably, was hard. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |