This ESP8266 based wireless web server project is built around an arduino. Currently, ESP8266 is gaining popularity in the field of electronics because it is low-cost, reliable and easily available in the market. Most documents related to this module are in Mandarin (Chinese language) and information provided in the data sheet is not sufficient enough for using ESP8266 for an application.

Test Points

In order to fill the gap, people from various countries have formed an ESP8266 community forum, which gives necessary details about programming and other related issues concerning this module.

Fig. 1 Author’s prototype
Fig. 1 Author’s prototype of the ESP8266 based wireless web server

ESP8266 contains a built-in 32-bit low-power CPU, ROM and RAM. It is a complete and self-contained Wi-Fi network solution that can carry software applications as a stand-alone device or connected with a microcontroller (MCU). The module has built-in AT Command firmware to be used with any MCU via COM port. Salient features of ESP8266 are:

Fig. 2 ESP8266 module
ESP8266 module
  • 802.11 b/g/n protocol
  • Direct (P2P), soft-AP
  • Integrated TCP/IP protocol stack
  • Integrated PLL, regulators and power-management units
  • +19.5dBm output power in 802.11b mode
  • Supports antenna diversity
  • Integrated low-power 32-bit MCU
  • SDIO 2.0, SPI, UART
  • Wireless SoC
  • Has GPIO, I2C, ADC, SPI, PWM
  • Maximum frequency is 80MHz
  • 64k bytes of instruction RAM
  • 96k bytes of data RAM
  • 64k bytes of boot RAM
  • RISC architecture

ESP8266 based wireless web server

Parts ListCircuit diagrams of the main board and child board are shown in Figs 3 and 4, respectively. We have used ESP8266 as a stand-alone device. Supply voltage for the Wi-Fi module is 3.3 volts. Child board is to be mounted on the main board.

CON2 is used for COM port interface for connecting the module to a PC and the module is programmed using a USB-to-serial converter. If physical COM port is available on the PC, USB-to-serial converter is not necessary.

ESP8266 module has 16 pins. Pin 1 (RESET) is connected to 3.3V through resistor R5 and push-button S2 is provided for manual reset. Programing mode pin 12 (GPIO0) is connected to 3.3V through R3, and S1 is used to bring the module to programing mode. Pin 3 (CH_PD) is connected to 3.3V through R8.

ESP8266 also integrates a general-purpose 10-bit resolution ADC (pin 2). It is typically used to measure voltage from the sensor or battery. It cannot be used when the chip is transmitting, otherwise, voltage may be inaccurate.

Fig. 3 Circuit diagram of the main board of the low-cost ESP8266 based Wi-Fi Web server
Fig. 3 Circuit diagram of the main board of the low-cost ESP8266 based wireless Web server
Fig. 4 Circuit diagram of the child board for the circuit shown in Fig. 3
Fig. 4 Circuit diagram of the child board for the circuit shown in Fig. 3

All digital input/output (I/O) pins are protected from over-voltage with a snap-back circuit connected between the pad and the ground. Snap-back voltage is typically 6V and holding voltage is 5.8V. This provides protection from over-voltage and ESD. Output devices are also protected from reverse voltage with diodes. LED1 is connected to pin 11 (GPIO2). Pin 6 (GPIO12) is connected to 3.3V through R4 and provided with a push-button (S3) for debugging purposes.

Every supplier of Wi-Fi modules follows a different pattern for output pin arrangment. So no standard PCB pattern can be followed. Readers of EFY can design their own PCB. Authors of this article have purchased ESP8266 module (Sunrom model no. 4255) from Sunrom Technologies and the PCB is designed to suite their requirement.

Fig. 5 Preferences window of Arduino IDE
Fig. 5 Preferences window of Arduino IDE

An application has been implemented to measure room temperature using LM35 teperature sensor and an LED control (on/off) using a Web browser. LM35 is a calibrated temperature sensor, whose sensitivity is 10 milli-volt/1°C, but one can build customised projects also.

Fig. 6 Web page window
Fig. 6 Web page window
Fig. 7 EFY logo
Fig.7 EFY logo

ESP8266 can be used in home automation, mesh   networks, industrial wireless control, IP cameras, sensor networks, smart power plugs, baby monitors, wearable electronics, security ID tags, position system beacons and location-aware devices.



Please enter your comment!
Please enter your name here