Hello there, I hope you guys are doing well. In today’s article, we are going to work on an awesome chip called ESP 8266. This little device is a low-cost Wi-Fi chip with microcontroller capabilities. So we are going to do a project and in that, we are going to control an LED over a Wi-Fi. In this article, we are going with the very starting but important step of the project, insert a firmware of Arduinos’ into ESP 8266-01. Let’s get straight into business.

Things we need

ESP 8266 Breadboard Jumper wires An Arduino or USB to TTL converter

Circuit diagram of ESP8266 interfacing with Arduino

Connecting ESP 8266 is little tricky. The main thing is- it needs a power supply of 3.3 V and not 5V. The pin diagram of ESP is given below. Connect it over your breadboard. Connect Vcc and CH_PD with 3.3 volts. Connect ground with the ground. Now, Ideally you should not connect the Rx and Tx pin of your ESP directly to your Arduino because it’s a 3.3V device instead you should tone the voltage down to 3.3 V, But I am connecting it here. If you are connecting it directly, go ahead but only you are responsible for your loss if any (which may be the loss of ESP 8266).  I have connected it according to the circuit diagram below. Connect the Tx of your ESP to the Tx of your Arduino and Rx of your ESP to the Rx of your Arduino. I am connecting this way because we are not going to interface it with Arduino, rather we are interfacing it directly with the computer. esp connection with Arduino

Steps needed to interface ESP with Arduino

  • Open your Arduino IDE
  • Go to tools and select the COM Port of your Arduino.
  • Upload a blank program on Arduino before connecting any of it.
  • Now open your serial terminal, select the baud rate. It should be 115200 or 9600. Type AT and hit enter. If there is any response like –OK, you are good to continue. Great job!. If there is no response, check the circuit or baud rate.

Now we are going to do big stuff. We are going to replace the firmware of ESP.

  • Reset the ESP. To put the ESP into reset mode, connect the GPIO0 to Ground. In the circuit above, the reset pin of esp is connected with the reset pin of Arduino. So all we need to do is press the reset button in the Arduino.
  • Now we have to find the firmware. For that, the first step would be- go to file–>preferences and in the column of the URL, paste the following one.

 

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Adding URL to Bord

  • Now go to Tools->Board->board manager. Type esp at the search bar. You should see the esp board. Select the latest version and download it.

  • Now copy the code in the file->example->Basics->blink and paste in the new sketch. Replace the “LED Bulletin” with ‘1’ and hit the upload button. If everything works well, you will see the firmware starting to upload.

interface esp 8266 with arduino The blue LED should starts to blink continuosly during the firmware upgrade. This means upto everythins is correct. After the process completed, you should see the blue LED blinking at the frequency of 1Hz. esp 8266 with arduino If you aren’t comfortable with making electrical connection, you can buy the nodeMCU. It’s basically the same but it saves you from the complex circuitry that you would do otherwise. It has just one micro-USB port and BOOM! You are good to go. Also, it has more GPIOs and memory than the ESP I used here. That’s it for this article, in the next article, we are going to connect it with Mobile and have some fun. If you have some problem interfacing this, please do let me know in the comments below.

Common Mistakes that you may have done

CHECK THE CIRCUIT. Check the ground connection. Check if you are resetting the ESP8266 in the right way. Also check if the ESP 8266 is broken.

Share This