Friday, 11 September 2015

ESP8266 wifi module Basic working circuit and AT commands

I have been waiting to buy this module for 8 months..and i got one finally..when i'm testing it for the first time i faced lots of problems. after lot of googling and 2 continuous sleepless nights i figured it out..and felt lot crazy about the mistakes that i made while checking  ESP8266 module is little tricky compared to the other famous wireless modules  like Xbee or HC-05.

So i wanted to share all the problems i faced during my first successful test of ESP8266.

Beauty of ESP8266 :

This is simple small wifi module that is very much simple and so cheaper than a Bluetooth. I bought it for  Rs 400/-. 

The best thing is it is Serial UART interface which is basic feature in many Microcontrollers....

It is also equipped with GPIO(General Purpose Input Output) pins so you can directly use this module to switch some leds or any digital controlled devices with out a Microcontroller..  

identifying the circuit

So the first thing in our mind after getting this module is about its pin configuration.
The above version is abundantly available  in the market. It contains 8 pins arranged in two rows.
3,3V and GND are for power supply
GPIO0,GPIO2 are i/o pins which are programmable
RST  is reset signal for module(beginners better not use it) 
CH_PD : power down mode enable(to enable chip we need to connect it to Vcc)
Tx, Rx are serial Transmitter and Receiver pins.

along with these pins another two important things are Power(RED) and N/W(Blue) LEDs.

Supply voltage Vcc  for this ESP8266 module is 3.3V  
if you are using an arduino you will find 3.3V on arduino to run the module.
if you are using any other Hardware that run on 5V then i suggest the following circuit using a asm1117 3.3v voltage regulator..
Middle pin in the above module is also 3.3V o/p. For circuit convenience i prefer to go for notch instead of the pin.This voltage regulator provides upto 800mA current at 3.3V which will be sufficient to drive ESP8266. Do not forget about the capacitors(i used 10uF) in input and output of voltage regulator. 

The CH_PD pin should be connected to Vcc to keep the module in active mode. if this pin is not connected to Vcc your device will be in ideal mode and will not work.

As the Rx and Tx pins of ESP8266 are working at 3.3v logic levels, if you connect a microcontroller working at 5v vcc this module then there is a chance that ESP8266 may get damaged.

To protect the Rx pin of ESP8266 connect a 300 Ohm resistor in between
                             Rx(ESP8266) to Tx(microcontroller)
But there won't be a problem with Tx(ESP8266) as it can be directly connected to Rx(MC)

so the simplified circuit is :
   My prototype.

To test the module through AT commands there are so many serial monitoring software are available for windows. even ARDUINO serial monitor can also be used. I am using a serial terminal monitoring software called " Tera Term " .
Tera term support both Serial and TCP/IP.

i am using CP2102(USB to Serial) and TeraTerm to check the AT commands.


Aswin Rab said...

i ve a doubt
i have a esp8266 wifi module and during the at commands via serial monitir ,the module is responding nly for certain commands.
after googling i found out that it is occuring becaude ,i havent flashed the firmware.

so can u pls tell me how to bootload and flash the frmware to the module.

Npeducations Np said...

through 8051 i am trying to connect pubnub, do you have any referred tutorials. I am getting 400 error, when pubnub publish command was sent.

Ronil Malvania said...

Hi, I've ESP8266 module and HCSR-04(Ultrasonic sensor).How to interface between two device?


Use any microcontroller
Check the blog article in sensors to know about interfacing HC SR 04


There is a good article available on


What's your cipmux value
And also check for your URL has any mistakes. Check the number of chars you are transmitting with cipstart


Actually all modules comes with default firmware.
So check your firmware version with at+gmr

Post a Comment