Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

SIM900 Arduino: Complete GPRS Internet Connection Guide for IoT Projects

If you’ve ever worked on a remote monitoring project where WiFi coverage was non-existent, you know the frustration. I spent three weeks debugging a sensor network at a farm location before realizing that cellular connectivity was the only viable option. That’s when I discovered the SIM900 Arduino combination, and it completely changed my approach to IoT projects in areas without reliable WiFi infrastructure.

This guide walks through everything you need to establish a solid GPRS internet connection using the SIM900 GSM/GPRS module with Arduino. Whether you’re building environmental monitors, asset trackers, or remote data logging systems, mastering the SIM900 Arduino interface opens up connectivity options that WiFi simply cannot match.

What is the SIM900 Module and Why Use It With Arduino?

The SIM900 is a quad-band GSM/GPRS module manufactured by SIMCOM that operates on 850/900/1800/1900 MHz frequencies. This coverage means it works in virtually any country with 2G cellular networks. At just 24mm x 24mm x 3mm, the module packs serious capability into a small footprint.

From a hardware design perspective, the SIM900 Arduino pairing makes sense for several reasons. The module handles all the cellular protocol complexity internally, exposing a simple UART interface that Arduino can easily manage through AT commands. You don’t need deep RF engineering knowledge to get cellular connectivity working.

SIM900 Module Technical Specifications

ParameterSpecification
Frequency BandsQuad-band: 850/900/1800/1900 MHz
GPRS ClassMulti-slot Class 10
Data RateUpload: 85.6 kbps, Download: 42.8 kbps
Operating Voltage3.2V to 4.8V (typical 4.0V)
Peak Current2A during transmission
Sleep Mode Current1.5mA
Operating Temperature-40°C to +85°C
Dimensions24mm x 24mm x 3mm
InterfaceUART, GPIO, ADC, PWM

The integrated TCP/IP stack is particularly valuable. Rather than implementing network protocols in your Arduino code, you issue simple AT commands and the SIM900 handles packet assembly, transmission, and acknowledgment internally.

SIM900 Arduino Hardware Setup and Wiring Configuration

Getting the physical connections right is critical before touching any code. I’ve seen countless forum posts where engineers struggled with communication issues that turned out to be basic wiring problems or power supply deficiencies.

Essential Hardware Components

Before starting your SIM900 Arduino project, gather these components:

ComponentPurposeNotes
Arduino UNO/MegaMain controllerMega recommended for complex projects
SIM900 GSM/GPRS ShieldCellular connectivityEnsure antenna connector matches your antenna
External Power SupplyModule power5V 2A minimum, 9V-12V 2A recommended
GSM AntennaRF transmissionSMA or U.FL connector based on shield version
Activated 2G SIM CardNetwork accessUse data-enabled prepaid plan for testing
Jumper WiresConnectionsFor serial port configuration

SIM900 Arduino Wiring Diagram

The SIM900 shield typically mounts directly on Arduino UNO, but serial port configuration requires attention. Most shields offer jumper selection between hardware serial (D0, D1) and software serial (D7, D8).

Connection Table for Software Serial Configuration:

SIM900 Shield PinArduino PinFunction
TXD7Data from SIM900 to Arduino
RXD8Data from Arduino to SIM900
VCCExternal 5V 2AModule power input
GNDGNDCommon ground (critical)
PWRKEYD9 (optional)Software power control

Important: Software serial is the preferred approach because it leaves hardware serial available for debugging through the Serial Monitor. Configure the jumper caps on your shield to select software serial pins before uploading code.

Power Supply Requirements for SIM900 Arduino Projects

This section deserves emphasis because inadequate power supply causes more SIM900 Arduino failures than any other issue. The SIM900 draws up to 2A peak current during RF transmission bursts. USB power from your computer cannot supply this current reliably.

When the module attempts to register on a network or transmit data without sufficient power, it resets repeatedly. You’ll see the status LED blinking rapidly or the module failing to respond to AT commands.

Power Supply Recommendations:

ConfigurationVoltageCurrent CapacitySuitability
USB Only5V500mA maxNot recommended
Arduino VIN7-12VDepends on adapterMarginal
External 5V Supply5V2A+Recommended
External 9-12V Supply9-12V2A+Best option

Always use the shield’s dedicated power input with an external supply capable of 2A or more. Connect grounds between the power supply, shield, and Arduino to establish a common reference.

Understanding AT Commands for SIM900 GPRS Configuration

AT commands control every aspect of the SIM900’s operation. These text-based instructions originated with Hayes modem standards and have been extended for cellular applications. The SIM900 responds to commands with either “OK” for success or “ERROR” for failures.

Essential AT Commands for SIM900 Arduino GPRS Connection

Learning these commands is fundamental to working with the SIM900 Arduino combination. Here’s a practical reference organized by function:

Basic Module Control Commands:

CommandDescriptionExpected Response
ATCheck communicationOK
AT+CPIN?Check SIM status+CPIN: READY
AT+CREG?Network registration+CREG: 0,1 (registered)
AT+CSQSignal strength+CSQ: 15,0 (0-31 scale)
ATE0Disable command echoOK
ATE1Enable command echoOK
AT+CGATT?GPRS attachment status+CGATT: 1 (attached)

GPRS Connection Setup Commands:

CommandDescriptionExample
AT+CIPSHUTClose any existing connectionSHUT OK
AT+CIPMUX=0Single connection modeOK
AT+CIPMODE=0Non-transparent modeOK
AT+CSTT=”APN”,”user”,”pass”Set APN credentialsOK
AT+CIICRActivate GPRS contextOK
AT+CIFSRGet assigned IP addressReturns IP
AT+CIPSTART=”TCP”,”server”,”port”Open TCP connectionCONNECT OK
AT+CIPSENDInitiate data sendReturns > prompt
AT+CIPCLOSEClose connectionCLOSE OK

Configuring APN Settings for Different Carriers

The Access Point Name (APN) configuration varies by cellular carrier and region. This setting tells the SIM900 how to connect to your carrier’s GPRS gateway. Using incorrect APN settings is a common source of connection failures.

Common APN Settings by Region:

CarrierRegionAPNUsernamePassword
AT&TUSA“broadband”“”“”
T-MobileUSA“epc.tmobile.com”“”“”
VodafoneUK“internet”“web”“web”
AirtelIndia“airtelgprs.com”“”“”
TelstraAustralia“telstra.internet”“”“”
RogersCanada“internet.com”“”“”

Check your carrier’s documentation or contact support if the standard APN doesn’t work. Some carriers require additional authentication credentials while others accept empty username and password fields.

Complete Arduino Code for SIM900 GPRS Internet Connection

Now let’s examine working code that establishes a GPRS connection. This example demonstrates the command sequence needed to connect your SIM900 Arduino setup to the internet and communicate with a remote server.

Basic GPRS Initialization Code

#include <SoftwareSerial.h>

SoftwareSerial SIM900(7, 8); // RX, TX

void setup() {

  Serial.begin(9600);

  SIM900.begin(9600);

  Serial.println(“Initializing SIM900…”);

  delay(1000);

  // Check communication

  sendATCommand(“AT”, “OK”, 2000);

  // Check SIM card status

  sendATCommand(“AT+CPIN?”, “READY”, 2000);

  // Check network registration

  sendATCommand(“AT+CREG?”, “0,1”, 5000);

  // Initialize GPRS

  initGPRS();

}

void loop() {

  // Your application code here

  delay(10000);

}

void initGPRS() {

  // Close any existing connection

  sendATCommand(“AT+CIPSHUT”, “SHUT OK”, 5000);

  // Set single connection mode

  sendATCommand(“AT+CIPMUX=0”, “OK”, 2000);

  // Set non-transparent mode

  sendATCommand(“AT+CIPMODE=0”, “OK”, 2000);

  // Attach to GPRS service

  sendATCommand(“AT+CGATT=1”, “OK”, 5000);

  // Set APN (modify for your carrier)

  sendATCommand(“AT+CSTT=\”your_apn\”,\”\”,\”\””, “OK”, 5000);

  // Bring up wireless connection

  sendATCommand(“AT+CIICR”, “OK”, 10000);

  // Get local IP address

  sendATCommand(“AT+CIFSR”, “.”, 5000);

  Serial.println(“GPRS initialized successfully”);

}

bool sendATCommand(const char* command, const char* expected, unsigned long timeout) {

  String response = “”;

  unsigned long startTime = millis();

  Serial.print(“Sending: “);

  Serial.println(command);

  SIM900.println(command);

  while (millis() – startTime < timeout) {

    while (SIM900.available()) {

      char c = SIM900.read();

      response += c;

      Serial.write(c);

    }

    if (response.indexOf(expected) != -1) {

      Serial.println();

      return true;

    }

  }

  Serial.println(“\nCommand timeout or unexpected response”);

  return false;

}

Sending Data to ThingSpeak Server Using SIM900 Arduino

ThingSpeak provides an excellent platform for testing IoT data transmission. This example demonstrates HTTP GET requests to upload sensor readings:

#include <SoftwareSerial.h>

SoftwareSerial SIM900(7, 8);

String apiKey = “YOUR_THINGSPEAK_API_KEY”;

String serverIP = “api.thingspeak.com”;

void setup() {

  Serial.begin(9600);

  SIM900.begin(9600);

  delay(2000);

  initGPRS();

}

void loop() {

  float sensorValue = analogRead(A0) * (5.0 / 1023.0);

  sendToThingSpeak(sensorValue);

  delay(20000); // ThingSpeak requires 15 second minimum interval

}

void sendToThingSpeak(float value) {

  // Open TCP connection

  String connectCmd = “AT+CIPSTART=\”TCP\”,\”” + serverIP + “\”,\”80\””;

  sendATCommand(connectCmd.c_str(), “CONNECT OK”, 15000);

  delay(1000);

  // Prepare HTTP GET request

  String httpRequest = “GET /update?api_key=” + apiKey;

  httpRequest += “&field1=” + String(value);

  httpRequest += ” HTTP/1.0\r\n\r\n”;

  // Calculate request length

  int requestLength = httpRequest.length();

  // Initiate send

  String sendCmd = “AT+CIPSEND=” + String(requestLength);

  SIM900.println(sendCmd);

  delay(500);

  // Wait for > prompt

  if (waitForResponse(“>”, 5000)) {

    SIM900.print(httpRequest);

    waitForResponse(“SEND OK”, 10000);

  }

  delay(2000);

  // Close connection

  sendATCommand(“AT+CIPCLOSE”, “CLOSE OK”, 5000);

}

bool waitForResponse(const char* expected, unsigned long timeout) {

  String response = “”;

  unsigned long startTime = millis();

  while (millis() – startTime < timeout) {

    while (SIM900.available()) {

      char c = SIM900.read();

      response += c;

      Serial.write(c);

    }

    if (response.indexOf(expected) != -1) {

      return true;

    }

  }

  return false;

}

void initGPRS() {

  sendATCommand(“AT”, “OK”, 2000);

  sendATCommand(“AT+CIPSHUT”, “SHUT OK”, 5000);

  sendATCommand(“AT+CIPMUX=0”, “OK”, 2000);

  sendATCommand(“AT+CGATT=1”, “OK”, 5000);

  sendATCommand(“AT+CSTT=\”your_apn\”,\”\”,\”\””, “OK”, 5000);

  sendATCommand(“AT+CIICR”, “OK”, 10000);

  sendATCommand(“AT+CIFSR”, “.”, 5000);

}

bool sendATCommand(const char* cmd, const char* expected, unsigned long timeout) {

  SIM900.println(cmd);

  return waitForResponse(expected, timeout);

}

TCP/IP Communication with SIM900 Arduino

Beyond simple HTTP requests, the SIM900 Arduino combination supports full TCP/IP communication for bidirectional data exchange. This capability enables real-time monitoring applications where the server needs to push commands back to your device.

Establishing TCP Client Connection

The TCP client approach works well when your Arduino needs to initiate connections to known servers. The command sequence follows a predictable pattern: configure GPRS context, open connection, send data, receive response, close connection.

void tcpClientExample() {

  // Start TCP connection

  sendATCommand(“AT+CIPSTART=\”TCP\”,\”your.server.com\”,\”8080\””, “CONNECT OK”, 15000);

  // Send data

  String data = “Hello from SIM900 Arduino”;

  String sendCmd = “AT+CIPSEND=” + String(data.length());

  SIM900.println(sendCmd);

  delay(500);

  // Wait for prompt, then send data

  if (waitForResponse(“>”, 3000)) {

    SIM900.print(data);

    // Wait for SEND OK confirmation

    waitForResponse(“SEND OK”, 5000);

    // Read server response

    delay(2000);

    while (SIM900.available()) {

      Serial.write(SIM900.read());

    }

  }

  // Close connection

  sendATCommand(“AT+CIPCLOSE”, “CLOSE OK”, 5000);

}

HTTP POST Requests for JSON Data Transmission

Modern IoT platforms often expect JSON-formatted data via HTTP POST. The SIM900 supports this through its HTTP application toolkit, which simplifies bearer configuration and content handling:

void httpPostJSON() {

  // Configure bearer

  sendATCommand(“AT+SAPBR=3,1,\”CONTYPE\”,\”GPRS\””, “OK”, 5000);

  sendATCommand(“AT+SAPBR=3,1,\”APN\”,\”your_apn\””, “OK”, 5000);

  sendATCommand(“AT+SAPBR=1,1”, “OK”, 10000);

  // Initialize HTTP

  sendATCommand(“AT+HTTPINIT”, “OK”, 5000);

  sendATCommand(“AT+HTTPPARA=\”CID\”,1″, “OK”, 5000);

  sendATCommand(“AT+HTTPPARA=\”URL\”,\”http://your-api.com/data\””, “OK”, 5000);

  sendATCommand(“AT+HTTPPARA=\”CONTENT\”,\”application/json\””, “OK”, 5000);

  // Prepare JSON payload

  String jsonData = “{\”sensor\”:\”temp\”,\”value\”:25.5}”;

  String dataCmd = “AT+HTTPDATA=” + String(jsonData.length()) + “,10000”;

  SIM900.println(dataCmd);

  delay(500);

  if (waitForResponse(“DOWNLOAD”, 5000)) {

    SIM900.print(jsonData);

    delay(1000);

  }

  // Execute POST

  sendATCommand(“AT+HTTPACTION=1”, “+HTTPACTION:”, 30000);

  // Read response

  sendATCommand(“AT+HTTPREAD”, “OK”, 10000);

  // Cleanup

  sendATCommand(“AT+HTTPTERM”, “OK”, 5000);

  sendATCommand(“AT+SAPBR=0,1”, “OK”, 5000);

}

Troubleshooting SIM900 Arduino Connection Issues

After debugging dozens of SIM900 Arduino projects, I’ve compiled the most common issues and their solutions. Systematic troubleshooting saves considerable time compared to random experimentation.

Common Problems and Solutions

ProblemSymptomsLikely CauseSolution
No AT ResponseModule silent, no “OK”Power/wiring issueCheck power supply (2A minimum), verify TX/RX connections
SIM Not Detected+CPIN: ERRORSIM card issueReseat SIM, verify 2G compatibility, disable PIN lock
Network Registration Failed+CREG: 0,0Coverage/antenna issueCheck antenna connection, verify GSM coverage, try outdoor
GPRS Attach Failed+CGATT: 0APN/data plan issueVerify APN settings, confirm data plan is active
TCP Connection FailedCONNECT FAILServer/network issueVerify server address/port, check firewall settings
Module Keeps ResettingRandom restartsInsufficient powerUse external 5V 2A supply, add bulk capacitors

LED Status Indicators

The status LED on most SIM900 shields provides valuable diagnostic information:

Blink PatternMeaning
Fast blink (1 Hz)Module powered, not registered
Slow blink (3 sec interval)Registered on network
Always onModule in call or data transfer
OffModule powered down

Serial Monitor Debugging Tips

Enable echo with ATE1 during development to see commands in the Serial Monitor. Watch for these response patterns:

  • “CME ERROR: xxx” indicates SIM/network errors (check SIM card, signal strength)
  • “NO CARRIER” suggests network disconnection or server unavailable
  • “+PDP: DEACT” means GPRS context deactivated unexpectedly

Useful Resources and Downloads for SIM900 Arduino Development

Having proper documentation accelerates development significantly. Here are essential resources for SIM900 Arduino projects:

Official Documentation

ResourceDescriptionLink
SIM900 Hardware Design GuidePin descriptions, electrical specssimcom.ee/documents/SIM900
SIM900 AT Command ManualComplete AT command referenceSIMCOM official documentation
Arduino SoftwareSerial LibrarySerial communication referenceArduino.cc reference

Recommended Arduino Libraries

LibraryPurposeInstallation
SoftwareSerialAdditional serial portsBuilt into Arduino IDE
GPRS_Shield_ArduinoSimplified SIM900 functionsGitHub: Seeed-Studio
TinyGSMMulti-module GSM supportArduino Library Manager

IoT Platforms Compatible with SIM900 Arduino

PlatformProtocolUse Case
ThingSpeakHTTP GET/POSTData visualization, MATLAB analysis
BlynkHTTP APIMobile app control
MQTT BrokersTCP (via MQTT library)Real-time bidirectional communication
Custom ServersTCP/HTTPFull control over backend

Frequently Asked Questions About SIM900 Arduino GPRS

Can I power the SIM900 shield directly from Arduino’s 5V pin?

Technically possible, but not recommended for reliable operation. The Arduino’s onboard regulator cannot supply the 2A peak current the SIM900 demands during transmission. You’ll experience random resets and failed connections. Always use an external power supply rated for at least 2A current capacity.

Why does my SIM900 Arduino setup fail to register on the network?

Network registration failures typically stem from three causes: inadequate power supply preventing proper RF transmission, poor antenna connection reducing signal reception, or SIM card issues such as PIN lock enabled or incompatible network technology (the SIM900 only supports 2G GSM networks). Start by verifying power supply current capacity, then check antenna attachment, and finally confirm your SIM works in a basic phone on the same network.

What’s the difference between TCP and HTTP modes in SIM900?

TCP mode provides raw socket communication where you handle all protocol formatting yourself. HTTP mode uses the SIM900’s built-in HTTP stack to manage headers, content-type, and connection handling automatically. Use TCP for custom protocols or when you need precise control. Use HTTP for standard web API communication where the module handles protocol overhead.

How do I reduce power consumption in battery-powered SIM900 Arduino projects?

Implement sleep modes between transmissions. The SIM900 supports slow clock mode (1.5mA) where it maintains network registration while minimizing power draw. Send AT+CSCLK=1 to enable sleep mode, then toggle DTR pin to wake the module when needed. Combine this with Arduino sleep modes for significant power savings in remote deployments.

Can I use the SIM900 for real-time data streaming applications?

The SIM900 supports GPRS data rates up to 85.6 kbps upload and 42.8 kbps download. While adequate for sensor data and periodic updates, these rates limit real-time streaming applications. For video or high-frequency data streaming, consider newer modules like SIM7000 (LTE CAT-M1) or SIM7600 (4G LTE) that offer substantially higher throughput. The SIM900 remains excellent for low-bandwidth IoT applications where reliability matters more than speed.

Conclusion

The SIM900 Arduino combination provides a robust foundation for cellular IoT projects. While the 2G technology is aging, it remains viable in many regions and offers proven reliability that newer technologies are still matching. The straightforward AT command interface and integrated TCP/IP stack make implementation accessible even without deep telecommunications expertise.

Success with SIM900 projects comes down to three fundamentals: adequate power supply, correct APN configuration, and systematic debugging when issues arise. Master these basics, and you’ll have reliable cellular connectivity for remote monitoring, asset tracking, environmental sensing, and countless other applications where WiFi coverage falls short.

For projects requiring higher data rates or 4G connectivity, consider the SIM7000 or SIM7600 series as direct upgrade paths. The AT command structure remains similar, making code migration relatively straightforward when project requirements evolve beyond 2G capabilities.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.