Sending Data from GSM module to a web server using Arduino: I have seen many people searching on the internet about how to use GSM module to send data to a server. This article will help you send data to a server using GPRS data of GSM module. you can control anything from a server and send any type of data to a server using gsm module using GPRS data of your mobile phone network. you can also do the same task with the help esp826 wifi module and ethernet shield. This is an IoT-based project in this project we send data from SIM900A GSM / GPS module to web server using Arduino. We have already posted an article on sending data to the server using an Arduino. In this embedded systems based project, We enter data using 4×4 keypad and also display on 16×2 LCD in real time. Data can be of any type numeric, alphabetic or a special character. A web server which is used to receive data is created on Spark fun website. Web server can be publically accessed and used.
- 1 Block Diagram of sending data from gsm module to a web server
- 2 Components Required for sending data from gsm module to a web server
- 3 Circuit diagram for sending data to a web server using Arduino
- 4 Connections for sending data to server using gsm module aArduinoino
- 5 How to make Web server on spark fun website
- 6 Working on sending data to server using gsm and Arduino
Components Required for sending data from gsm module to a web server
Following is a list of components required for sending data from gsm module to a web server using gsm module and Arduino.
- SIM900A GSM/GPS Module: SIM900A provides both GSM and GPS service in this compact module. We can send SMS, data, Voice, and Fax using this module. Its operating voltages range is 3.2 to 4.8V. It draws the only 1.0mA in sleep mode. Its Operation temperature range is -40°C to +85 °C. you can check this article to know, how to interface a GSM module with Arduino.
- Arduino Uno: As always it is easy to use. Provides enough pins for my project. Consumes less power, Cheap, user-friendly and it external library is found easily. I recommend you to check a list of Arduino tutorials for beginners.
- 16×2 LCD: It can display 16 characters in 2 rows. Easy to use with Arduino Uno. Also, operates on the same voltages of Arduino Uno. Check this guide to know how to interface Arduino with LCD?
- 4×4 Keypad: It consists of 4 rows and 4 columns. It contains 16 buttons which we can define as our requirement in the code. A keypad is used as following in this project.
Circuit diagram for sending data to a web server using Arduino
Circuit diagram for sending data to a web server using Arduino and gsm module is given below: Circuit Diagram for sending data from gsm module to a web server
Connections for sending data to server using gsm module aArduinoino
16×2 LCD to Arduino:
- LCD pin R/S to Arduino pin A0.
- R/W to ground.
- LCD pin Enable to Arduino pin A1.
- LCD pin D4 to Arduino pin A2.
- LCD pin D5 to Arduino pin A3.
- LCD pin D6 TO Arduino pin A4.
- LCD pin D7 TO Arduino pin A5.
- Others LCD pins are connected as shown in the picture.
4×4 Keypad to Arduino Uno:
Starting from left
- Keypad pin 1 to Arduino pin D11.
- Keypad pin 2 to Arduino pin D10.
- Keypad pin 3 to Arduino pin D9.
- Keypad pin 4 to Arduino pin D8.
- Keypad pin 5 to Arduino pin D7.
- Keypad pin 6 to Arduino pin D6.
- Keypad pin 7 to Arduino pin D5.
- Keypad pin 8 to Arduino pin D4.
SIM900A GSM / GPS Module to Arduino:
- Rx pin of module to Arduino pin D3.
- Tx pin of module to Arduino pin D2.
- Connect external 5 volt dc supply to Vcc and Gnd terminal of module.
- Connect Ground pin of module with Ground pin of Arduino.
How to make Web server on spark fun website
- Visit the Spark Fun website. Go to the data section.
- Click on the following option: Create data stream on Spark fun
- Fill the required information and click on save.
- Now you will see the following Links: Save the keys for the future use.
Working on sending data to server using gsm and Arduino
First of all, we enter text using the 4×4 keypad and the text is displays on 16×2 LCD in real time. When we finish our text entering then we press D button on the keypad to send the data to web server. The GSM module connects to the web server by using the information defined in the code such as public and private keys. GSM send the data on the web server which we can check by opening the web server. The data can be of any type such as numeric, alphabetic or special character. The only disadvantage is the spark fun only provides 50MB of data which is not enough if you want to use regularly.