Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Mega 2560 Controlled GSM and Ultrasonic Sensor System

Image of Arduino Mega 2560 Controlled GSM and Ultrasonic Sensor System

Circuit Documentation

Summary

The circuit in question is designed to interface various sensors and actuators with an Arduino Mega 2560 microcontroller. The components include a SIM900A GSM module for cellular communication, a servo motor for actuation, multiple HC-SR04 ultrasonic sensors for distance measurement, an inductive sensor for metal detection, and a single-channel relay module for controlling high-power devices. The circuit is powered by a 5V supply, which is distributed to all components that require it. Ground connections are also shared across the entire circuit. The Arduino Mega 2560 serves as the central processing unit, controlling the sensors and actuators based on programmed logic.

Component List

SIM900A GSM Module

  • Description: A GSM/GPRS module for cellular communication.
  • Pins: GND, DB9-3 (RXD), DB9-2 (TXD), 5V, 3VR, 5VR, 3VT, 5VT, VCC, Ring, RESTART, RESET, STATUS

Servo Motor

  • Description: An actuator capable of precise angular positioning.
  • Pins: GND, VCC, Pulse

Arduino Mega 2560

  • Description: A microcontroller board based on the ATmega2560.
  • Pins: IOREF, RESET, 3V3, 5V, GND, VIN, Digital I/O, Analog Inputs, PWM, Communication, etc.

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor.
  • Pins: VCC, TRIG, ECHO, GND

Inductive Sensor

  • Description: A sensor for detecting metallic objects.
  • Pins: Signal, VCC, GND

Relay Module (1 Channel)

  • Description: A module for electrically operating a switch.
  • Pins: S, 5V, GND, NC, COM, NO

Wiring Details

SIM900A GSM Module

  • GND connected to system ground.
  • 5V connected to 5V power supply.
  • 5VR connected to Arduino Mega 2560 pin D2 PWM.
  • 5VT connected to Arduino Mega 2560 pin D3 PWM.

Servo Motor

  • GND connected to system ground.
  • VCC connected to 5V power supply.
  • Pulse connected to Arduino Mega 2560 pin D12 PWM.

Arduino Mega 2560

  • 5V connected to 5V power supply.
  • GND connected to system ground.
  • D2 PWM connected to SIM900A 5VR.
  • D3 PWM connected to SIM900A 5VT.
  • D4 PWM connected to Inductive Sensor Signal.
  • D5 PWM connected to Relay Module S.
  • D6 PWM connected to HC-SR04 Ultrasonic Sensor TRIG.
  • D7 PWM connected to HC-SR04 Ultrasonic Sensor ECHO.
  • D8 PWM connected to HC-SR04 Ultrasonic Sensor TRIG.
  • D9 PWM connected to HC-SR04 Ultrasonic Sensor ECHO.
  • D10 PWM connected to HC-SR04 Ultrasonic Sensor TRIG.
  • D11 PWM connected to HC-SR04 Ultrasonic Sensor ECHO.

HC-SR04 Ultrasonic Sensors

  • VCC connected to 5V power supply.
  • GND connected to system ground.
  • TRIG connected to Arduino Mega 2560 pins D6 PWM, D8 PWM, or D10 PWM (depending on the sensor instance).
  • ECHO connected to Arduino Mega 2560 pins D7 PWM, D9 PWM, or D11 PWM (depending on the sensor instance).

Inductive Sensor

  • Signal connected to Arduino Mega 2560 pin D4 PWM.
  • VCC connected to 5V power supply.
  • GND connected to system ground.

Relay Module (1 Channel)

  • S connected to Arduino Mega 2560 pin D5 PWM.
  • 5V connected to 5V power supply.
  • GND connected to system ground.

Documented Code

Arduino Mega 2560 Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Note: The provided code is a template and does not contain any functional logic. It needs to be populated with the specific instructions to control the circuit components based on the desired application.