MEVIHUB

Call and SMS Using GSM and Arduino

Overview

In this post, we will learn how to make a Call & SMS using GSM Module & Arduino. This is a Simple Homemade Phone using GSM Module and Arduino. This simple phone is capable of calling another number as well as receiving an incoming call. Similarly, it can also be used to send an SMS as well as read a received SMS. In this project, we can call and send message theft detection.

Components required table

S.N.COMPONENTSDESCRIPTIONQUANTITYlink
1GSMSIM A7670C 4G LTE1SIM900A GSM GPRS Module
2ArduinoArduino Uno1Arduino Uno
3Power Supply Power Supply Adapter12V 2A DC Power Supply Adapter
3connection wiresJumper Wires40Jumper Wires

Block diagram

A7672S module:

A7672S is the LTE Cat 1 module which supports wireless communication modes of LTE-FDD/GSM/GPRS/EDGE. It supports multiple built-in network protocols and drivers for main operation systems (USB driver for Windows, Linux and Android). The software functions, and AT commands, are compatible with the SIM800 series modules. Meanwhile, A7672S integrates abundant industrial standard interfaces with powerful expansibilities, such as UART, USB, I2C and GPIO, which makes it perfectly suitable for main IoT applications such as telematics, surveillance devices, industrial routers, remote diagnostics etc. 

A7672S(without GNSS) Key Benefits:-

  • Compact size with abundant interfaces
  • Suitable for LTE and GSM networks
  • Abundant software functions: FOTA, LBS, SSL
  • The form factor is compatible with the SIM7000/SIM7070 series

A7672S(without GNSS) Specifications:-

  • Power Supply
  • USB 2.0 Interface
  • Three UART Interface, one full function serial port, one ordinary serial port and one debug serial port
  • USIM Interface
  • General ADC Interface
  • VBAT ADC Interface
  • 4*4 matrix keyboard
  • Analog audio MIC input interface
  • Analog audio SPK output interface
  • SPI Interface
  • LDO Power Output
  • I2C Interface
  • General input and output interfaces (GPIO)
  • SPI LCD Interface
  • SPI Camera Interface
  • Antenna Interface
  • USB_BOOT interface
  • Network status indication interface
  • Module operation status indication interface
  • Power supply VBAT: 3.4V ~4.2V, Recommended VBAT: 3.8V

Antenna :

  • GSM/LTE antenna interface
  • GNSS antenna interface(optional)
  • Bluetooth antenna interface(optional)

SMS :

  • MT, MO, CB, Text, PDU mode
  • Short Message (SMS)storage device: USIM Card, CB does not
  • support saving in SIM Card

Final code

 #include <SoftwareSerial.h>
SoftwareSerial sim800l(2, 3);            // RX,TX for Arduino and for the module it's TXD RXD, they should be inverted

  #define button1 7                      //Button pin, on the other pin it's wired with GND
  bool button_State; //Button state
  void setup()
   {

   pinMode(button1, INPUT_PULLUP);  //The button is always on HIGH level, when pressed it  goes LOW
     sim800l.begin(115200);        //Module baude rate, this is on max, it depends on the version
      Serial.begin(115200);
      delay(1000);
      Serial.println("Button pressed");   //Shows this message on the serial monitor
     }

  void loop()
  {

  button_State = digitalRead(button1);   //We are constantly reading the button State
  if (button_State == LOW) {            //And if it's pressed
  Serial.println("Button pressed");   //Shows this message on the serial monitor
  delay(200);                      //Small delay to avoid detecting the button press many times
  SendSMS();                          //And this function is called

  }

if (sim800l.available()){   //Displays on the serial monitor if there's a communication from the module
Serial.write(sim800l.read());
}
}

void SendSMS()
{
Serial.println("Sending SMS...");               //Show this message on serial monitor
sim800l.print("AT+CMGF=1\r");                   //Set the module to SMS mode
delay(100);
sim800l.print("AT+CMGS=\"+919912345678\"\r");      //Your phone number don't forget to include your country code, example +212123456789"
delay(500);
sim800l.print("COME TO COFFEE");   //This is the text to send to the phone number, don't make it too long or you have to modify the SoftwareSerial buffer
delay(500);
sim800l.print((char)26);                 // (required according to the datasheet)
delay(500);
sim800l.println();
Serial.println("Text Sent.");
delay(500);
}
Exit mobile version