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

Arduino Mega 2560-Based Multi-Sensor Vehicle Tracker with GSM and GPS

Image of Arduino Mega 2560-Based Multi-Sensor Vehicle Tracker with GSM and GPS

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to interface various sensors and modules with an Arduino Mega 2560 microcontroller. The circuit includes components for sensing alcohol levels (MQ-3 Breakout), displaying information (16X2 LCD), communication (Sim800l), GPS tracking (GPS NEO-6M V2), motor control (l293d), temperature sensing (LM35), user input (Potentiometer), and vibration detection (SW-420 Vibration Sensor). A 9V battery powers the system.

Component List

Arduino Mega 2560

  • Microcontroller board based on the ATmega2560
  • Provides 54 digital I/O pins and 16 analog inputs

MQ-3 Breakout

  • Alcohol gas sensor module
  • Provides both analog and digital outputs

16X2 LCD

  • Alphanumeric Liquid Crystal Display
  • Displays 2 lines of 16 characters

Sim800l

  • GSM/GPRS module
  • Enables cellular communication for the circuit

GPS NEO-6M V2

  • GPS module
  • Provides location data to the circuit

l293d

  • Motor driver IC
  • Controls up to two DC motors

Temperature Sensor (LM35)

  • Precision centigrade temperature sensor
  • Provides analog output proportional to temperature

Potentiometer

  • Variable resistor
  • Provides analog input to adjust LCD contrast

Motor and Wheels

  • DC motor with attached wheels
  • Provides motion to the system

9V Battery

  • Power source for the circuit

SW-420 Vibration Sensor

  • Vibration detection module
  • Provides digital output upon detecting vibration

Wiring Details

Arduino Mega 2560

  • 5V connected to VCC of various components for power
  • GND connected to GND of various components for common ground
  • VIN connected to the positive terminal of the 9V Battery
  • A0 connected to analog outputs of MQ-3 Breakout and LM35
  • D19/RX1 connected to TX of GPS NEO-6M V2 and TXD of Sim800l
  • D18/TX1 connected to RX of GPS NEO-6M V2 and RXD of Sim800l
  • D0 RX0 connected to digital output of MQ-3 Breakout
  • D2 PWM to D7 PWM connected to data pins D7 to D4 of 16X2 LCD
  • D10 PWM connected to Enable 1,2 of l293d
  • D9 PWM connected to Input 1 of l293d
  • D8 PWM connected to digital output of SW-420 Vibration Sensor
  • D7 PWM connected to Input 2 of l293d
  • D11 PWM connected to E of 16X2 LCD
  • D12 PWM connected to RS of 16X2 LCD

MQ-3 Breakout

  • VCC and GND for power supply
  • AO connected to A0 of Arduino Mega 2560 for analog output
  • DO connected to D0 RX0 of Arduino Mega 2560 for digital output

16X2 LCD

  • VDD and VSS for power supply and ground
  • V0 connected to output of Potentiometer for contrast adjustment
  • RS, E, D4 to D7 connected to D12 PWM to D5 PWM of Arduino Mega 2560 for data/command interface
  • A and K for backlight anode and cathode

Sim800l

  • VCC and GND for power supply
  • TXD connected to D19/RX1 of Arduino Mega 2560 for transmitting data
  • RXD connected to D18/TX1 of Arduino Mega 2560 for receiving data

GPS NEO-6M V2

  • VCC and GND for power supply
  • TX connected to D19/RX1 of Arduino Mega 2560 for transmitting data
  • RX connected to D18/TX1 of Arduino Mega 2560 for receiving data

l293d

  • Vcc1 and GND for logic power supply and ground
  • Input 1 and Input 2 connected to D9 PWM and D7 PWM of Arduino Mega 2560 for motor control signals
  • Enable 1,2 connected to D10 PWM of Arduino Mega 2560 for enabling motor driver channels
  • Output 1 and Output 2 connected to vcc and GND of Motor and Wheels for motor output

Temperature Sensor (LM35)

  • +Vs and GND for power supply
  • Vout connected to A0 of Arduino Mega 2560 for temperature reading

Potentiometer

  • VCC and GND for power supply
  • Output connected to V0 of 16X2 LCD for contrast control

Motor and Wheels

  • vcc and GND connected to Output 1 and Output 2 of l293d for receiving motor power

SW-420 Vibration Sensor

  • vcc and Ground for power supply
  • Digital output connected to D8 PWM of Arduino Mega 2560 for vibration detection

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:

}

This code template provides the basic structure for the Arduino sketch. The setup() function is called once when the program starts and is used to initialize settings. The loop() function runs continuously after setup() has finished and is where the main logic of the program will be implemented.