Thursday, 14 November 2024

Interface a GSM (SIM 300) Modem with Arduino

 

Aim:

GSM (Global System for Mobile Communication) technology lets user to communicate with others across mobile networks hence it offers a vast area of coverage. Interfacing GSM technology with microcontroller will enable us to extend the communication to cover large area. This tutorial will teach you about interfacing GSM module with Arduino and program it to communicate it with another user.
F3FLJRGIDIN6G8Y.MEDIUM

Description:


STEP 1: MODEM TESTING:

The Modem consists of two indicating LED’s Green and Red to indicate the availability of the network. Green indicates the availability of the network whereas red indicates its absence. Turn the modem ON and wait for sometime to register itself in GSM network.

STEP 2: INTERFACING WITH ARDUINO:

The Communication between AVR and modem takes place through USART protocol. GSM Modem SIM900 works on TTL level hence we can interface directly to RXD and TXD pins of Arduino. There is no need of using Voltage or level converter between them. However if you ever happen to buy a SIM300 or other module which operates above TTL level, you may want to use MAX232 level converter IC to make the communication possible.

STEP 3: INITIALIZING MODEM:

The modem must be Initialized using the commands and then the process you are about to carry out must be selected. In this tutorial am going to initialize the modem and them make it to send a message “Hi Raghav” to my mobile using the GSM modem.

Block Diagram

gsm

Schematic


Code

// *********************************************************
// Project: Interfacing GSM to Arduino
// Author: Hack Projects India
// Module description: Operate GSM
// *********************************************************
void send_string(char *ch)
{
  while(*ch)
  {
    Serial.write(*ch);
    delay(10);
    *ch++;
  }
}
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  delay(1000);
  send_string("AT\r");
  delay(1000);
  send_string("AT+CMGF=1\r");
  delay(1000);
  send_string("AT+CMGS=\"9999999999\"\r");
  delay(1000);
  send_string("Welcome to Hack Projects India\r");
  delay(1000);
  Serial.write(0x1a);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Further Reading suggestions:

You may also like,

No comments:

Post a Comment