Jump to content
Sign in to follow this  
smadge1

ESP8266 - it's iot

Recommended Posts

I've been mucking about with the Arduino (Freetronics Eleven and a cheap chinese one called VISduino) and I've ordered some clone Pro Minis, but I've also ordered some ESP-07 with breakouts and a NodeMCU 0.9 Dev Board (ESP-12)

 

I've found that these may be much more capable than the Arduino/Atmega328p combo, plus they have full WiFi capability.

 

Has anyone had a fiddle with them yet? got any neat projects underway?

 

I was looking to spend over $100 on a "bulky" Arduino Yun, or similar clone (EtherMega, etc)

 

I think the ESP8266 may be a lightweight contender. Once I figure out how to use it.

 

 

 

Share this post


Link to post
Share on other sites

I got my Yun for cheap when radioshack were killing off a bunch of stores, so I don't feel so bad about it price wise, but find that I use the Yun more as a tiny linux machine than the arduino / microcontroller tasks.

 

Based on what I've seen the ESP is a fine device for little projects on it's own, and you can slave it in as comms for bigger setup.

 

Call it another tool for the toolbox rather than better or worse than any other device.

Share this post


Link to post
Share on other sites

ok ok, I received the ESP-07s in the mail today, and after gasping at the tiny thing and the tiny soldering, I figured I should try it. (Lucky I got two, one for practicing on, and one for reals)

 

I managed to solder the module onto the breakout board, somewhat, and then the header pins. As the breakout board covers the entire width of the breadboard, I had a chance to test out my new breadboard links and do some fancy, under-module cabling.

 

https://twitter.com/smadge1/status/626375491839115264

CLFVLeqUAAQiqIc.jpg

 

The I decided to fire it up, so I mounted a AMS1117-3.3 based voltage regulator on the end of the board to give me a nice steady 3.3v rail, I used the CH340G chip in the VISduino, cheap Arduino clone, to give me a TTL Serial connection (which I connect to via the Serial Monitor in the Arduino IDE)

 

https://twitter.com/smadge1/status/626385127271108608

CLFd8I2UsAAc117.jpg

 

We have a success!!

 

Next project is to figure out how to upload sketches to it directly from the Arduino IDE.

Share this post


Link to post
Share on other sites

Apparently, the device needs 3.3v VCC, but the logic pins are 5v tolerant. I think in future, I will use Level Shifting, but the level shifters I ordered were 8-channel, and too big to fit onto the little board, I should order some 4-channel ones.

Share this post


Link to post
Share on other sites

Awesome, received the NodeMCU Devkit v0.9 today, pretty sure it's a fake one, but anyway. I'm yet to fire it up, just gonna post some pics for you to enjoy!

 

It takes up the whole width of the breadboard, making it difficult to connect things too, I'm either going to have to resort to some fancy under-module wiring, or modify the breadboards by removing a single power rail in the middle and bridging that gap. I don't really feel like pulling apart my new breadboards at this stage, unless I order some more just for that. it's the sticky stuff on the back that you can't put back together.

 

https://twitter.com/smadge1/status/632383952720793600

CMat1zAUAAAeUW1.jpg

 

 

Close Up!

 

You can see the ESP-12 module on this board, along with a MicroUSB port, a CH340G USB to Serial chipset, a 3v3 voltage regulator, and a bunch of power caps, pull-up/down resistors and some switches. There are at least 2 LEDs on there, a power LED by the 5V pin, and another mounted on the ESP-12 module itself.

 

https://twitter.com/smadge1/status/632384258313588736

CMauHtfVEAAYSZ_.jpg

 

I still haven't received my logic level shifters from eBay yet, so disappointed, the seller decided to just refund me instead of resending them... bah.

 

I think I will order the v1.0 version of the board with the ESP-12E module on it, it has a few more GPIO pins, plus it's slimmer for a better fit! (on the breadboard)

Share this post


Link to post
Share on other sites

I've started tinkering with the NodeMCU devkit, but I'm only uploading Arduino sketches at this stage, I guess I'll have to figure out Lua at some point.

 

I can upload a sketch to blink the BUILTIN_LED, and a LED connected to GPIO4.

 

This board is a little trickier to work with than the Arduino, as you need to hold GPIO0 to ground upon startup to put it into Flash mode, there is no automatic "bootloader" Fortunately, the board has a FLASH button just for that purpose.

 

It looks like I can in fact hold the Flash button down while I "reset" (Pull the RST pin to GND)

 

I just wish there were some more examples to play with, I'm sorta stuck for information.

Share this post


Link to post
Share on other sites

Well, working well past midnight here, I put the thing through it's paces, cursing at every step, but I have a much better understanding of it.

 

I tested the AT Firmware it came with, then spent a good deal of time loading and testing Arduino Sketches. Then I worked out how to flash the AT Firmware back on it, and then the NodeMCU firmware, and played with the various flashing tools, and Lua loading tools that are out there.

 

I still have much to learn, but I think I'm off to a good start.

Share this post


Link to post
Share on other sites

For an exercise I'm doing with a kid tomorrow at work, I've replicated the same circuit using two different microcontrollers, the Arduino Pro Mini (ATMega328) and the ESP8266 (ESP-12)

 

I used the Arduino 1.6.5 IDE on both boards, I'm able to load in the board definitions and tools to flash the ESP8266 using only a link (HOW EASY IS THAT??)

 

I use basically the same Arduino sketch on both boards, I just change the pin numbers.

 

So I'm gonna give the kid all the bits, and a full-sized Uno-Clone and let him try and put it together and make sure it works.

 

https://twitter.com/smadge1/status/632885318379659264

CMh11HbUEAAEttk.jpg

 

And yes, I'm kicking myself today after I found out that when you use a NodeMCU Devkit board with the Arduino IDE, you don't need to put the board into flash mode manually, the software does everything!! I was so frustrated yesterday at having to put it into flash mode every time I wanted to upload a sketch...

 

I haven't got back to the ESP-07 yet, I still don't have my Logic Level Shifters, and I have to work out all the nitty gritty with which pins need to do what and when, and I haven't got my shipment of resistors and capacitors yet. The NodeMCU Devkit board really does do all the little things, and lets me concentrate on the programming and other fun stuff.

Share this post


Link to post
Share on other sites

Tried testing out further Lua scripting tonight, I used the same circuit as before, this time I loaded up the NodeMCU Lua interpreter, then bodged together this script which sets up a web server, and some buttons and code to turn various GPIO pins on or off. In this case, I have three pins connected to an RGB LED (cos I LOVE RGB LEDs) I still haven't figured out how to implement the switch yet, other than setting it's pin as an INPUT.

 

The ESP8266 was configured as a STATION in this example, connecting to my local wifi, but you can also set it as a SoftAP (hotspot) and it does everything a basic hotspot does.

 

Sorry for the blurry photo, the iPad screen was making my autofocus go crazy (with the lamp reflection...)

 

https://twitter.com/smadge1/status/632917781579591680

CMiTW8-UYAAEG2R.jpg

 

I had a few issues getting the page to render on the iPad, it seems that most desktop browsers can render the simplest HTML without complaint, but the iPad needed all the blah blah blah tags at the top (DOCTYPE, HTML 1.1, HEAD HTML meta content text/html, etc etc... all that stuff)

Share this post


Link to post
Share on other sites

I ended up getting my Logic Level Converter, it's just a 4-ch one, but that was enough to get me started. I was able to flash the ESP-07 with the latest AT Firmware, will try the NodeMCU and Arduino sketches later.

 

I wired up the breadboard, with a AMS1117 3.3v regulator, a 4-ch bidirectional logic level convertor (for RXD and TXD) and two switches, both with 10K pull-up resistors, one for Reset (RST) and the other for Flash (GPIO0)

 

I was using my CH340G USB-Serial adaptor for communication with the PC.

 

I'll probably be able to expand the project onto two small boards (end to end) to give me more room, it's a bit squishy at the moment. Plus that should hep me to keep the 5v and 3.3v rails separate.

 

https://twitter.com/smadge1/status/642735383575289856

COt0auBVEAAuHd0.jpg

Share this post


Link to post
Share on other sites

Just for fun, I've ordered a bunch more modules from eBay, some more ESP-07s, some ESP-12s and ESP-12Es. I note there doesn't seem to be a particular ESP-12E breakout board available on eBay yet, but there are some available on other sites.

 

I still want to get the NodeMCU v1.0 too. I still didn't buy a bunch more little breadboards either, so I'll get around to that,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×