Home> Blog> Learn about Global System for Mobile through A GSM Project

Learn about Global System for Mobile through A GSM Project

GSM project
PCBONLINE Team Tues, Dec 24, 2024
104
GSM IoT device

Global System for Mobile Communications (GSM) is a digital cellular communication standard for low-cost IoT applications. It is not preferred over LTE, 5G, NB-IoT, and LoRaWAN technologies, but it is still used where low bandwidth and wide coverage are important.

Let's learn about GSM technology and see an IoT project based on GSM.

What is GSM Global System for Mobile Communications

GSM operates on specific frequency bands (850 MHz, 900 MHz, 1800 MHz, and 1900 MHz), ensuring global interoperability. Initially developed to facilitate voice calls, it has since evolved to support SMS and low-bandwidth data communication, making it a cornerstone technology in IoT and telecommunication systems.

GSM technology's reliability, cost-effectiveness, and extensive coverage make it highly suitable for use in real-world applications such as home automation, security systems, remote monitoring, and emergency communication systems.

Below are the types of GSM services.

1. Voice communication (circuit-switched)

Traditional cellular calls between two devices.

oProvides reliable communication with minimal delay.

2. Short message service (SMS)

Allows devices to send and receive text messages, often used for notifications in IoT systems.

3. Data transmission (packet-switched)

GPRS (General Packet Radio Service) and EDGE (Enhanced Data Rates for GSM Evolution) allow mobile devices to access the internet.

4. Multimedia messaging service (MMS)

Facilitates sending images, videos, and audio files. Less common in IoT but still relevant in multimedia applications.

You can find applications of the GSM technology in IoT applications.

IoT Applications of GSM Technology

GSM applications
  • Security systems: Intrusion detection, surveillance systems, and fire alarms can use GSM to notify users in real-time through SMS or voice calls.
  • Remote monitoring: Enables monitoring of machinery, industrial equipment, or environmental conditions in remote areas.
  • Healthcare: Wearable devices can use GSM to notify medical staff of emergencies or send real-time health data.
  • Agriculture: Alerts farmers about soil conditions, weather, or water levels in irrigation systems.
  • Vehicle tracking: GPS-enabled GSM modules allow real-time vehicle location tracking and theft prevention.
  • Disaster management: Used in early warning systems for earthquakes, floods, and other natural disasters.

Advantages of GSM in IoT Applications

  • Wide network coverage: GSM is available in most areas, even in remote locations, making it ideal for IoT devices.
  • Reliable communication: GSM ensures stable and consistent message delivery.
  • Low cost: GSM modules like SIM800L are cost-effective compared to other wireless communication technologies.
  • Ease of integration: GSM modules are easy to set up and integrate into existing systems.

Overview of the GSM Project Example: GSM-Based Security System

To demonstrate GSM technology's practical applications, we'll build a motion-detecting security system. This GMS project example is a GSM-based security system using ESP32, SIM800L, and PIR Sensor.

The system uses a PIR sensor to detect motion and sends an SMS alert using the SIM800L GSM module, controlled by the ESP32 microcontroller.

System Overview

The system consists of:

  • ESP32 microcontroller: The main processing unit that reads data from the PIR sensor and sends commands to the SIM800L module.
  • SIM800L GSM module: A low-cost GSM module that handles communication with the cellular network, enabling SMS alerts.
  • PIR motion sensor: Detects human or animal movement and triggers the alert system.
  • Power supply: A 3.7V–4.2V Li-Po battery or 5V supply for the SIM800L and ESP32.

Components Needed:

  • ESP32
  • SIM800L GSM module
  • PIR sensor
  • Li-Po battery (3.7V) or DC-DC step-down regulator (to power SIM800L)
  • Breadboard and jumper wires
  • A standard SIM card with SMS capability

Here's a simple wiring setup for the components:

SIM800L to ESP32:
  • ESP32 TX (GPIO 17) -> SIM800L RX
  • ESP32 RX (GPIO 16) -> SIM800L TX
  • ESP32 GND -> SIM800L GND
  • Power SIM800L with 5V (via a Li-Po battery or voltage regulator)
2.PIR Sensor to ESP32:
  • PIR Signal Pin -> GPIO 15 on ESP32
  • PIR VCC -> 5V from ESP32
  • PIR GND -> ESP32 GND

Applications of GSM-Based Security System

GSM project applications
  • Home and office security: Detect intruders and notify the owner in real time.
  • Farm protection: Monitor crop fields or storage areas for unauthorized access.
  • Warehouse security: Alerts in case of unexpected motion in storage facilities.
  • Vehicle surveillance: Detect tampering or unauthorized entry into vehicles.
  • Disaster alerts: Use GSM with sensors to detect environmental changes and send early warnings.

How to Build the GSM Project Example

Below are how to make the above GSM-based security system project, including the codes, schematic diagram, and PCB layout.

Code Implementation

The ESP32 reads data from the PIR sensor. When motion is detected, it triggers the SIM800L to send an SMS alert.

#include

// Define GSM and PIR pins

#define PIR_PIN 15 // PIR sensor pin

#define SIM800L_TX 17 // TX pin to SIM800L

#define SIM800L_RX 16 // RX pin from SIM800L

// Phone number to receive SMS alerts

const char phone_number[] = "+1234567890"; // Replace with your phone number

// Create a software serial connection for SIM800L

SoftwareSerial sim800l(SIM800L_TX, SIM800L_RX);

bool motionDetected = false;

void setup() {

  Serial.begin(115200); // Debugging

  sim800l.begin(9600);  // SIM800L communication

  pinMode(PIR_PIN, INPUT); // PIR sensor pin as input

  Serial.println("GSM Security System Ready");

}

void loop() {

  motionDetected = digitalRead(PIR_PIN); // Read PIR sensor state

  if (motionDetected) {

    Serial.println("Motion Detected!");

    sendSMS("ALERT! Motion detected in the secured area.");

    delay(10000); // Delay to avoid spamming SMS

  }

}

void sendSMS(const char* message) {

  sim800l.println("AT+CMGF=1"); // Set SMS mode

  delay(100);

  sim800l.print("AT+CMGS=\"");

  sim800l.print(phone_number);

  sim800l.println("\"");

  delay(100);

  sim800l.print(message);

  sim800l.write(26);

  delay(5000); // Wait for the SMS to be sent

  Serial.println("SMS Sent!");

}

Schematic Diagram and PCB Layout

The schematic represents the connections between the ESP32 microcontroller, SIM800L GSM module, and the PIR sensor. The PIR sensor is connected to a GPIO pin 15 on the ESP32, while the SIM800L communicates via TX/RX pins. Proper power supply regulation for the SIM800L is ensured to maintain stability during operation.

GSM project schematic

PCB Design

GSM project PCB design
System demonstration

1. Initialization: When powered on, the ESP32 initializes the PIR sensor and GSM module.

2. Motion detection: If the PIR sensor detects motion, the ESP32 sends an alert SMS to the predefined phone number.

3. Real-time alerts: The system is particularly useful for homes, offices, or remote locations where immediate notification of suspicious activity is critical.

One-Stop IoT PCBA Manufacturer PCBONLINE

If you have a plan to develop and manufacture any IoT device or system under your brand or name, whether it uses GSM, NB-IoT, LoRaWAN, 5G, or other protocols, you can work with the one-stop IoT PCBA manufacturer PCBONLINE that provides R&D and turnkey electronics manufacturing until you receive the IoT system or finished device.

IoT PCBA manufacturer PCBONLINE

Founded in 1999, PCBONLINE has two large advanced PCB manufacturing bases, one PCB assembly factory, stable supply chains, and an R&D team. Besides, it has long-term cooperation with China's top 3 mold and enclosure factories for jigs and enclosures for PCB assembly and box-builds. What's more, PCBONLINE has strategic cooperation with mainstream microcontroller companies such as Espressif, Neoway, and Quectel.

Advantages of PCBONLINE in IoT PCBA manufacturing

PCBONLINE provides free design for manufacturing (DFM) and one-on-one engineering support for GSM devices and any IoT projects.

PCBONLINE has IoT project R&D capabilities and can do the R&D for your IoT system or take part in your project's development from the early stage.

No worries about burning the MCU, as the one-stop PCBA manufacturer PCBONLINE offers free IC programming for your IoT project.

The IoT PCBs, PCBAs, and box-builds at PCBONLINE have gone through comprehensive tests, such as X-ray, functional testing, 3D AOI, and application simulation testing.

High-quality IoT PCBA manufacturing certified with ISO 9001:2015, ISO 14001:2015, IATF 16949:2016, RoHS, REACH, UL, and IPC-A-610 Class 2/3.

No matter what quantity of boards/devices you want, PCBONLINE can do one-stop PCBA manufacturing custom meeting your demand. When your GSM or any other IOT project goes to bulky production, PCBONLINE refunds the fees of R&D, sampling, and PCBA functional testing. To get a quote for your GSM IoT PCBA project, contact info@pcbonline.com.

Conclusion

This article demonstrates how GSM technology, combined with ESP32 and a SIM800L module, can be effectively used to build a simple yet powerful motion-detecting security system. The GSM project highlights the practical use of GSM in IoT applications and shows its real-world applicability in various industries. If you need R&D and turnkey electronics from prototyping to box-build assembly, work with the one-stop IoT PCBA manufacturer PCBONLINE.

© This article is an original work of the PCBONLINE team. Please indicate the author PCBONLINE if you reprint. If the article is reproduced without permission or indicating the author's source, PCBONLINE reserves the right to investigate the infringement.

GET A FREE QUOTE

File Upload