INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer...

40
INTERFACING WEB SERVER WITH A ROBOT

Transcript of INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer...

Page 1: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

INTERFACING WEB SERVER WITH A ROBOT

Page 2: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. It comes with an inbuilt firmware which supports serial interface and can be controlled using AT commands.

In short the ESP8266 module is a “serial to wireless internet” device.

Page 3: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

FEATURES:

802.11 b/g/n protocol

Wi-Fi direct (P2P), soft-AP

Integrated TCP/IP protocol stack

Supports antenna diversity

Power down leakage current of < 10uA

Page 4: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

WHY ESP8266?

Page 5: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

HARDWARE CONNECTIONSThe ESP8266 requires 3.3V power–do not power it with 5 volts!

The ESP8266 needs to communicate via serial at 3.3V and does not have 5V tolerant inputs, so you need level conversion to communicate with a 5V microcontroller like most Arduinos use.

When power is applied the red power light turns on and the blue serial indicator flickers frequently

Page 6: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

BLOCK DIAGRAM

Page 7: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

PIN CONFIGURATION

Page 8: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

VCC AND GROUND CONNECTIONS

The outer hub of the breadboard is Vcc and the inner hub is GND

Page 9: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

LM 7805 PIN CONFIGURATION

Page 10: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

LM 7805 CONNECTIONSLM 7805 is a 5V voltage regulator which reduces any voltage below 32V to

5V

Page 11: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

L293D PIN CONFIGURATION

Page 12: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

L293D CONNECTIONS

Place L293D in such a way that the notch is facing towards the right

Giving 5V to Vss makes the robot move slow when compared to giving it 8V( in our case we have given 5V)

Pins 1,8,9,16 are connected to Vcc of the breadboard

Pins 4,5,12,13 are connected to GND of the breadboard

Page 13: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.
Page 14: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

ARDUINO ATMEGA 16 PIN CONFIGURATION

Page 15: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

ARDUINO ATMEGA16 CONNECTIONS

Pin 9 of the Arduino is given to Vcc and pin 10 to the GND of the breadboard

Place the Arduino such that its notch is facing the notch of L293D

Page 16: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.
Page 17: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

INTERFACING L293D WITH ARDUINO

Connect the pins 0 and 1 of the Arduino to the pins 15 and 10 of the L293D

Connect the pins 24 and 25 of Arduino to the pins 2 and 7 of L293D

Page 18: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.
Page 19: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

MOTOR CONNECTIONS

Connect the left motor pins to the pins 11 and 14 of L293D

Connect the right motor pins to the pins 3 and 6 of L293D

Page 20: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

IR SENSOR CONNECTIONS

Connect the left, centre and right sensors to pins 26,27and 28 of the Arduino respectively

Page 21: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

LM 35 PIN CONFIGURATION

LM35 is a temperature sensor

Connect the Vcc and GND to the breadboard and output pin to the 29th pin of the Arduino

The LM35 gives analog output so we have connect it to the analog pin of the Arduino

Page 22: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.
Page 23: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

CREATING A SERVER USING ESP8266

Page 24: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

STEPS TO CONNECT THE ESP8266 Wi-Fi MODULE

The Vcc (3.3V) of the ESP8266 is given to Vcc of the breadboard.(The 8V of the breadboard is reduced to 3.3V by means of a voltage regulator)

The Tx and Rx pins of the ESP8266 is connected to the Rx and Tx pins of the Arduino

The GND pin of the ESP8266 is given to the GND of the breadboard

The RESET pin of ESP8266 should be connected to 3.3V

CHPD pin should be given to 3.3V

Page 25: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The ESP8266 can be wired and can be programmed by using the AT commands. The wiring connections are shown

Page 26: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

AT COMMANDS

ESP8266, in it’s default configuration, boots up into serial modem mode. In this mode you can communicate with it using a set of AT commands. A set of AT commands used in this project is explained

Page 27: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

Connect to the Wi-Fi network of the module.In our case it is AI-THINKER_FBB24A

Page 28: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT command is used to check if the system and Wi-Fi module are working correctly

Page 29: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+RST command is used to reset the module

Page 30: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+GMR command is used to know about the current firmware version

Page 31: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+CIFSR command is used to return the local ip address (192.168.1.4)

Page 32: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+CWMODE command is used to enable both client and server

Page 33: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

the AT+CIPMUX command is used to enable multiple connections

Page 34: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+CIPSERVER command is used to create a server

Page 35: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The AT+SIPSEND command is used to send messages

Page 36: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

The message is displayed on the webpage

Page 37: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

Thus the following AT commands used in programming the ESP8266 Wi-Fi module can be understood better by a table format. The following AT commands used for this project are shown.

Page 38: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

ALGORITHMVoid setup()

{

initialize input and output pins;

reset ESP8266;

set mode as 3;

enable multiple connections;

enable server;

}

Page 39: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

Void loop()

{

wait for GET request;

Check for obstacles;

Do the necessary actions;

Measure temperature using LM35;

send message to the server using AT+SIPSEND command;

}

Page 40: INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer ESPRESSIF that includes Wi-Fi capability. In short the.

Add \r \n to the command inside Serial.write in order to send command to the Wi-Fi module

\r \n denotes carriage return(enter)

For example to send the command “AT” use the command Serial.write (“AT\r\n”)