Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Based Alcohol Detection System with GPS and GSM Module

View and Edit Project In Cirkit DesignerImage of Arduino-Based Alcohol Detection System with GPS and GSM Module

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to monitor alcohol levels and send GPS coordinates via SMS if the alcohol level exceeds a certain threshold. The circuit includes various components such as an Arduino UNO, a buzzer, an LED, an MQ-3 alcohol sensor, a SIM800L GSM module, a Neo 6M GPS module, a 3.7V battery, a rocker switch, a motor driver, motors with wheels, and an LCD display. The Arduino UNO serves as the central microcontroller, interfacing with all other components.

Component List

  1. 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, +, -
  2. Buzzer

    • Description: An audio signaling device.
    • Pins: PIN, GND
  3. LED: Two Pin (red)

    • Description: A red light-emitting diode.
    • Pins: cathode, anode
  4. MQ-3 Breakout

    • Description: Alcohol sensor module.
    • Pins: VCC, GND, DO, AO
  5. 3.7V Battery

    • Description: Power source.
    • Pins: +, -
  6. Rocker Switch (SPST)

    • Description: Single Pole Single Throw switch.
    • Pins: 1, 2
  7. SIM800L

    • Description: GSM/GPRS module.
    • Pins: NFT, RING, VCC, DTR, RST, MIC +, RXD, MIC-, TXD, SPK+, GND, SPK-
  8. Neo 6M GPS Module

    • Description: GPS module.
    • Pins: GND, TX, RX, VCC
  9. Motor and Wheels

    • Description: Motor with attached wheels.
    • Pins: vcc, GND
  10. LCD 16x2 (Wokwi Compatible)

    • Description: 16x2 character LCD display.
    • Pins: VSS, VDD, V0, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, A, K
  11. 5k Preset

    • Description: Variable resistor.
    • Pins: fixed end 1, fixed end 2, variable end
  12. L293D Motor Driver

    • Description: Motor driver IC.
    • Pins: gnd, 9/12 volts, 5volts, motor input 1, motor input 2, +v1, -v1, +v2, -v2

Wiring Details

Arduino UNO

Buzzer

LED: Two Pin (red)

MQ-3 Breakout

3.7V Battery

Rocker Switch (SPST)

SIM800L

Neo 6M GPS Module

Motor and Wheels

LCD 16x2 (Wokwi Compatible)

5k Preset

L293D Motor Driver

Documented Code

#include <SoftwareSerial.h>
SoftwareSerial sim(8, 9);
#include <TinyGPS++.h>
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
float lattitude, longitude;
SoftwareSerial gpsSerial(0, 1); //rx,tx
TinyGPSPlus gps; // create gps object

int value; //variable to hold the value of alcohol

#define motor 10
#define buzzer 13
#define led 7

String number = "+919889342918"; //-> change with your number
int a;

void setup() 
{ 
  pinMode(motor, OUTPUT);
  pinMode(buzzer, OUTPUT);
  pinMode(led, OUTPUT);
  a = 700;
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.setCursor(0, 0);
  lcd.print("    Subscribe");
  lcd.setCursor(0, 1);
  lcd.print(" AEROTECH INDIA");
  sim.begin(9600);
  gpsSerial.begin(9600); // connect gps sensor
  delay(6000);
  lcd.clear();
}

void loop() 
{
  value = analogRead(A0); //reading value from arduino analog pin which is receiving value from sensor pin
  lcd.setCursor(0, 0);    // setting