Esp8266 Series Modules User Manual en
Esp8266 Series Modules User Manual en
h ink
ESP-01/07/12 Series Modules User's Manual
-T
Version 1.3
Ai
Ai-Thinker Inc
Revision Record
er
2017.07.01 V1.0 Wang Chong First Version
h ink
-T
Ai
ESP-01/07/12 Series Modules User's Manual V1.3
Table Of Contents
1 Product Overview ...........................................................................................1
er
1.1 Product Features...................................................................................1
1.2 Application Plan...................................................................................1
2 Module Interface.............................................................................................2
2.1 Package Size ........................................................................................2
2.1 Pin Definition.......................................................................................6
2.2 Boot Mode ...........................................................................................7
ink
3 Electrical Characteristics.................................................................................8
3.1 Maximum Ratings ................................................................................8
3.2 Suggested Working Environment .........................................................8
3.3 Digital Port Features ............................................................................8
3.4 Power Consumption .............................................................................8
3.5 Transmit Power .................................................................................. 10
3.6 Receive Sensitivity ............................................................................. 10
4 Hardware Guidance ...................................................................................... 11
h
4.1 Typical Applications .......................................................................... 11
4.2 PCB Antenna Display Instructions .....................................................13
4.3 Module Peripheral Routing Instructions .............................................14
-T
4.4 GPIO Level Conversion .....................................................................14
4.5 Power Supply Reference Design ........................................................ 15
4.6 ADC Supply Reference Design ..........................................................15
4.7 Automatically Download Reference Design .......................................16
4.8 Reflow oven temperature curve .......................................................... 16
5 Usage Guide ................................................................................................. 17
Ai
5.1.4 AT+RESTORE........................................................................18
5.2 Use Examples ....................................................................................18
er
5.2.1 TCP Communication Test........................................................ 18
5.2.2 UDP Communication Test ....................................................... 20
6 FAQ .............................................................................................................22
6.1 Garbage Instructions When Power Is On ............................................22
6.2 How To Shield The Power When The Garbled ................................... 22
6.3 Can’t Burn Normally ....................................................................... 22
ink
6.4 SDK Development Environment ........................................................23
6.5 Startup Information Description .........................................................23
7 Module Selection .......................................................................................... 23
8 Contact US ................................................................................................... 25
h
-T
Ai
ESP-01/07/12 Series Modules User's Manual V1.3
1 Product Overview
er
ESP8266 series wireless module is a series of cost-effective Wi-Fi SOC module
which can be developed independently. The series modules support the standard
IEEE802.11 b/g/n protocol, built-in complete TCP/IP protocol stack. Users can use
this series of modules to add networking capabilities to existing devices, or to build
standalone network controllers.
Ai-Thinker Technology can provide customers with a complete hardware,
processor
h ink
software reference program, in order to shorten your product development cycle, for
Clocked at up to 160MHz
Built-in 10 bit high precision ADC
Support UART/GPIO/IIC/PWM/ADC/HSPI and other interfaces
Integrated Wi-Fi MAC/BB/RF/PA/LNA
Supports multiple sleep modes, deep sleep current as low as 20uA
Embedded Lwip protocol stack
Support STA/AP/STA + AP work mode
-T
Supports Smart Config/AirKiss key distribution network
Serial port rate up to 4Mbps
General AT commands can be used quickly
Support SDK secondary development
Supports serial local upgrade and remote firmware upgrade (FOTA)
Page 1 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
2 Module Interface
er
h ink
Figure 2.1 ESP-01/ESP-01S pin dimensions
-T
Ai
Page 2 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
h ink
Figure 2.3 ESP-01F pin dimensions
-T
Page 3 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
h ink
Figure 2.5 ESP-07S pin dimensions
-T
Ai
Page 4 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
h ink
Figure 2.7 ESP-12S pin dimensions
Page 5 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
Pin Number
07 Pin
01 Remarks
01M 01F 07S 12F Name
01S
12S
7 18 16 1 1 RST Reset Pin, Active Low
AD conversiont, Input voltage range
- 16 3 2 2 ADC
0~1V, the value range is 0~1024.
ink
6 9 4 3 3 EN Chip Enabled Pin, Active High
5 Connect with RST pin to wake up
- 17 4 4 IO16
Deep Sleep
- 15 6 5 5 IO14 HSPI_CLK IR_T I2C_SCL
I2SI_WS
- 14 7 6 6 IO12 HSPI_MISO
- 5 8 7 7 IO13 HSPI_MOSI; UART0_CTS
8 2 17 8 8 VCC Module power supply pin, the
voltage range of 3.0 ~ 3.6V
- - - 9 CS0 Flash chip select signal
- - - 10 MISO Slave Output Master Input
h
- 11 - 11 IO9 GPIO9 Only ESP-01M Can
- 12 - 12 IO10 GBIO10 Only ESP-01M Can
- - - 13 MOSI Master Output Slave Input
- - - 14 SCLK Clock
-T
1 1 2/18 9 15 GND GND
- 6 9 10 16 IO15 HSPI_CS U0_RTS I2SO_BCK
2 7 10 11 17 IO2 U1_TXD I2C_SDA I2SO_WS
3 8 11 12 18 IO0 GPIO0 HSPI_MISO I2SI_DATA
- 10 12 13 19 IO4 GPIO4
- 13 13 14 20 IO5 IR_R
Ai
er
CH_PD
Mode RST GPIO15 GPIO0 GPIO2 TXD0
(EN)
Download
high high low low high high
mode
Running
high high low high high high
mode
Chip Test
high high - - - low
mode
h ink
-T
Ai
Page 7 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
3 Electrical Characteristics
er
Table 3.1 Maximum Ratings
Rated value condition Value Unit
ink
IPC/JEDEC +3.0 ~ +3.6 V
Supply Voltage
J-STD-020
temperature 20 .
All measurements are made at the antenna interface without SAW filters.
Page 8 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
All transmit data is based on a 90% duty cycle measured in the continuous firing
mode.
Table 3.4 Power consumption
er
Ty Ma
Mode Min Unit
p x
Transmit 802.11b, CCK 11Mbps, POUT = + 170 mA
17dBm
Transmit 802.11g, OFDM 54Mbps, POUT = + 140 mA
15dBm
Transmit 802.11n, MCS7, POUT = + 13dBm 120 mA
Light-Sleep
h ink 50
56
56
20
2
mA
mA
mA
mA
mA
Deep-Sleep 20 uA
Power Off 1 uA
Note: Modem-Sleep is used to require the CPU to remain in operation, such as PWM or I2S.
When there is no data transmission while maintaining a WiFi connection, power off the WiFi
-T
Modem circuit according to the 802.11 standard (eg U-APSD). For example, in DTIM3, every
sleep 300mS, wake up 3mS receive AP Beacon package, etc., the overall average current of about
20mA.
Note : Light-Sleep for CPU can be suspended applications, such as WiFi switch. If there
is no data transmission while maintaining a WiFi connection, the WiFi Modem circuit can be
switched off and the CPU is powered down according to the 802.11 standard (eg U-APSD). For
example, at DTIM3, every sleep 300 ms, wake up 3 ms to receive AP's Beacon packets, etc., the
overall average current is about 2 mA.
Note: Deep-Sleep is used for applications that do not have to keep the WiFi connection for a
Ai
long time, such as a sensor that measures the temperature once every 100 seconds. Every 300 s
wake up after 0.3s - 1s connected to the AP to send data, the overall average current can be much
smaller than 2mA.
Page 9 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
Describe Min Typ Max Unit
802.11b@11Mbps 14 16 18 dBm
802.11g@54Mbps 12 14 16 dBm
802.11n@HT20, MCS7 11 13 15 dBm
DSSS, 1 Mbps
CCK, 11 Mbps
6 Mbps (1/2 BPSK)
Parameter
Min Typ
-95
-80
-88
-70
-67
Max Unit
dBm
dBm
dBm
dBm
dBm
-T
Ai
Page 10 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
4 Hardware Guidance
er
Note: You can’t use USB to TTL 3.3V or 5V power supply, it is recommended
to use two dry batteries or after conversion through the LDO 3.3V, it is strongly
recommended to buy a new development board.
h ink
Figure 4.1 Typical application of ESP-01
-T
Figure 4.2 Typical application of ESP-01S
Ai
Page 11 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
h ink
Figure 4.4 Typical application of ESP-01F
Page 12 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
Figure 4.7 Typical application of ESP-12E/ESP-12F
h ink
Figure 4.8 Typical application of ESP-12S
The ESP8266 series module can be soldered to the PCB board. In order to get
the best RF performance of the end product, please pay attention to the rational
-T
design of the module and the placement of the antenna on the bottom plate according
to this guide.
Option 1 (recommended):
Place the module along the edge of the PCB board, and the antenna is placed
outside the frame or along the board and the bottom is hollowed out;
Option 2:
Ai
The module placed along the PCB board side, the antenna placed along the
board and the bottom of the hollow;
Option 3:
Place the module along the board side of the board, the antenna placed along the
Page 13 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
ink
Figure 4.7 ESP-12S antenna placement instructions
Page 14 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
4.6 ADC Supply Reference Design
h ink
Figure 4.9 Power supply reference
-T
Figure 4.10 ADC supply reference
Ai
Page 15 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
4.8 Reflow oven temperature curve
h ink
Figure 4.11 Automatically Download Reference Design
-T
Ai
Page 16 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
5 Usage Guide
ESP8266 series module factory default built-in AT firmware, and the default
er
baud rate of 115200, can refer to 4.1 typical application diagram to build the
minimum system circuit, then the AT command operation.
Serial and network debugging tools download: http://wiki.ai-thinker.com/tools
ink
This chapter only describes the common AT commands, please refer to
http://wiki.aithinker.com/esp8266/docs#at
5.1.1 AT
parameters No
Description Test AT is OK
AT
Example
OK
5.1.2 AT+GMR
h
parameters No
Description Returns the firmware version information
AT+GMR
-T
AT version:1.2.0.0(Jul 1 2016 20:04:45)
Example SDK version:1.5.4.1(39cb9a32)
Ai-Thinker Technology Co. Ltd.
Dec 2 2016 14:21:16
OK
5.1.3 AT+RST
parameters No
Ai
Page 17 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
5.1.4 AT+RESTORE
parameters No
er
Description Reset the module to factory settings
AT+RESTORE
Example
OK
ink
This section explains how to configure two modules through the serial port on
the PC side to communicate with each other over TCP/UDP. For more examples,
please refer to: http://wiki.ai-thinker.com/esp8266/examples/at_demo. Test, through
the PC side instead of one end of the module to establish the appropriate connection.
ready
AT+CWMODE=2 //configured for AP mode
-T
OK
AT+CWSAP_DEF="TCP_Server","12345678",5,4 //Configure AP
information
OK
AT+CIFSR //Query the local IP address
Ai
+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"a2:20:a6:19:c7:0a"
OK
AT+CIPMUX=1 //open multiple links
Page 18 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
OK
AT+CIPSERVER=1 //open the server
er
OK
0,CONNECT //There is a client connected to the server
h OK
0,CLOSED
TCP Client Configuration
Ai-Thinker Technology Co. Ltd.
ready ink
//TCP connection is off
OK
AT+CWJAP_DEF="TCP_Server","12345678" //Connect to AP
WIFI CONNECTED
WIFI GOT IP
OK
AT+CIFSR //Query the local IP address
-T
+CIFSR:STAIP,"192.168.4.2"
+CIFSR:STAMAC,"5c:cf:7f:91:8b:3b"
OK
AT+CIPMUX=0 //open single link
Ai
OK
AT+CIPSTART="TCP","192.168.4.1",333 //Connect to TCP server
CONNECT
OK
AT+CIPSEND=10 //send 10 bytes of data to the server side
Page 19 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
OK
> //After the emergence of the symbol serial port to send
er
Ai-Thinker (without carriage return line)
Recv 10 bytes //The serial port receives the data
ready
AT+CWMODE=2
OK
ink
One is in AP mode , the local port is 8001, and the other is Station mode. the
OK
AT+CIFSR //Query the local IP address
+CIFSR:APIP,"192.168.4.1"
-T
+CIFSR:APMAC,"a2:20:a6:19:c7:0a"
OK
AT+CIPSTART="UDP","192.168.4.2",8002,8001,0 //Open UDP
connection
CONNECT
Ai
OK
OK
Page 20 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
er
SEND OK
AT+CIPCLOSE //close the UDP connection
CLOSED
OK
Station Configuration
ink
Ai-Thinker Technology Co. Ltd.
ready
AT+CWMODE=2 //configured for station mode
OK
AT+CWSAP_DEF="TCP_Server","12345678",5,4 //Connect to AP
OK
AT+CIFSR //Query the local IP address
h
+CIFSR:STAIP,"192.168.4.2"
+CIFSR:STAMAC,"5c:cf:7f:91:8b:3b"
OK
AT+CIPSTART="UDP","192.168.4.1",8001,8002,0 //Open UDP connection
-T
CONNECT
OK
AT+CIPSEND=10 //send 10 bytes of data to the server
OK
Ai
SEND OK
Page 21 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
CLOSED
er
OK
6 FAQ
ink
ESP8266 chip itself supports 26MHz and 40MHz crystal, if the use of 40MHz
crystal, the default baud rate of 115200, if the use of 26MHz crystal, the UART0
power after the baud rate = 26 * 115200/40 = 74880, the letter can be ESP8266
Series modules are used 26MHz, because the general serial port tool does not support
the baud rate, so there will be printed on the garbled.
You can use the security serial interface assistant to configure the baud rate
74880 to view the startup information.
Note: part of the USB to TTL does not support 74880 baud rate, the computer
h
comes with RS232 to TTL does not support 74880 baud rate, recommend the use of
FT232, CP2102, CH340 and other chips.
er
environment.
Start, if the power and serial port connection is normal, then the baud rate 74880
to see the first sentence is as follows:
ink
ets Jan 8 2013,rst cause:1, boot mode:(3,6)
The start and start modes of the module can be analyzed based on the print
information:
rst cause
1: Power restart
2: External reset
4: Hardware watchdog reset
boot mode
h
The second in parentheses has no practical meaning, the first can refer to the
following table to start the information analysis:
Table 6.1 Startup Mode Description
Value Mode GPIO0 GPIO2 GPIO15
-T
0 - 0 0 0
1 Download Mode 0 1 0
2 - 1 0 0
3 Run mode 1 1 0
4 - 0 0 1
5 - 0 1 1
6 - 1 0 1
7 - 1 1 1
Ai
7 Module Selection
Page 23 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
layer 2 2 4 2 4 4 4
er
Flash size 8Mbit 8Mbit 8Mbit 8Mbit 32Mbit 32Mbit 32Mbit
Certificati
- - - - FCC/CE FCC/CE FCC/CE
on
Ceramic
Antenna PCB PCB PCB IPEX PCB PCB
IPEX
Indicator TXD0 GPIO2
ink
GPIO2 - GPIO2 GPIO2 GPIO2
light POWER POWER
Available
2 2 11 9 9 9 9
IO
For more selection information please see http://wiki.ai-thinker.com/esp8266 or
contact us.
h
-T
Ai
Page 24 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
ESP-01/07/12 Series Modules User's Manual V1.3
8 Contact US
er
Develop Wiki: http://wiki.ai-thinker.com
Official forum: http://bbs.ai-thinker.com
Sample purchase: https://anxinke.taobao.com
Business cooperation: [email protected]
Technical support: [email protected]
ink
Telephone: 0755-29162996
Company Address: 6/F, Block C2, Huafeng Industrial Park, Hangcheng Road,
Bao'an Road, Baoan District, Shenzhen ,China
h
WeChat AiSmart APP
-T
Ai
Page 25 of 23
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved