Arduino UNO-Based GPS and GSM-Enabled Vibration Sensor System with Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components including a Sim800l GSM module, a Neo 6M GPS module, an Arduino UNO, an Adafruit ADXL345 accelerometer, an SW-420 vibration sensor, a 5V battery, a motor driver, two DC motors, a 2-pin push switch, and a buzzer. The Arduino UNO serves as the central microcontroller, interfacing with the other components to perform tasks such as GPS data acquisition, vibration sensing, motor control, and GSM communication.
Component List
Sim800l
- Description: GSM module for communication over cellular networks.
- Pins: NET, RST, VCC, RXD, TXD, GND
Neo 6M GPS Module
- Description: GPS module for acquiring location data.
- Pins: GND, TX, RX, VCC
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Adafruit ADXL345
- Description: Accelerometer for measuring acceleration in three axes.
- Pins: VIN, 3.3V, GND, CS, INT1, INT2, SDO/ADDR, SDA/SDIO, SCL
SW-420 Vibration Sensor
- Description: Sensor for detecting vibrations.
- Pins: vcc, Ground, Digital output
5V Battery
- Description: Power source for the circuit.
- Pins: +, -
Motor Driver
- Description: Driver for controlling DC motors.
- Pins: pin 1, pin2, pin3, pin4, pin5, pin6, pin7, pin8, pin9, pin10, pin11, pin12, pin13, pin14, pin15, pin16
DC Motor
- Description: Motor for mechanical movement.
- Pins: pin 1, pin 2
2Pin Push Switch
- Description: Switch for user input.
- Pins: Input +, Output +
Buzzer
- Description: Audio signaling device.
- Pins: PIN, GND
Wiring Details
Sim800l
- VCC: Connected to 5V (Arduino UNO, 5V Battery, Neo 6M GPS Module, 2Pin Push Switch, Motor Driver, Adafruit ADXL345, SW-420 Vibration Sensor)
- RXD: Connected to D1 (Arduino UNO)
- TXD: Connected to D0 (Arduino UNO)
- GND: Connected to GND (Arduino UNO, Neo 6M GPS Module, Adafruit ADXL345, SW-420 Vibration Sensor, Buzzer, Motor Driver)
Neo 6M GPS Module
- VCC: Connected to 5V (Arduino UNO, 5V Battery, Sim800l, 2Pin Push Switch, Motor Driver, Adafruit ADXL345, SW-420 Vibration Sensor)
- TX: Connected to D2 (Arduino UNO)
- RX: Connected to D3 (Arduino UNO)
- GND: Connected to GND (Arduino UNO, Sim800l, Adafruit ADXL345, SW-420 Vibration Sensor, Buzzer, Motor Driver)
Arduino UNO
- 5V: Connected to VCC (Neo 6M GPS Module, Sim800l, 5V Battery, 2Pin Push Switch, Motor Driver, Adafruit ADXL345, SW-420 Vibration Sensor)
- GND: Connected to GND (Neo 6M GPS Module, Sim800l, Adafruit ADXL345, SW-420 Vibration Sensor, Buzzer, Motor Driver, 5V Battery)
- D1: Connected to RXD (Sim800l)
- D0: Connected to TXD (Sim800l)
- D2: Connected to TX (Neo 6M GPS Module)
- D3: Connected to RX (Neo 6M GPS Module)
- A4: Connected to SDA/SDIO (Adafruit ADXL345)
- A5: Connected to SCL (Adafruit ADXL345)
- D10: Connected to Output + (2Pin Push Switch)
- D9: Connected to pin11 (Motor Driver)
- D8: Connected to pin10 (Motor Driver)
- D7: Connected to pin8 (Motor Driver)
- D6: Connected to pin7 (Motor Driver)
- D5: Connected to PIN (Buzzer)
- D4: Connected to Digital output (SW-420 Vibration Sensor)
Adafruit ADXL345
- VIN: Connected to 5V (Arduino UNO, 5V Battery, Neo 6M GPS Module, Sim800l, 2Pin Push Switch, Motor Driver, SW-420 Vibration Sensor)
- GND: Connected to GND (Arduino UNO, Neo 6M GPS Module, Sim800l, SW-420 Vibration Sensor, Buzzer, Motor Driver)
- SDA/SDIO: Connected to A4 (Arduino UNO)
- SCL: Connected to A5 (Arduino UNO)
SW-420 Vibration Sensor
- vcc: Connected to 5V (Arduino UNO, 5V Battery, Neo 6M GPS Module, Sim800l, 2Pin Push Switch, Motor Driver, Adafruit ADXL345)
- Ground: Connected to GND (Arduino UNO, Neo 6M GPS Module, Sim800l, Adafruit ADXL345, Buzzer, Motor Driver)
- Digital output: Connected to D4 (Arduino UNO)
5V Battery
- +: Connected to 5V (Arduino UNO, Neo 6M GPS Module, Sim800l, 2Pin Push Switch, Motor Driver, Adafruit ADXL345, SW-420 Vibration Sensor)
- -: Connected to GND (Arduino UNO)
Motor Driver
- pin 1: Connected to 5V (Arduino UNO, 5V Battery, Neo 6M GPS Module, Sim800l, 2Pin Push Switch, Adafruit ADXL345, SW-420 Vibration Sensor)
- pin2: Connected to GND (Arduino UNO, Neo 6M GPS Module, Sim800l, Adafruit ADXL345, SW-420 Vibration Sensor, Buzzer)
- pin3: Connected to pin 1 (DC Motor)
- pin6: Connected to pin 2 (DC Motor)
- pin7: Connected to D6 (Arduino UNO)
- pin8: Connected to D7 (Arduino UNO)
- pin10: Connected to D8 (Arduino UNO)
- pin11: Connected to D9 (Arduino UNO)
- pin13: Connected to pin 2 (DC Motor)
- pin14: Connected to pin 1 (DC Motor)
DC Motor
- pin 1: Connected to pin3 (Motor Driver)
- pin 2: Connected to pin6 (Motor Driver)
DC Motor
- pin 1: Connected to pin14 (Motor Driver)
- pin 2: Connected to pin13 (Motor Driver)
2Pin Push Switch
- Input +: Connected to 5V (Arduino UNO, 5V Battery, Neo 6M GPS Module, Sim800l, Motor Driver, Adafruit ADXL345, SW-420 Vibration Sensor)
- Output +: Connected to D10 (Arduino UNO)
Buzzer
- PIN: Connected to D5 (Arduino UNO)
- GND: Connected to GND (Arduino UNO, Neo 6M GPS Module, Sim800l, Adafruit ADXL345, SW-420 Vibration Sensor, Motor Driver)
Documented Code
void setup() {
// تهيئة الاتصال التسلسلي
Serial.begin(9600);
// تهيئة الدبابيس
pinMode(1, OUTPUT); // RXD في Sim800l
pinMode(0, INPUT); // TXD في Sim800l
pinMode(2, INPUT); // TX في GPS
pinMode(3, OUTPUT); // RX في GPS
pinMode(4, INPUT); // مستشعر الاهتزاز
pinMode(5, OUTPUT); // الجرس
pinMode(6, OUTPUT); // محرك السائق
pinMode(7, OUTPUT); // محرك السائق
pinMode(8, OUTPUT); // محرك السائق
pinMode(9, OUTPUT); // محرك السائق
pinMode(10, INPUT); // مفتاح الضغط
}
void loop() {
// مثال: قراءة من GPS وإرسال عبر Sim800l
if (Serial.available() > 0) {
String gpsData = Serial.readString();
Serial.println(gpsData); // إرسال البيانات إلى Sim800l
}
// مثال: التحقق من مستشعر الاهت