Skip to product information
1 of 8

vendor-unknown

Make an IOT Project on Sending mail using Arduino uno and ESP8266 wi-fi Module - KT774

Make an IOT Project on Sending mail using Arduino uno and ESP8266 wi-fi Module - KT774

SKU:KT774

999 in stock

Regular price Rs. 950.00
Regular price Sale price Rs. 950.00
Sale Sold out
Shipping calculated at checkout.

For refund/return/replacement, call us at +91 95995 94524 For bulk and B2B enquiries kindly mail us at support@rees52.com

  • Fast Shipping
  • Affordable Price
  • Support
View full details

KIT INCLUDES:


We are moving towards the World of Internet of Things (IoT). This technology plays a very important role in the Electronics and Embedded system. Sending an Email from any Microcontroller or Embedded system is very basic thing, which is required in IoT. So in this article, we will learn “How to send an Email using Wi-Fi and Arduino”.

For sending Email via Wi-Fi module and Arduino, first of all, we need to have an Email account. So the user can create an email account at smtp2go.com. After signup, remember your new email address and password.



HARDWARE REQUIRED

SOFTWARE REQUIRED

Arduino IDE 1.8.5 (programmable platform for Arduino)

Click To Download :https://www.arduino.cc/en/Main/Software

SPECIFICATIONS

20*4 LCD DISPLAY

Note


  • Colour tone may slightly change by Temperature and Driving Condition.
  • The Colour is defined as the inactive/background colour

  • LCD Display Mode: STN, Positive, Transflective
  • Display Colour: Deep Blue/ Yellow Green
  • Viewing Angle: 6H
  • Driving Method: 1/16 duty, 1/5 bias
  • Back Light: Yellow-Green LED backlight
  • Outline Dimension: 803615.8 MAX



POTENTIOMETER



ESP8266-01 WIFI MODULE



  • 802.11 b/g/n protocol
  • Wi-Fi Direct (P2P), soft-AP
  • Integrated TCP/IP protocol stack
  • Integrated TR switch, balun, LNA, power amplifier and matching network
  • Integrated PLL, regulators, and power management units
  • +19.5dBm output power in 802.11b mode
  • Integrated temperature sensor
  • Supports antenna diversity
  • Power down leakage current of < 10uA
  • Integrated low power 32-bit CPU could be used as an application processor
  • Wake up and transmit packets in < 2ms
  • Standby power consumption of < 1.0mW (DTIM3)

CIRCUIT CONNECTION

STEP-1

In this step, we will connect ESP8266 Wi-Fi module with Arduino and give it power supply from a 3.3v pin of Arduino

STEP-2

In this step, we need to sign-up for the Email address and Password (smtp2go.com). Smtp2go.com provides the email services, to send the emails using the outgoing email server.

STEP-3

We will need Username and Password in base64 encoded format with the UTF-8 character set. For converting the Email and Password in base64 encoded format use below given link. Keep the encoded username and password handy, we need it in our program to log in at smtp2go.com.

https://www.base64encode.org/

STEP-4

Now start writing code for sending Email. ‘Programming Explanation’ and Code is given at the end.

CIRCUIT DESCRIPTION

The circuit is very simple, for this project we only need Arduino and ESP8266 Wi-Fi module.

A 16x2 LCD is also connected for displaying the status messages. This LCD is optional. ESP8266’s Vcc and GND pins are directly connected to 3.3V and GND of Arduino and CH_PD is also connected with 3.3V.

Tx and Rx pins of ESP8266 are directly connected to pin 2 and 3 of Arduino. And Pin 2 of Arduino is also shorted with Tx pin (Pin 1) of Arduino. This pin is shorted for displaying response of ESP8266 directly on the Serial monitor of Arduino. Software Serial Library is used to allow serial communication on pin 2 and 3 of Arduino.

Note:For watching the response of ESP8266 on Serial Monitor, don’t initialize the Serial.begin(9600) function.

PROGRAMMING EXPLANATION

1. In programming part first we include libraries and define pins for LCD & software serial communication. By default Pin 0 and 1 of Arduino are used for serial communication but by using SoftwareSerial library, we can allow serial communication on other digital pins of the Arduino.

2. void connect_wifi(String cmd, int t) Function is defined to Connect the Wi-Fi module to the Internet.

void connect_wifi(String cmd, int t)
{ int temp=0,i=0; while(1) {
Serial1.println(cmd);
while(Serial1.available()) {
if(Serial1.find("OK")) ... .... .... ... .....

3. After it connect module to SMTP server by using given commands:

lcd.print("Configuring Email..");

Serial1.println("AT+CIPSTART=4,

"TCP","mail.smtp2go.com",2525");

delay(2000);

Serial1.println("AT+CIPSEND=4,20");

delay(2000);

Serial1.println("EHLO 192.168.1.123");

delay(2000);

Serial1.println("AT+CIPSEND=4,12");

Note: Many email servers will not accept email from a non-commercial, DHCP-issued IP address.

4. Now we will try to Login at smtp2go.co, using the base64 encoded User name and password, which we have derived in Step 4 above.

lcd.print("Try To Login.....");

Serial1.println("AUTH LOGIN");

delay(2000);

Serial1.println("AT+CIPSEND=4,30");

delay(2000);

Serial1.println("c2FkZGFtNDIwMUBnbWFpbC5jb20=");

//base64 encoded username delay(2000);

Serial1.println("AT+CIPSEND=4,18");

delay(2000);

Serial1.println("Y2lyY3VpdDQyMDE="); //base64 encoded password

5. After this, enter your main message that user wants to send. And send this email by ending line (sending).’

Serial1.println("Testing Success");

delay(2000);

Serial1.println("AT+CIPSEND=4,3");

delay(2000); Serial1.println('.');

delay(10000);

Serial1.println("AT+CIPSEND=4,6");

delay(2000);

Serial1.println("QUIT");

CODE

https://docs.google.com/document/d/e/2PACX-1vTMUFigaKpusGKEzYC8eYuDdRGpstgg-wLwfQpJVr0MR7GWaJuWclso-rq8tpCpEQA_5DxYyJ--P0ES/pub