If you’ve been following along here, you’ve seen the process where I set up my WeMos D1 Mini board to be programmed in the Arduino IDE, then even made it blink via WiFi. What I find to be the most incredible feature of this system is that unlike many other smart devices, you don’t need to install an app on your phone or computer. It simply generates a web page that you can navigate to on your browser, be it a phone, computer, or tablet. As my first foray into a “useful” ESP8266 device, I decided to make a pumpkin that can be controlled via a smart device on my local network.
All that was required was to solder a few LEDs for each of the eyes, then modify the program that I’d used to blink the LEDs previously. In order to make it usable on a small device like my phone, I modified the web page that it generates by editing the HTML output. It now generates buttons for each object with the
<button> modifier, with larger text using
<font size=7> to accomplish this.
A conveniently sized USB “lipstick” battery provided power, and electronics inside the damp pumpkin were protected by stuffing everything into a plastic bag to keep everything dry. Hot glue was also applied to the LED leads to keep moisture out, as well as additional hot glue to keep them in the cut out eye sockets. As seen in the video below, it was a fun project, and a nice introduction to the “practical” side of this little device.
Another interesting project for the WeMos/ESP8266 is using it as a (physical) mailbox monitor. This build was referenced in one of my previous posts, and uses a magnet and reed switch to tell when the mailman has opened the mailbox, leaving cards, checks, or most likely more bills! While the mailbox itself provided a nice waterproof enclosure (as opposed to a pumpkin), one practical enhancement was adding an antenna on the outside of the brick structure in order to reach the access point 75 feet away. When opened, it sends a notification via the Blynk app. This looks like an excellent way to interact with type of device, even if it does require software installation.
An excellent practical tip referenced in that monitor is the technique of turning on the ESP module with a magnet, then keeping itself on for as long as needed via a relay or transistor. This power saving technique can be found in the video below, and would work well for preserving battery life (possibly for years) in any sort of build that need to do an action only intermittently.
There are certainly more capable automation solutions than the ESP8266 module that can be purchased, or many that people have come up their own builds using the Raspberry Pi. On the other hand, for the price and size of the WeMos D1 mini, it’s hard to beat for simple monitoring and control tasks. Hopefully this post gives you a few ideas on how to implement it in your situation!
[Getting the Wemos D1 Mini and battery pack ready for pumpkin use]monthly-eletter-10-01-2017