| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.

View
 

ESP8266

Page history last edited by Matt Callow 6 years, 6 months ago

This page documents some (hopefully useful) info about the ESP8266 wifi modules.

 

Some of this info is available elsewhere on the web, some is (as far as I know) not documented elsewhere.

 

First, some links to other sources of information

 

 

Module Variants

There are a number of different modules available (from http://www.esp8266.com/viewtopic.php?f=5&t=28)

 

ESP-01

The most common module with printed PCB antenna:

  • 2x4 2.54 mm pitch header
  • built-in PCB-printed antenna
  • 3 GPIOs: GPOI0/2/16
  • UART URXD/UTXD
  • RESET and CH_PD (powerdown)
  • VCC/GND
  • 14.2 mm W x 14.2 mm L

 


ESP-01 ESP8266 WiFi Module Pinout

 

Note: In the above diagram, GPIO16 is not shown (it is replaced by RST). Whether this is a GPIO or reset pin is currently unknown

Note: On some pinout, GPIO2/GPIO0/RST and CH_PD are shown as NC

ESP-02
A less common module with antenna connector, that may be compatible with breadboards:

  • Dual 1x4 2.54 mm pitch header in DIP form factor
  • built-in U-FL connector for external antenna
  • 2 GPIOs: GPOI0/2
  • UART URXD/UTXD
  • RESET and CH_PD (powerdown)
  • VCC/GND
  • 14.7 mm W x 14.2 mm L

ESP-02 ESP8266 WiFi Module Pinout



ESP-03
A SMT (Sufrace Mount Technology) module with all pins broken out to castellated pads with built-in ceramic antenna:

  • Dual 1x7 2 mm pitch castellated pads
  • built-in ceramic antenna
  • 7 GPIOs: GPOI0/2/12/13/14/15/18
  • UART URXD/UTXD
  • RESET and CH_PD (powerdown)
  • VCC/GND
  • 12.2 mm W x 17.4 mm L

ESP-03 ESP8266 WiFi Module Pinout



ESP-04
Another SMT (Sufrace Mount Technology) module with all pins broken out to castellated pads without built-in antenna:

  • Dual 1x7 2 mm pitch castellated pads
  • external antenna on pad
  • 7 GPIOs: GPOI0/2/12/13/14/15/18
  • UART URXD/UTXD
  • RESET and CH_PD (powerdown)
  • VCC/GND
  • 12.0 mm W x 15.0 mm L

Pinout is the same as ESP-03



ESP-05
A simple UART-only module with antenna connector:

  • Single 1x4 2.54 mm pitch header
  • built-in U-FL connector for external antenna
  • *]No GPIO
  • UART URXD/UTXD
  • No RESET nor CH_PD (powerdown)
  • VCC/GND
  • 14.2 mm W x 14.2 mm L
ESP-05.jpg
ESP-05 ESP8266 WiFi Module Pinout

 

From the same forum, comes this info (http://www.esp8266.com/viewtopic.php?f=5&t=28&start=20)

 

Each have their own characteristics: 
1 ESP-01 PCB antenna, after matching to do about the open 400 meters from the simple to use 
2 ESP-02 SMD package suitable size limit, the antenna can be drawn with the IPX header casing 
3 ESP- 03 SMD package, built-in ceramic antenna technology. All available IO leads 
4 ESP-04 SMD package, customers can customize the antenna type, flexible design all available IO leads 
5 ESP-05 SMD package, only leads to serial and RST pin, small external antenna. 
6 ESP-06 bottom mount technology, leads all the IO ports with metal shielding can be identified through the FCC CE certified recommended 
7 ESP-07 semi-hole chip technology, leads all the IO ports, with a metal shield, can be over FCC CE Certification IPX external antenna, built-in ceramic antenna can also be used. 
8 ESP-08 with ESP-07, except that the antenna is in the form of customers can define their own 
9 ESP-09 Ultra-Small footprint, only 10 * 10 mm, four board process! 1M bytes of FLASH impedance matching through the bottom mount technology for strict limits on the volume of products! 
10 ESP-10 patch interface, narrow-body design, 10 mm wide. Suitable for light with controller 
11 ESP-11 patch interface, ceramic antenna, small size.

 

ESP-11 module pinout, as discovered by JD and Scott

 

AT Command Mode

 


By default, these modules come with an AT command processor and can act as a serial to WiFi bridge. There is lots of info on the web about this.

 

insert links here

 

I've written an Arduino (teensy3) sketch that uses this mode. It's available here https://github.com/mattcallow/esp8266

It has also been reported to work with a Mega-2560 

 

There are also various websites which describe how you can update this firmware, for example http://www.electrodragon.com/w/Wi07c

 

For this mode of operation, additional GPIOs are probably not required, since you will be using another micro to connect to the module. Therefore, the ESP-01 module is probably the easiest choice.

 

Note: to get anything out of the module, you need to tie CH_PD high (+3.3V), otherwise the module is powered down and does not respond!

 

 

 

SDK

 

My interest is using the ESP8266 as a fully self-contained WiFi connected microcontroller. For this, we need to use the SDK which EspressIf have recently released. 

I think that ESP-03 and ESP-07 will be the most useful modules for this kind of work.

The sdk is available here: http://bbs.espressif.com/viewtopic.php?f=5&t=3

Cross compiler and Virtual box image available here: http://bbs.espressif.com/viewtopic.php?f=5&t=2

 

Programming Guide here: ESP8266_IoT_SDK_Programming Guide_v0.9.1.pdf

I use the cross compiler and sdk on an ubuntu VM (my own, not the one provided by EspressIf). I've have no problem compiling the code so far.

Tool the flash images onto the EEPROM here: https://github.com/themadinventor/esptool (python - runs on Windows and Linux, maybe Mac?)

 

How to compile

TODO

How to flash the new image

TODO

OTA (Over the air) updating

TODO

 

EspressIf samples

The sample programs with the SDK are an AT command processor and an IoT demo which can be configured as a remote switch, RGB light or sensor.

I've built the switch demo with the ESP-01 module, using GPIO2 instead of GIO15 (which is not broken out on the board).

The demo includes an http server which responds to GET and POST requests as follows (this info discovered by reading the source code):

 

URL is split into 3 parts:

pSelect

pCommand

pFilename

 

Accepts GET or POST requests

 

GET:

pSelect=client, config

 

When pSelect=client

pCommand=command

pFilename=info, status, scan

 

info returns a JSON resonse like this

{

"Version":{

"hardware":"0.1",

"software":"0.9.2"

},

"Device":{

"product":"Plug",

"manufacturer":"Espressif Systems"

}

}

 

status returns a JSON response like this

{

"Status":{

"status":40

}

}

 

scan seems to a an AP Scan - needs further investigation

 

When pSelect=config

pCommand=command

pFilename=wifi, switch, light, reboot

 

wifi returns a JSON response like this

 

{
 "Response":{ "Station":{
"Connect_Station":{
     "ssid":"RoboDino", 
     "password":"******" 
},
"Ipinfo_Station":{ "ip":"192.168.0.237", "mask":"255.255.255.0", "gw":"192.168.0.1" } },
 "Softap":{ "Connect_Softap":{ "authmode":"OPEN", "channel":3, "ssid":"ESP_98EADC", "password":"" },
"Ipinfo_Softap":{ "ip":"192.168.4.1", "mask":"255.255.255.0", "gw":"192.168.4.1" } } }
 }

 

POST:

pSelect=config

 

The module starts up configured as a AP, with an IP of 192.168.4.1

 

It also has a discovery mode which you can use to find all devices on your network (using UDP broadcast)

 

TODO - describe this in more detail

TODO - add sample client program

 

 

 

Comments (0)

You don't have permission to comment on this page.