Close

Getting your ESP on

A project log for Home automation on the cheap

Using an esp8266, arduino nano, a salvaged usb power supply, and a couple relays you can automate anything

thjubeckthjubeck 05/28/2016 at 06:340 Comments

When choosing the design of the system, I thought about the ways I could achieve my goal. At the time, my experience with arduino consisted of xBee's and serial communication and led's so I wanted something that was very similar.

Looking at the solutions available, I found a project called esp-Serial Bridge which fit the bill. This being said, the first thing I wanted was to get basic communications working.

Easier said than done. My first attempts I used windows to flash the firmware. There is a setting you have to pay attention to that sets your memory size and in windows this is not possible according to a resident esp8266 forum guru so after a few attempts, failed flashes and firmware resetting randomly, I finally gave up on using Windows and switched to my trusty Ubuntu computer and followed the guide located here. If you do have firmware resets check the size of your esp8266's memory and be sure your are flashing the correct version.

Under the current release you will see a several headings, use the one that says serial upload. I used an arduino uno without the chip as my flash tool like shown here (yes it would have been easier to use a serial adapter but the arduino has a supply of 3.3v and the serial adapter did not seem to keep up with the power demand).

To get WiFi working, connect to the access point that the esp creates and then go to the WiFi menu and select the network you would like to connect to.

To test if everything is running correctly you can use putty to connect to the esp8266 or use the built in uC Console.

After flashing the software and getting connected, I ran across another problem. I'm jumping ahead a little here but while I'm covering the esp8266 stuff I'll go ahead and disclose this part now.

My control responds to a single number and for some reason the lights kept triggering randomly. The problem was that debugging log through serial was turned on and it was sending as stream of connection data for me to debug. To turn off the log, you have to turn it off using the web page as seen below.


Remember when you power the esp8266 using a good capacitor for filtering along with a decent source of power is recommended highly. I used some inexpensive 5v to 3.3v converters and they worked fairly well to power the esp8266.

So that about covers it for the esp8266 part. There are other options to consider such as REST and MQTT but Elliot Williams is doing a good job covering that one so that's for another day.

Discussions