Here is also a 5 minute video about it.
The ESP-12e module seems like a good choice, with the added benefit of having 4MBytes of flash memory.
ESP-12e module from Banggod |
Odd stuff
A few things are a bit odd about these modules:
- The silkscreen is a very poor print quality
- The ADC pin is labelled ADG
- The GPIO labels are a mess. Eg: There is no GPIO0 (this is labelled GPIO6 instead)
Where's GPOI0? |
Todo: try flashing LEDs on all GPIOs to compare against NodeMCUs IO table
Basic configuration
So after a little experimentation, this turned out the most basic configuration:
Basic config for ESP-12e |
I plan to run this without a circuit board, so I'll simply shorten GPOI15 to ground and connect the "Chip Power Down" Pin (CH_PD) to 3.3V.
The Module came preinstalled with some AT-firmware, I didn't much care about.
Flashing new firmware
To program new firmware, GPOI0 (which for some reason is GPIO6 here) needs to be connected to ground. I am a huge fan of NodeMCU, so I flashed that to the module.
Ground GPIO6 (=GPIO0) to flash firmware via UART |
This goes without saying
Connecting the serial-usb converter is unspectacular. Just the usual RXD-TXD / TXD-RXD thing. And don't forget to connect the ground wires.
Connecting the USB2Serial converter |
I'm a recent convert to LUA on nodemcu, it's just so quick and easy to iterate code. I do hope the Dev. team keep going though as things seem to have slowed. In particular I'm being forced over to the Arduino IDE to make use of mDNS-SD facilities that are missing in nodemcu.
ReplyDeleteAfter all, having an embeded webserver isn't much use if you have to go hunting for it with more than just a web browser!
NodeMCU's IP is based on LWIP. There are a few mDNS responder implementations based on that, so it should not be too hard.
DeleteHi Andreas, thanks for your reply but 'too hard' is exactly what it looked like when wading through RFC 6762/3. Do you have any pointers to an easier to understand outline of what might be involved? Just understanding how nodemcu/lua is put together is a challenge for me.
DeleteWith NodeMCU things are a bit different from the Arduino IDE. mDNS can IMHO not be implemented in LUA at the user interface. It would have to be added to NodeMCU's source code. And you need a build environment for that. This tool is a great help: https://github.com/pfalcon/esp-open-sdk
DeleteI used that to build my custom NodeMCU firmware, but never took it as far as adding totally new functions at that level.
As said, the TCP/IP is done by LWIP and someone has already made a mDNS responder for LWIP here:
https://developer.mbed.org/users/dirkx/code/Bonjour/file/d9f5c4abc5f8/services/mDNS/mDNSResponder.h
But getting that to work together is beyond my feeble powers.
I'm sure you could make a lot of people happy if you succeed.
Hi Adrian,
Deletethat looks just what you've been looking for:
http://desperate-programmers.com/2016/01/24/name-resolving-demo-mdns-reponder/
Great find Andreas! Thanks for the tip. I got the demo running - although the DNS look-up fails for me when using a browser on an Android device, which is disappointing. The article on building custom NodeMCU firmware looks super-useful too.
DeleteThings have anything but slowed down actually. mDNS is in the works, see https://github.com/nodemcu/nodemcu-firmware/pull/988.
DeleteHi,
ReplyDeleteThis looks very interesting but being new to wifi I have several questions.
A. Does the chip on the board have enough spare capacity to handle extra functions?
Col
It depends on your requirements, of course. But if you compare it to an arduino, it is *WAY* more powerful. The ESP-12E module also has a 4MByte flash module. For a microcontroller dev-board, that is plenty.
DeleteHello Sir,
ReplyDeleteI hope you are able to help me. I have an ESP8266-12E just like yours. With your setup I am able to get a response: "waiting for host". I have found the baud rate is set at 74880.
I am using the Arduino IDE and I have been successful at programing the 01 modules. I am trying to program this -12E module however, I can not choose the 74880 rate. I can communicate at 57600 or 115200, do you have any advice for me as to how I might change my baud rate?
Any help would be appreciated.
Thank you; Joseph
Sure you have GPIO15 conected to ground? Sounds like you're in the wrong boot mode. To be on the safe side, leave the other GPIOs unconnected. Specifically GPIO2 and GPIO0 (labelled GPIO6 on my boards) should either be left floating or pulled up.
DeleteTo flash from Arduino IDE, GPIO0 needs to be pulled down, of course.
Thank you for your assistance.
ReplyDeleteI checked my gpio15 to ensure it is grounded, and it is. I jumped gpio0 to ground and it lost the waiting for host message. But when I jumped it to power I was able to communicate at 115200.
Now I am excited, because I no longer have a fake chip but one I can actually use. I can now use the AT command set and it works. Yippy. I would have never thought to jump gpio15 to ground. Thank you so much for your help.
With much appreciation; Joseph
Where did you get the background screen with the tabs, it looks very use full.
ReplyDeleteThat is esplorer. A great tool for Lua script development, but also great for playing with the AT commands.
DeleteAvailable at http://esp8266.ru/esplorer/
Hi Andreas.
ReplyDeleteIn the video you use a "tool" on the PC to send data to the unit. What tool is that and where can it be downloaded from.
Regards
Chris
Yes, that's https://github.com/nodemcu/nodemcu-flasher
DeleteHello,
ReplyDeleteI am using ESP12E chip. I am powering it using Teensy ++ 2.0 which is powered using a USB cable via computer. I am using OESPP FTDI serial adapter to flash the module. I have connected the Tx, Rx and GND to Rx, Tx and GND respectively. When i open the COM port and click reset i was able to see the output from the Wi-Fi module on the screen.
My module came preflashed with NodeMCU. It said Node MCu version 5.1.4 and then init.lua not found. There is a > and i am not able to type anything on the screen. When i click reset, i get the same message. I am still unable to type anything on screen.
My serial adapter is in 3.3V configuration. I tried 5V configuration too. It's still the same. I am using arduino to upload the program. I get this error everytime.
esptool v0.4.4 - (c) 2014 Ch. Klippel ck@atelier-klippel.de
setting board to ck
setting baudrate from 115200 to 115200
setting port from COM1 to COM2
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
stat C:\Users\pablo_000\Desktop\Arduino/Wifi_temp_post.cpp_00000.bin success
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed
Have you tried ESPLORER as a terminal/IDE software?
Deletehttp://esp8266.ru/esplorer/
Thanks man, you made my experience with this module really smooth
ReplyDeleteHello, sir.
ReplyDeleteNice post!
I'm new to ESP's modules, so I want - first - to use one ESP-12-E as WiFi module to Arduino. I've searched a lot of information, but I did not find the proper wiring to maintain serial communication between arduino and ESP. Some wiring examples shows different GPIO's configurations. I've tried all of them, but I'm still unable to send or receive information between Arduino and ESP. With this configuration you showed, the ESP LED blinks strong once, when powered UP. With another configuration the LED blinks very faded once.
So, what might be going wrong? I'm using a logic level converter between Arduino and ESP TX/RX. All wires are placed correctly. I'm using sketches that other people tested...
Is There a debug of the led behaviour on boot, or may I condemn my ESP module?
Thank you!
Best regards,
Tiago.
The first question is: Which firmware does your ESP8266 run?
DeleteTo communicate with an Arduino, you want the module to behave similar to a traditional modem. That is what the "AT-Firmware" does. (As opposed to NodeMCU, where the ESP8266 is in charge of both the WiFi and running programs/scripts)
I have an AT-Firmware/Arduino example here:
http://www.areresearch.net/2015/09/arduino-and-esp8266-part-2-web.html
Hi Andreas,
ReplyDeleteWhich serial-usb converter are you using?
Thank you.
I always use this one:
Deletehttp://www.banggood.com/Wholesale-USB-To-TTL-COM-Converter-Module-buildin-In-CP2102-New-p-27989.html?p=NT1005763073201409DA
It works without any problems both with Windows10 and Linux (Ubuntu). The cool thing is that is outputs 3V levels but is 5V tolerant. So you can use it with both ESP8266 / ESP32 and Arduinos.
Hello sir! I’m new to esp8266-12e. Can you help me how exactly i can code into it by using FTDI for Temperature,Humidity and Moisture sensor with arduino mega?
ReplyDeleteI have flashed it just need minimum wiring to use it as UART, Can you share minimum wiring required to use ESP8266?
ReplyDeleteWiring you mentioned are nt working.