In this illustration we will going to wire the ESP8266 Module on Arduino but before we can proceed we need to setup the ESP8266 module using AT-COMMAND please refer to this link. As you can see the illustration below our host control is the Arduino MCU board that controls the ESP8266 and the 4 channel relay.
By removing the ATMEGA328P Chip we consider that were going to use the TTL UART of the Arduino.
Sometimes the size of the message from ESP8266 is big for Arduino, you need to change the buffer which is defined in “HardwareSerial.h” it is located in directory “\arduino\hardware\avr\cores\arduino\HardwareSerial.h” and see the
“ #define SERIAL_BUFFER_SIZE 64” the default size of the buffer is 64 you need to change to bigger number, for example 256 or more.
Required Component
- Arduino UNO
- ESP8266 V1
- 4 Channel Relay Board or Shield
- Jumper Wires / DuPont Wires
- Solder Less Breadboard
- Home Appliance for Testing
- Android Phone or Tablet
Wiring Diagram Schematics
Arduino Sketch Code
[crayon-6750157d26c68900041245/]
Arduino Wifi with ESP8266 Code Library