Espressif Systems ESP8266EX User manual

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
!
!
!
!
!
ESPRESSIF
ESP8266EX:
A BEGINNER’S GUIDE
!
!
!
!
!
!
!| Page" " September 17, 20141

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
!
!
!
!
!
!
!
!
!
!
!
!| Page" " September 17, 20142

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
!
!
Disclaimer and Copyright Notice
Information in this document, including URL references, is subject to change without
notice.
THIS DOCUMENT IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER,
INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS
FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF
ANY PROPOSAL, SPECIFICATION OR SAMPLE. All liability, including liability for
infringement of any proprietary rights, relating to use of information in this document is
disclaimed. No licenses express or implied, by estoppel or otherwise, to any intellectual
property rights are granted herein.
The Wi-Fi Alliance Member Logo is a trademark of the Wi-Fi Alliance.
All trade names, trademarks and registered trademarks mentioned in this document are
property of their respective owners, and are hereby acknowledged.
Copyright © 2013 Espressif Systems Inc. All rights reserved.
!
!| Page" " September 17, 20143

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
Table of Contents
!
1. INTRODUCTION 7.....................................................................................................................................
1.1. GENERAL OVERVIEW 7...........................................................................................................................
1.1.1. Features 9
1.1.2. Specifications 9.............................................................................................................................
1.1.3. Applications 11
1.2. HARDWARE OVERVIEW 12.....................................................................................................................
1.2.1. Pin Definition 12...........................................................................................................................
1.2.2. Electrical Characteristics 14...........................................................................................................
1.2.3. Power Consumption 14.................................................................................................................
1.2.4. Package Footprint 15.....................................................................................................................
1.2.5. Hardware Development Kit 16......................................................................................................
1.2.6. ESP8266EX Modules (WROOM) 18..............................................................................................
1.3. APPLICATIONS USING ESP8266EX 20......................................................................................................
1.3.1. UART Connector (as in Fig. 4 Demo Board) 20............................................................................
1.3.2. Sensor Application (as in Fig. 5 USB Sensor Demo) 20.................................................................
1.3.3. Smart Light Application (as in Fig. 6 Smart Light Demo) 21...........................................................
1.3.4. Wi-Fi Smart Plug Application 23....................................................................................................
2. SOFTWARE FEATURES 24............................................................................................................................
2.1. WIRELESS NETWORKING 24....................................................................................................................
2.1.1. SoftAP Mode 24
2.1.2. Station Mode 25
2.1.3. SoftAP + Station Mode 25.............................................................................................................
2.2. PASS-THROUGH CONNECTION 26...........................................................................................................
2.3. UART FRAMES 26.................................................................................................................................
2.4. ENCRYPTION 27....................................................................................................................................
2.5. LOW POWER OPERATION 28..................................................................................................................
2.6. FIRMWARE UPDATER 28.........................................................................................................................
3. ESPRESSIF CLOUD SERVER 29.....................................................................................................................
3.1. GUIDE TO USING ESPRESSIF CLOUD SERVER WEBSITE 29............................................................................
3.1.1. Device Development 31...............................................................................................................
3.1.2. Product Management 35...............................................................................................................
3.2. GUIDE TO USING ESP8266EX MODULES 36............................................................................................
3.2.1. Software Debugging Tools 36.......................................................................................................
3.2.2. Network Connections 36..............................................................................................................
3.2.3. Default Connection Parameters 36................................................................................................
3.3. APPLICATION EXAMPLES 37.....................................................................................................................
3.3.1. Wi-Fi Remote Control 37...............................................................................................................
3.3.2. Wi-Fi Remote Access 37................................................................................................................
!| Page" " September 17, 20144

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
3.3.3. Transparent Serial 38.....................................................................................................................
4. AT INSTRUCTION SET 39...........................................................................................................................
4.1. OVERVIEW 39
4.2. BASIC AT INSTRUCTIONS 39...................................................................................................................
4.3. WI-FIINSTRUCTIONS 40........................................................................................................................
4.4. TCP/IP TOOLBOX 42.............................................................................................................................
5. DEVELOPMENT KIT 48................................................................................................................................
5.1. COMPONENTS OF ESP8266EX DEVELOPMENT KIT 48...............................................................................
5.2. DOCUMENTATION LIST 49......................................................................................................................
APPENDIX: CONTACT DETAILS 50.................................................................................................................
!| Page" " September 17, 20145

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
!
!
!
!
!| Page" " September 17, 20146

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1. Introduction
1.1. General Overview
Espressif Systems’ Smart Connectivity Platform (ESCP) is a set of high performance, high
integration wireless SOCs, designed for space and power constrained mobile platform
designers. It provides unsurpassed ability to embed Wi-Fi capabilities within other systems,
or to function as a standalone application, with the lowest cost, and minimal space
requirement.
!
Figure 1: ESP8266EX Block Diagram
!
ESP8266EX offers a complete and self-contained Wi-Fi networking solution; it can be used
to host the application or to offload Wi-Fi networking functions from another application
processor.
When ESP8266EX hosts the application, it boots up directly from an external flash. In has
integrated cache to improve the performance of the system in such applications.
Alternately, serving as a Wi-Fi adapter, wireless internet access can be added to any
microcontroller-based design with simple connectivity (SPI/SDIO or I2C/UART interface).
ESP8266EX is among the most integrated WiFi chip in the industry; it integrates the
antenna switches, RF balun, power amplifier, low noise receive amplifier, filters, power
RF
receive
Analog
receive
RF
transmit
Analog
transmit
RF balun
PLL
Digital baseband
PMUSRAM
Registers
CPU
Sequencers
Accelerator
MAC
SDIO
SPI
GPIO
I2C
Interface
Bias circuits
Switch
VCO 1/2 PLL
PMU Crystal
!| Page" " September 17, 20147

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
management modules, it requires minimal external circuitry, and the entire solution,
including front-end module, is designed to occupy minimal PCB area.
ESP8266EX also integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit
processor, with on-chip SRAM, besides the Wi-Fi functionalities. ESP8266EX is often
integrated with external sensors and other application specific devices through its GPIOs;
codes for such applications are provided in examples in the SDK.
Sophisticated system-level features include fast sleep/wake context switching for energy-
efficient VoIP, adaptive radio biasing for low-power operation, advance signal processing,
and spur cancellation and radio co-existence features for common cellular, Bluetooth,
DDR, LVDS, LCD interference mitigation.
!
!| Page" " September 17, 20148

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.1.1. Features
▪802.11 b/g/n protocol
▪Wi-Fi 2.4 GHz, support WPA/WPA2
▪Super small module size (11.5mm x 11.5mm)
▪Integrated 10-bit ADC
▪Integrated TCP/IP protocol stack
▪Integrated TR switch, balun, LNA, power amplifier and matching network
▪Integrated PLL, regulators, and power management units
▪+20dBm output power in 802.11b mode
▪Supports antenna diversity
▪Deep sleep power <10uA, Power down leakage current < 5uA
▪Integrated low power 32-bit MCU
▪SDIO 2.0, SPI, UART
▪STBC, 1x1 MIMO, 2x1 MIMO
▪A-MPDU & A-MSDU aggregation & 0.4µs guard interval
▪Wake up and transmit packets in < 2ms
▪Standby power consumption of < 1.0mW (DTIM3)
▪Operating temperature range -40C ~ 125C
!
1.1.2. Specifications
!
Category
Parameter
Value
Wi-Fi
Standard
CCC/FCC/CE
Wi-Fi
802.11b/g/n
Frequency
2.4G-2.5G (2400M-2483.5M)
Tx Power
802.11b: 20dBm
802.11g: 17dBm
802.11n: 14dBm
Rx Sensitivity
802.11b: (11Mbps) -91dBm
802.11g: (54Mbps) -75dBm
!| Page" " September 17, 20149

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
!
!
802.11n: (MCS7) -72dBm
Antenna
PCB Trace, External, IPEX
Connector, Ceramic Chip
Hardware
Data Interface
UART/SDIO/SPI/I2C
PWM, GPIO
Operating Voltage
3.0~3.6V
Operating Current
Avg. 80mA
Operating Temperature
-40 C ~ 125 C
Storage Temperature
Room Temperature
Size
5x5mm
External Interface
N.A.
Software
Wi-Fi Mode
Station/SoftAP/SoftAP+Station
Security
WPA/WPA2
Encryption
WEP/TKIP/AES
Firmware Upgrade
UART Flash Download /
Via Cloud Server
SW Development
Supports Cloud Server
Development / SDK for custom
firmware development
Network Protocols
IPv4. TCP/UDP/HTTP/FTP
User Config
AT Instruction Set, Cloud Server,
Android/iOS App
!| Page" " September 17, 201410

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.1.3. Applications
▪Smart power plugs
▪Home automation
▪Mesh network
▪Industrial wireless control
▪Baby monitors
▪IP Cameras
▪Sensor networks
▪Wearable electronics
▪Wi-Fi location-aware devices
▪Security ID tags
▪Wi-Fi position system beacons
!
!
!| Page" " September 17, 201411

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.2. Hardware Overview
1.2.1. Pin Definition
!
Figure 2: ESP8266EX Pin Definition Diagram
!
Pin
Name
Type
Function
1
VDDA
P
Analog Power 3.0 ~3.6V
2
LNA
I/O
RF Antenna Interface,Chip Output Impedance=50 Ω
No matching required but we recommend that the π-
type matching network is retained.
3
VDD3P3
P
Amplifier Power 3.0~3.6V
4
VDD3P3
P
Amplifier Power 3.0~3.6V
5
VDD_RTC
P
NC(1.1V)
!| Page" " September 17, 201412

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
Note: GPIO2, GPIO0, MTDO can be configurable as 3-bit SDIO mode"
6
TOUT
I
ADC Pin
7
CHIP_EN
I
Chip Enable. High: On, chip works properly; Low:
Off, small current
8
XPD_DCDC
I/O
Deep-Sleep Wakeup;GPIO16
9
MTMS
I/O
GPIO14; HSPICLK
10
MTDI
I/O
GPIO12;HSPIQ
11
VDDPST
P
Digital/IO Power Supply (1.8V~3.3V)
12
MTCK
I/O
GPIO13;HSPID
13
MTDO
I/O
GPIO15;HSPICS
14
GPIO2
I/O
UART Tx during flash progamming; GPIO2
15
GPIO0
I/O
GPIO0;SPICS2
16
GPIO4
I/O
GPIO4
17
VDDPST
P
Digital/IO Power Supply (1.8V~3.3V)
18
SDIO_DATA_2
I/O
Connect to SD_D2 (Series R 200Ω);SPIHD; HSPIHD
19
SDIO_DATA_3
I/O
Connect to SD_D3 (Series R 200Ω); SPIWP; HSPIWP
20
SDIO_CMD
I/O
Connect to SD_CMD(Series R 200Ω); SPICS0
21
SDIO_CLK
I/O
Connect to SD_CLK (Series R 200Ω); SPICLK
22
SDIO_DATA_0
I/O
Connect to SD_D0 (Series R 200Ω); SPIQ
23
SDIO_DATA_1
I/O
Connect to SD_D1 (Series R 200Ω); SPID
24
GPIO5
I/O
GPIO5
25
U0RXD
I/O
UART Rx during flash progamming; GPIO3
26
U0TXD
I/O
UART Tx during flash progamming; GPIO1; SPICS1
27
XTAL_OUT
I/O
Connect to crystal output, can be used to provide BT
clock input
28
XTAL_IN
I/O
Connect to crystal input
29
VDDD
P
Analog Power 3.0~3.6V
30
VDDA
P
Analog Power 3.0~3.6V
31
RES12K
I
Connect to series R 12kΩto ground
32
EXT_RSTB
I
External reset signal (Low: Active)
!| Page" " September 17, 201413

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.2.2. Electrical Characteristics
!
1.2.3. Power Consumption
1 Modem-Sleep requires the CPU to be working, as in PWM or I2S applications. According to
802.11 standards (like U-APSD), it saves power to shut down the Wi-Fi Modem circuit while
Parameter
Condition
Min
Typical
Max
Unit
Storage Temperature
-40
Room
125
℃
Maximum Soldering
Temperature
IPC/JEDEC J-
STD-020
260
℃
Operating Voltage
3.0
3.3
3.6
V
Any I/O Pin Voltage
VIL
-0.3/0.75V
O
0.25V
V
VOL
N/0.8V
0.1V
V
IMAX
12
mA
Electrostatic Discharge
(HBM)
TAMB=25℃
2
KV
Electrostatic Discharge
(CDM)
TAMB=25℃
0.5
KV
Parameter
Typical Value
Unit
Tx802.11b, CCK 11Mbps, P OUT=+17dBm
170
mA
Tx802.11g, OFDM 54Mbps, P OUT =+15dBm
140
mA
Tx802.11n, MCS7, P OUT =+13dBm
120
mA
Rx802.11b, 1024 byte packet size, -80dBm
50
mA
Rx802.11g, 1024 byte packet size, -70dBm
56
mA
Rx802.11n, 1024 byte packet size, -65dBm
56
mA
Modem-Sleep
15
mA
Light-Sleep
0.9
mA
Deep-Sleep
10
uA
Off
5
uA
!| Page" " September 17, 201414

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
maintaining a Wi-Fi connection with no data transmission. E.g. in DTIM3, to maintain a sleep
300ms-wake 3ms cycle to receive AP’s Beacon packages, the current is about 15mA
2 During Light-Sleep, the CPU may be suspended in applications like Wi-Fi switch. Without data
transmission, the Wi-Fi Modem circuit can be turned off and CPU suspended to save power
according to the 802.11 standard (U-APSD). E.g. in DTIM3, to maintain a sleep 300ms-wake 3ms
cycle to receive AP’s Beacon packages, the current is about 0.9mA
3 Deep-Sleep does not require Wi-Fi connection to be maintained. For application with long time
lags between data transmission, e.g. a temperature sensor that checks the temperature every 100s,
sleep 300s and waking up to connect to the AP (taking about 0.3~1s), the overall average current is
less than 1mA.
!
1.2.4. Package Footprint
!
Figure 3: ESP8266EX Package Dimensions
!
!
!| Page" " September 17, 201415

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.2.5. Hardware Development Kit
Espressif provides a demo board for ESP8266EX.
!
! "
Figure 4: ESP8266EX Demo Board (Brief Outline)!
!
▪External power supply: 5V, 1A, positive in, negative out.
▪External 5V power supply split through 3 LDO for ESP8266: PA, LNA and IO. Blue
variable resistor can be used to adjust the value of the three power supplies. Please
make sure the supply voltage is within the specified range.
▪Reset button connected to EXT_RSTB, for external reset. Toggle switch is connected
to the chip enable, please pay attention to maintaining a high (switch down) when
used.
▪Users can either use the RS-232 serial port or UART connector board for download,
print log and serial communication.
!| Page" " September 17, 201416
MTDO
GPIO0
GPIO2
Mode
1
X
X
SDIO/SPI
0
0
1
UART Download
0
1
1
Flash Boot

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
▪When connected to a typical external SMA antenna, RF performance tests can be
done using cable lines connected to the test instrument.
▪MTDO, GPIO0, GPIO2 form a 3-bit selectable SDIO mode. Please refer to board
markings for jumper info. Confirm power mode settings are correct by printing log.
!
!
▪Demo board has 2 SPI flash: flash1 and flash2 used as storage for firmware
application development. Flash can be selected via jumper, CS high (H) to disable
the flash.
Flash1: Use SDIO connection, mostly used for standalone mode.
Flash2: Use HSPI connection (multiplexing GPIO port). Mainly used in SIP mode,
the SDIO (SPI) for external MCU, GPIO port multiplexing with HSPI to connect to
flash.
!
!
!| Page" " September 17, 201417

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.2.6. ESP8266EX Modules (WROOM)
Espressif offers 2 kinds of modules, SMD and DIP.
SMD:
!
! "
Figure 5: WROOM SMD Module!
!
1. Refer to Figure 5 for pin definition. Module size is 11.8x15mm. Flash package is
SOP8-150mil. Refer below for usage of SMD module (Tables in section 1.2.1 for
reference):
2. Connect Pin 3V3 and VDIO to an external power source.
3. CH_PD: high.
4. MTDO: low, GPIO2 if not used may be left floating (high), GPIO0 to be switched
between high and low for Uart Download and Flash Boot mode respectively.
5. Connect GND U0RXD U0TXD, use USB to TTL serial cable to download, print log
and send data
!| Page" " September 17, 201418

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
DIP:
!"
Figure 6: WROOM DIP Module!
!
Refer to Figure 6 for and pin definition.
Features:
1. Ultra-small size: 11.5x11.5mm.
2. Flash package: USON8_2x3mm. Flash located on the back of the module.
3. External metal antenna. Module used in vertical position can reduce the interference
of external circuit (antenna?).
4. The module can be plugged in directly, and is suitable for situations without a height
limitation.
5. Refer to SMD module for usage.
!!
!| Page" " September 17, 201419

CONFIDENTIAL
Espressif
Systems
ESP8266EX Beginner’s Guide
1.3. Applications using ESP8266EX!
1.3.1. UART Connector (as in Fig. 4 Demo Board)
PIN Definition for UART Connector:
UART0: (PIN 25) U0RXD+ (PIN 26) — Communication
UART1: (PIN 14) GPIO2( TXD) — Print Log
uart0 can be used to transmit and receive data packets while uart1 can be used to print
log.
Refer to AT commands section for usage.
Application: Used in demo board
!
1.3.2. Sensor Application (as in Fig. 5 USB Sensor Demo)!
PIN Definition for Sensor Application:
(PIN 9) MTMS — I2C_SCL
(PIN 14) GPIO2 — I2C_SDA
(PIN 12) MTCK — Reset button (Press on the reset button during power on)
(PIN 15) GPIO0 — Wi-Fi status indicator
(PIN 10) MTDI — Server communication status indicator
(PIN 25) U0RXD — Button (function to be defined)
(PIN 13) MTDO — LED: green light (function to be defined), used in smart plug
demo relay control indicator light
!
!
!
!
!
!
!| Page" " September 17, 201420
Other manuals for ESP8266EX
2
Table of contents
Other Espressif Systems Single Board Computer manuals