Introduction to SIM900 GSM/GPRS Shield with Arduino

GSM-Arduino-circuit

The SIM900 GSM/GPRS Shield is a powerful add-on module that brings cellular communication capabilities to your Arduino projects. This comprehensive guide walks you through everything you need to know to get started with sending and receiving SMS messages and making phone calls with Arduino.

What You'll Learn: In this complete guide, we'll cover the SIM900 GSM/GPRS Shield hardware, essential AT commands, testing procedures, and practical examples for SMS communication and phone call functionality.

What is the SIM900 GSM/GPRS Shield?

GSM (Global System for Mobile Communications) is the global standard for mobile communications, while GPRS (General Packet Radio Service) is a mobile data service available on 2G and 3G cellular networks. The SIM900 GSM/GPRS Shield combines these technologies into a single Arduino-compatible board.

Internet Connectivity

Connect to the Internet over GPRS networks where WiFi isn't available, enabling remote data transmission.

SMS Communication

Send and receive text messages for alerts, commands, or data exchange with your Arduino projects.

Voice Calling

Make and receive phone calls, transforming your Arduino into a communication device.

Global Compatibility

Quad-band support (850/900/1800/1900 MHz) ensures operation in most countries with GSM networks.

Practical Applications

GSM-Arduino-circuit

The GSM/GPRS Shield opens up numerous possibilities for Arduino projects:

Key Features and Specifications

Core Module

Based on SIM900 module from SIMCOM with control via AT commands

Compatibility

Works with Arduino Uno and similar boards with standard pin headers

I/O Capabilities

12 GPIO pins, 2 PWM outputs, and built-in ADC of the SIM900 module

Real-Time Clock

Includes holder for 3V CR1220 battery for timekeeping when powered off

Preliminary Setup Requirements

1 SIM Card Preparation

Before using your SIM900 GSM/GPRS Shield, you need to properly prepare your SIM card:

  • Use a Prepaid SIM Card: For testing, use a prepaid plan with unlimited SMS to avoid unexpected charges
  • Disable PIN Lock: Insert the SIM in a smartphone and disable the PIN requirement in security settings
  • Check Network Coverage: Ensure you have GSM coverage (2G network) in your area
  • SIM Size: The shield uses standard SIM size (not micro or nano - adapters may be needed)

2 Power Supply Requirements

Wiring-SIM900-GSM-GPRS-Shield-with-Arduino-UNO

The SIM900 GSM/GPRS Shield has specific power requirements for reliable operation:

  • Recommended: 5V power supply capable of providing 2A current
  • Alternative Options: 9V at 1A or 12V at 1A
  • Toggle Switch: Move to external power position when using dedicated power supply
  • Power Jack: Standard DC power jack for external power connection
Important: Using an inadequate power supply can lead to unstable operation, failed transmissions, or unexpected resets, especially during cellular transmission when power demands peak.

Hardware Overview and Connection

sim900-gsm-shield-components

3 Getting Started Steps

  1. Insert SIM Card: Place your prepared SIM card into the holder on the back of the shield
  2. Connect Antenna: Attach the provided antenna to the U.FL connector for optimal signal
  3. Configure Serial Port: Set jumpers for software serial communication (typically pins 7 and 8)
  4. Power Up: Connect your 5V, 2A power supply and flip toggle to external power position
  5. Turn On Shield: Press and hold power button for 2 seconds until Status LED lights up
  6. Network Connection: NetLight LED blinks every 800ms while searching, then every 3 seconds when connected

Essential AT Commands for SIM900

AT commands (Attention commands) are text-based instructions used to control the SIM900 module. Here are the most essential commands:

Command Description Usage
AT Test command to check communication Should return "OK" if working
AT+CMGF=1\r Set module to text mode for SMS Required before sending/receiving SMS
AT+CMGS="PHONE_NUMBER" Send SMS to specified number Use international format (+country code...)
AT+CMGR=1\r Read first SMS from inbox Returns message content and metadata
ATD+PHONE_NUMBER Dial a phone number Initiates voice call to specified number
ATH Hang up active call Terminates ongoing voice call

Testing the Shield with FTDI Programmer

4 Initial Testing Procedure

GSM-FTDI-circuit-1

Before integrating with Arduino, test the shield independently using an FTDI programmer:

  1. Connect FTDI Programmer: TX to shield RX, RX to shield TX, ground to ground
  2. Power Separately: Use external 5V, 2A power supply (don't use FTDI for power)
  3. Open Arduino IDE Serial Monitor: Select correct COM port, set to 19200 baud, Carriage return
  4. Send Test Command: Type "AT" and press Enter - should receive "OK" response
Success Indicator: If you receive "OK" after sending the AT command, your SIM900 shield is working properly and ready for integration with Arduino.

Sending SMS with Arduino Code Example

5 Complete SMS Sending Code

Request-data-GSM-schematics

Here's the complete code to send an SMS using your Arduino and SIM900 shield:

#include 

// Configure software serial port
SoftwareSerial SIM900(7, 8); 

void setup() {
  // Arduino communicates with SIM900 at 19200 baud
  SIM900.begin(19200);
  // Give time for network registration
  delay(20000);   
  // Send the SMS
  sendSMS();
}

void loop() { 
  // Empty loop for this example
}

void sendSMS() {
  // AT command to set SIM900 to SMS mode
  SIM900.print("AT+CMGF=1\r"); 
  delay(100);

  // REPLACE WITH RECIPIENT'S MOBILE NUMBER
  // USE INTERNATIONAL FORMAT
  SIM900.println("AT+CMGS=\"+12345678901\""); 
  delay(100);

  // REPLACE WITH YOUR MESSAGE CONTENT
  SIM900.println("Hello from Arduino with SIM900!"); 
  delay(100);

  // End AT command with Ctrl+Z (ASCII 26)
  SIM900.println((char)26); 
  delay(100);
  SIM900.println();
  // Give module time to send SMS
  delay(5000); 
}

Code Explanation: This example uses SoftwareSerial on pins 7 and 8 to communicate with the SIM900 shield. The sendSMS() function configures the module for text messages, specifies the recipient number, sends the message content, and terminates with Ctrl+Z (ASCII 26).

Receiving SMS with Arduino

6 SMS Reception Code Example

To read incoming SMS messages, upload this code to your Arduino:

#include 

SoftwareSerial SIM900(7, 8);
char incoming_char = 0;

void setup() {
  SIM900.begin(19200);
  Serial.begin(19200); // For serial monitor
  delay(20000); // Network registration time

  // Set SIM900 to SMS mode
  SIM900.print("AT+CMGF=1\r"); 
  delay(100);
  // Configure new message indications
  SIM900.print("AT+CNMI=2,2,0,0,0\r");
  delay(100);
}

void loop() {
  // Display incoming SMS on serial monitor
  if(SIM900.available() > 0) {
    incoming_char = SIM900.read(); 
    Serial.print(incoming_char); 
  }
}

How It Works: This code configures the SIM900 module to forward received SMS directly to the serial output. When a message arrives, it's displayed character-by-character in the Arduino Serial Monitor. You can extend this code to parse specific information or trigger actions based on message content.

Making and Receiving Phone Calls

7 Phone Call Functionality

GSM-shield

The SIM900 GSM/GPRS Shield supports full voice call functionality. For phone calls to work properly:

  • Audio Connections: Connect a microphone to the MIC jack and headphones/speaker to the SPK jack
  • Call Initiation: Use ATD+PHONE_NUMBER; command to dial a number
  • Call Answering: Use ATA command to answer incoming calls
  • Call Termination: Use ATH command to hang up active calls
Project Idea: Create a security system that automatically calls you when sensors detect unusual activity, or build an automated calling system that provides status updates via phone call.

Advanced Feature: Automatic Power Control

8 Software-Controlled Power Management

Instead of manually pressing the power button, you can enable software-controlled power management:

  1. Hardware Modification: Solder a bridge across the R13 resistor pads on the shield
  2. Connect to Arduino: Run a wire from shield D9 to Arduino digital pin 9
  3. Add to Setup: Include this code in your setup() function:
// Automatic power-on sequence
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
delay(1000);
digitalWrite(9, LOW);

This sequence simulates pressing the physical power button for one second, eliminating manual intervention and enabling completely autonomous systems.

Troubleshooting Common Issues

No Response to AT Commands

Solution: Check power supply, verify 19200 baud rate, inspect all connections, test with FTDI programmer.

SIM Card Not Detected

Solution: Reinsert SIM, ensure PIN lock is disabled, try different SIM card, check for damaged contacts.

Poor Signal Strength

Solution: Reposition antenna, move to area with better GSM coverage, verify carrier supports 2G.

SMS Sending Failures

Solution: Check number format (international), verify network registration, ensure adequate delays between commands.

Next Steps and Project Ideas

GSM-shield

With the foundation established in this guide, consider these advanced project directions:

Learning Path: Start with simple SMS examples, then progress to phone call functionality, then explore GPRS data transmission. Each step builds on the previous, gradually expanding your cellular communication capabilities with Arduino.