INTERFACING WEB SERVER WITH A ROBOT. The ESP8266 is a MICROCONTROLLER from Chinese manufacturer...
-
Upload
rudolph-tucker -
Category
Documents
-
view
218 -
download
1
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/1.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/2.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/3.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/4.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/5.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/6.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/7.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/8.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/9.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/10.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/11.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/12.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/13.jpg)
![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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/14.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/15.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/16.jpg)
![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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/17.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/18.jpg)
![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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/19.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/20.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/21.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/22.jpg)
![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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/23.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/24.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/25.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/26.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/27.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/28.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/29.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/30.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/31.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/32.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/33.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/34.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/35.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/36.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/37.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/38.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/39.jpg)
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.](https://reader035.fdocuments.in/reader035/viewer/2022081516/56649eaa5503460f94baf12a/html5/thumbnails/40.jpg)
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”)