Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Cellular IoT: Send SIM800/900 GPRS Data to Thingspeak with Arduino
Arduino Projects IoT Projects

Cellular IoT: Send SIM800/900 GPRS Data to Thingspeak with Arduino

Mamtaz AlamBy Mamtaz AlamUpdated:August 21, 202221 Comments5 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Send GSM SIM800900 GPRS Data to Thingspeak with Arduino
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

In this project we will learn about IoT using GSM Module. We will use SIM900/800 GSM Module with Arduino and send the DHT11 Sensor data to Thingspeak Server.


Overview

Nowadays we use ESP8266 or ESP32 or any other wifi Modules to send any sensor data to the Internet wirelessly. Hence Wifi comes into action and thus we need Wifi Connection for wireless communication with any server. But the disadvantage of using Wifi is, it is not available everywhere. The wifi signal is limited to certain locations and to a certain range up to a few meters. For example, in order to use IoT Connectivity and to get data from the farmer’s fields, we can’t rely on Wifi due to unavailability. Similarly forest, river zone, mountains are the areas where wifi connection is not available.

So, GSM GPRS is the only alternative left as per the present scenario and current technology. GSM GPRS Module allows you to add location-tracking, voice, text, SMS, and data to your application. The big advantage of GSM/GPRS Connectivity is, it covers a wide area and signal/connectivity is available almost everywhere.


So in this project, we will learn about the Internet of Things using GSM GPRS Module, i.e Cellular IoT. We will take SIM900A as a reference GSM GPRS Module and Interface it with Arduino Board. We will sense the surrounding humidity and temperature using DHT11 Humidity/Temperature Sensor. The humidity & temperature data will be sent to Thingspeak server using AT Commands for GSM Module. ThingSpeak server is an open data platform and API for the Internet of Things that enables you to collect, store, analyze, visualize, and act on data from sensors. So let us learn all about GSM Module with Thingspeak & Arduino.

You can check one of our posts related to a similar system:
1. Arduino SIM: Cellular Connectivity Service for Arduino IoT Cloud
2. Send SIM800/900 GSM/GPRS Data to Thingspeak with STM32

If you want to send the data in JSON format using any API Server you can check our post here: SIM900/800 HTTP post request in JSON Format with Arduino


Bill of Materials

Following are the components required for learning the Cellular IoT project. All the components can be easily purchased from Amazon. The component purchase link is given below.

S.N.Components QuantityPurchase Links
1Arduino UNO Board1Amazon | AliExpress
2GSM Module SIM800/9001Amazon | AliExpress
3DHT11 Sensor1Amazon | AliExpress
412/9V Power Supply1Amazon | AliExpress
5Connecting Wires10Amazon | AliExpress
6Breadboard1Amazon | AliExpress

SIM900A GSM/GPRS Module

The SIM900A is a readily available GSM/GPRS module, used in many mobile phones and PDA. The module can also be used for developing IoT (Internet of Things) and Embedded Applications. It works on frequencies 900/ 1800 MHz. The Modem comes with an RS232 interface, which allows you to connect PC as well as a microcontroller with RS232 Chip(MAX232). The baud rate is configurable from 9600-115200 through AT command. The GSM/GPRS Modem is having internal TCP/IP stack to enable you to connect with the internet via GPRS. It is suitable for SMS, Voice as well as DATA transfer applications in the M2M interface.

SIM900A GSM Module

The onboard Regulated Power supply allows you to connect a wide range of unregulated power supply. Using this modem, you can make & receive audio calls, Send & Read SMS, GPRS Internet, etc through simple AT commands.



SIM900A GSM/GPRS Modem Fetures

1. Input Voltage: 12V DC
2. Supports MIC, Audio Input & Speakers
3. Dual-Band GSM/GPRS 900/ 1800 MHz
4. RS232 interface for direct communication with computer or MCU kit
5. Configurable baud rate
6. Wire Antenna ( SMA connector with GSM Antenna Optional )
7. SIM Cardholder
8. Built-in Network Status LED
9. Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS
01. DATA GPRS: download transfer max is 85.6KBps, Upload transfer max 42.8KBps


Circuit/Connection between GSM Module Arduino & DHT11

Here is a circuit diagram for interfacing SIM800/900 GSM Module with Arduino & DHT11 for Sending data to Thingspeak Server. The connection is fairly simple as shown below.

GSM Arduino Thingspeak

SIM800/900 is a UART Module. We use the Software Serial command for Serial Communication. So, connect its TX & RX Pins to Arduino pin 2 & 3 respectively. Supply the GSM Module with 9V/12V Power supply. Similarly, connect the VCC & GND Pin of DHT11 Sensor to Arduino 5V & GND. Connect its output pin to A0 of Arduino.

SIM80 900 GSM Arduino




Setting up Thingspeak

ThingSpeak provides very good tool for IoT based projects. By using ThingSpeak site, we can monitor our data and control our system over the Internet, using the Channels and web pages provided by ThingSpeak. So first you need to sign up for ThingSpeak. So visit https://thingspeak.com and create an account.

Thingspeak Setup

Then create a new channel and set up what you want. The tutorial in the video below. Follow the video for more clarifications.

Then create the API keys. This key is required for programming modifications and setting your data.

Now click on channels so that you can see the online data streaming


Source Code/Program

The source code/program to Send GSM SIM800/900 GPRS Data to Thingspeak with Arduino is given below. No libraries are required. You can simply copy the code and upload to the Arduino Board.

But before that, you have to make two changes in the code. Change your APN Services first. In my case, I am using Airtel SIM and the default APN for Airtel is airtelgprs.com. You can check your SIM APN from your google or cellular provider.

You also need to make changes to the API key from thingspeak.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <SoftwareSerial.h>
SoftwareSerial gprsSerial(2,3);
 
#include <String.h>
#include <DHT.h>
 
#define DHTPIN A0
 
DHT dht(DHTPIN, DHT11);
void setup()
{
  gprsSerial.begin(9600);               // the GPRS baud rate  
  Serial.begin(9600);    // the GPRS baud rate
  dht.begin();
 
  delay(1000);
}
void loop()
{
      float h = dht.readHumidity();
      float t = dht.readTemperature();
      delay(100);  
        
      Serial.print("Temperature = ");
      Serial.print(t);
      Serial.println(" °C");
      Serial.print("Humidity = ");
      Serial.print(h);
      Serial.println(" %");    
      
  
  if (gprsSerial.available())
    Serial.write(gprsSerial.read());
 
  gprsSerial.println("AT");
  delay(1000);
 
  gprsSerial.println("AT+CPIN?");
  delay(1000);
 
  gprsSerial.println("AT+CREG?");
  delay(1000);
 
  gprsSerial.println("AT+CGATT?");
  delay(1000);
 
  gprsSerial.println("AT+CIPSHUT");
  delay(1000);
 
  gprsSerial.println("AT+CIPSTATUS");
  delay(2000);
 
  gprsSerial.println("AT+CIPMUX=0");
  delay(2000);
  ShowSerialData();
  gprsSerial.println("AT+CSTT=\"airtelgprs.com\"");//start task and setting the APN,
  delay(1000);
  ShowSerialData();
  gprsSerial.println("AT+CIICR");//bring up wireless connection
  delay(3000);
  ShowSerialData();
  gprsSerial.println("AT+CIFSR");//get local IP adress
  delay(2000);
  ShowSerialData();
  gprsSerial.println("AT+CIPSPRT=0");
  delay(3000);
  ShowSerialData();
  
  gprsSerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");//start up the connection
  delay(6000);
  ShowSerialData();
  gprsSerial.println("AT+CIPSEND");//begin send data to remote server
  delay(4000);
  ShowSerialData();
  
  String str="GET https://api.thingspeak.com/update?api_key=O13AOCHYYNU2LQ19&field1=" + String(t) +"&field2="+String(h);
  Serial.println(str);
  gprsSerial.println(str);//begin send data to remote server
  
  delay(4000);
  ShowSerialData();
 
  gprsSerial.println((char)26);//sending
  delay(5000);//waitting for reply, important! the time is base on the condition of internet
  gprsSerial.println();
  ShowSerialData();
  gprsSerial.println("AT+CIPSHUT");//close the connection
  delay(100);
  ShowSerialData();
}
void ShowSerialData()
{
  while(gprsSerial.available()!=0)
  Serial.write(gprsSerial.read());
  delay(5000);
  
}


Results & Observations

Once the code is uploaded to Arduino UNO Board, the module will start responding. You can open the Serial Monitor and see the following responses there.

Similarly, you can open the Thingspeak private view and see the temperature and humidity logged data there.

So this is how you can Send GSM SIM800/900 GPRS Data to Thingspeak with Arduino.

If you want to send the data in JSON format using any API Server you can check our post here: SIM900/800 HTTP post request in JSON Format with Arduino


Video Tutorial & Explanation

Cellular IoT | Send Data to Thingspeak Server using SIM800/900 GSM/GPRS Module
Watch this video on YouTube.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleWireless Bluetooth Controlled Robot using Arduino
Next Article Send SIM800/900 GSM/GPRS Data to Thingspeak with STM32

Related Posts

ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

Updated:June 21, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

Updated:June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

Updated:May 10, 20262K
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

Updated:May 2, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

Updated:April 27, 20261K
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

Updated:April 27, 20262K
View 21 Comments

21 Comments

  1. Toni on July 27, 2020 7:18 PM

    excuse me sir, i wanna ask about this line :
    gprsSerial.println((char)26);//sending

    what is (char)26 mean?
    thanks before

    Reply
  2. GAURAV PIPLANI on August 7, 2020 4:10 PM

    i have connected the GSM modem to my PC and then i am send commands to the GSM Modem using terminal Software.
    This is what i am sending:
    AT
    AT+CPIN?
    AT+CREG?
    AT+CGATT?
    AT+CIPSHUT
    AT+CIPSTATUS
    AT+CIPMUX=0
    AT+CSTT=”www”
    AT+CIICR
    AT+CIFSR
    AT+CIPSTART=”TCP”,”api.thingspeak.com”,”80″
    AT+CIPSEND
    GET http://api.thingspeak.com/update?api_key=X4L3QD19Q7YSLK3J&field1=125
    #026

    When i use GET instruction and then send 026 i get SEND OK from the modem and then CLOSED but thingspeak channel is not updated.

    Please help

    Reply
  3. bwengye duncan on November 18, 2020 9:23 PM

    T
    oni the line means you are terminating the message being sent. It basically tells the GSm that the message ends here hence executing the send command

    Reply
  4. Al Diman on February 1, 2021 5:42 PM

    I have loaded the code to my arduino uno. Everything seems to work except that my thingspeak channel is not updating temperature and humidity data. Pease guide me on the issue.

    Reply
    • Mr. Alam on February 1, 2021 5:44 PM

      Add some delays between the thingspeak data sending command in the code. It should fix the issue

      Reply
  5. Al Diman on February 13, 2021 1:42 PM

    Hi,

    Thanks on your reply. The data on my channel are now updating. The data are updated every 1.5 minutes (about 88 seconds). Is it possible to have data updated every 60 seconds? What part in the code should I change? Thanks again for the help.

    Reply
  6. Andrew on March 25, 2021 1:30 AM

    Hi, I noticed that the GSM module needs an external power supply rather than being powered from the arduino board. What sort of current does the GSM module draw? I was hoping to power this from a battery and place the node in a remote area with small solar panel to trickle feed the battery.

    Reply
    • Mr. Alam on March 25, 2021 10:26 AM

      The power supply varies depending upon the type of GSM Module used. The SIM800/900 GSM Module requires more than 1.5A of current. Hence 9V, 2A supply is good for the module.

      Reply
  7. Andrew on March 26, 2021 7:21 PM

    Thanks for the reply. I have got it up and running now but it seems to be updating things speak at random intervals with some gaps as big as 25 minutes. Is this because the delays are not long enough and it times out before making connection?

    Reply
  8. Andy on March 29, 2021 7:29 PM

    Hi, I have the same issue. Can you please confirm exactly where this extra delay should be?

    Reply
    • Mr. Alam on March 29, 2021 8:42 PM

      delay between each and every AT Commands should be increased.

      Reply
  9. Andrew on March 29, 2021 11:34 PM

    Hi, I have uploaded the same code and thingspeak updates but at random intervals. What delays should I adjust to make sure I get data sent everytime the program runs. I have ‘send Ok’ back but thingspeak does not update and it tends to randomly update now and then.

    Reply
  10. srikanth on April 1, 2021 11:26 AM

    #026 command is used for termination, so it varies from terminal program to program. the following terminal it will work.Take a try
    https://sites.google.com/site/terminalbpp/

    Reply
  11. Tapiwanashe Vincent Kufarimani on April 4, 2021 5:21 PM

    i am having +CME ERROR:50 , +CME ERROR:53 and +CME ERROR:58

    Reply
  12. stevejferry on June 28, 2021 7:33 PM

    Hello, is there a way to get the http status from ThingSpeak ie the 200 code ThingSpeak sends back when the post has been successful? I am using an A9 GSM/GPRS module with an ESP32 board to receive LoRa packets from my nodes and forward them to ThingSpeak. Thanks, Steve.

    Reply
  13. samarjeetchavan on October 28, 2021 2:47 PM

    can we post data to a google sheet with similar code?

    Reply
  14. Srikanth n on June 30, 2022 1:35 PM

    I am also facing the same issue. did you find a solution ??

    Reply
  15. Abuud on October 18, 2022 3:23 PM

    Thanks for the well-explained tutorial. I was wondering if the same project can be implemented using esp32. what will be the necessary changes in the code in term of communication between esp32 and sim800L.

    Reply
  16. jubair on December 28, 2022 3:34 AM

    please do like this http://api.thingspeak.com/update?api_key=X4L3QD19Q7YSLK3J&field1=125 \r\n\r\n ctrl+z

    Reply
  17. Ankit Devganiya on February 27, 2023 1:02 AM

    Hello frnds, I’m sending data SIM900A GSM/GPRS to AWS IOT with esp32 but data not sending. can you solve issue?

    Reply
  18. afotsi on May 31, 2023 6:43 PM

    Hi, how can I integrate two other sensors? For weight and humidity?Thanks

    Reply

CommentsCancel reply

Latest Posts
ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

June 21, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
Top Posts & Pages
  • ESP32 Fingerprint Attendance System with Live Web Dashboard
    ESP32 Fingerprint Attendance System with Live Web Dashboard
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • How to use Modbus RTU with ESP32 to read Sensor Data
    How to use Modbus RTU with ESP32 to read Sensor Data
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • How to use INA226 DC Current Sensor with Arduino
    How to use INA226 DC Current Sensor with Arduino
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • MAX30102 & Arduino: Heart Rate + Blood Oxygen Monitoring
    MAX30102 & Arduino: Heart Rate + Blood Oxygen Monitoring
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (205)
    • ESP32 MicroPython (7)
    • ESP32 Projects (82)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.