User avatar
By RichardS
#43240 User

In this post I’m going to detail how you can easily build a prototype that demonstrates a simple garage door monitor. The idea is that you’ve left your garage door open and gone back inside or out back and you really would prefer it wasn’t open, inviting your whole street to help themselves to your stuff. Well, after 10 minutes of being open, you get an SMS on your phone warning you that you’ve forgotten it and you go and remedy the situation. If you’re like me, you forget stuff like this more often than legitimately needing the garage open for ages so this is actually useful. If not, it’s at least a good excuse to build your first IoT project.

There is a plethora of options to choose from when it comes to microcontrollers and embedded connected (IoT) electronics. Arduino seems to be the popular mainstream platform of choice these days so I wanted to find something that was “Arduino compatible” given the assumption that there would be a lot of online resources.

A requirement for IoT is that your project be “connected”, meaning it can reach the internet. Arduino has a number of “shields” (add-on boards) that have wired ethernet, and others with wifi but they’re all relatively expensive. I discovered the esp8266 (henceforth ‘esp’) some months ago and it has been receiving a lot of attention lately. You can buy the wifi MCU module for as low as $2.50 on eBay and it’s all-in-one: an Arduino-compatible controller with built in wifi - IoT magic!

    esp8266 module - this is the brain where your program goes and the part that can connect to your wifi. I’d order two or more since they’re only a few bucks each. You can fry/brick them easily so better to have a backup I think.
    FTDI / serial / rs232 programmer - you need this to send your program over the USB to the esp
    Solderless prototyping board “breadboard” kit with 3.3v power supply - this is where you build your circuit
    Some push buttons - these are the type of buttons that you push with your finger
    Some 10k (or similar size) resistors
    You will need an ESP-01 adapter like this or this but be sure you ask when checking out for the “male headers to be soldered” unless you want to give soldering a try and build your own. I have not tried the adapter but given how easy this makes things I think it makes sense.
    Mini USB cable (not micro). But look in a box of cables first - you’ll probably have one.
    A multimeter - this is not essential but helps a lot!