In this article, we will learn how to interface a GSM Module with an Arduino Microcontroller.
As we can see the ever increasing technology in our day to day life we are becoming more reliant on technology. And the recent rise of development in IoT(Internet of things) has boosted this process to a mainstream.
We’re using the Internet of things in agriculture, in our homes, in industries, and the applications and their uses are increasing day by day.
As the applications of IoT are rapidly increasing, we need more applications to work wirelessly and which are operable from any location on earth.
Check out our different Wireless Modules
Previously IoT devices were operable mostly over wifi. For devices to work over wifi, the operation and controlling range becomes limited to the wifi range. So to increase the operation range GSM based technology has been used in IoT to control the device from anywhere on the earth and manage it as per your application.
In this article we will discuss how to interface a GSM module and Arduino so that you can start building your own GSM based IOT product.
Here we will be using SIM A7672S LTE CAT 1(4G) gsm module from SIMCOM and Arduino UNO board which are the two most popular development modules and also it got the best support from hobbyists and the developer community. So let’s begin on how to connect physical objects and the outside digital world in totally new and creative ways.
See different GSM modules from SIMCOM:
Let’s see some of the General features of SIMCOM Sim A7672S and Arduino UNO
SIMA7672S features:
A7672S is the LTE Cat 1 module which supports wireless communication modes of LTE-FDD/GSM/GPRS/EDGE. It supports a maximum 10Mbps downlink rate and 5Mbps uplink rate. A7672S adopts LCC+LGA form factor and is compatible with SIM7000/SIM7070 series (NB/Cat M modules), and SIM800A/SIM800F(2G modules), which enables smooth migration from 2G/NB/Cat M products to LTE Cat 1 products, and greatly facilitates more compatible product design for the customer needs.
● Power supply VBAT : 3.4V ~4.2V, Recommended VBAT: 3.8V GPRS multi-slot class 12/10.
● Power saving : Current in sleep mode TBDCompliant to GSM phase 2/2+
● LTE power level: 3 (23dBm±2.7dB)
● TDD/FDD-LTE category 1 : 10 Mbps (DL),5 Mbps (UL)
● GSM/LTE antenna interface
● GNSS antenna interface(optional)
● Bluetooth antenna interface(optional)
Arduino UNO:
Arduino UNO is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 can be used as PWM outputs, 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller for IoT projects with Arduino IDE code editor.
See different microcontrollers available from best in the industry standards
The operating voltage is 5V
The recommended input voltage will range from 7v to 12V
The input voltage ranges from 6v to 20V
Digital input/output pins are 14
Analog i/p pins are 6
DC Current for each input/output pin is 40 mA
DC Current for 3.3V Pin is 50 mA
Flash Memory is 32 KB
SRAM is 2 KB
EEPROM is 1 KB
CLK Speed is 16 MHz
Integrating SIM800C with Arduino:
Components
Sim A7672S development module
Arduino UNO board
Micro SIM Card
USB cable (Arduino to computer)
Jumper wires for connections
Software
Arduino IDE (Installed to your PC)
Pin connections:
Arduino UNO SIM A7672S
After your connections are successfully made, insert your sim card inside the module, open Arduino IDE and copy the following code in the editor:
For this example we are going to use Software Serial Library. which is used to communicate between the Arduino and the GSM
Code:
#include <SoftwareSerial.h>
SoftwareSerial A7672S(7,8); //RX TX
void setup() {
Serial.begin(9600){
A7672S.begin(9600);
Serial.println("Setup Complete");
}
void loop() {
while(A7672S.available()){
Serial.write(A7672S.read());
}
while(Serial.available()){
A7672S.write(Serial.read());
}
}
Results:
After opening the Serial Monitor, you should get the following response:
After this type “AT” in the Serial input bar. If no SIM card is present, a Serial reply of “OK” is expected. If a SIM card is present, the response would be “OK” followed by “Call Ready” and “SMS Ready.”
You may now proceed to input SIM800C AT commands through which you can perform various operations like sending/receiving SMS, dialing and receiving calls, downloading content from the internet, uploading any important file to the cloud, etc..
Conclusion:
Using the above process you can make GSM modules work as per your requirements, there are many AT commands which you can explore. There are also different modules from simcom and more addon functionality microcontrollers from Espressif available at Campus Component.
As the use of GSM in making IoT products is increasing, this opens a huge range of products and technology which will be based on GSM. We can make different projects using GSM and Arduino, eg. in smart agriculture, smart homes, smart road lights and many applications related to large industries.
If you are looking for electronic components by SIMCom and different microcontrollers, reach out Campus Component today!
Related Blog: