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

Arduino UNO Fire and Gas Detecting Robot with SIM800L SMS and Call Alerts

View and Edit Project In Cirkit DesignerImage of Arduino UNO Fire and Gas Detecting Robot with SIM800L SMS and Call Alerts

Fire and Gas Detecting Robot with Call and SMS Alert

Summary

This project involves a fire and gas detecting robot that uses various sensors to detect hazards. Upon detection, it sends an SMS and makes a call using the SIM800L module. The robot also controls motors for movement and activates a water pump via a relay in case of fire. The system is controlled by an Arduino UNO microcontroller.

Component List

  1. Motor with reducer

    • Pins: 3 - 6 VCC, GND
    • Description: Motor with a built-in reducer for controlled speed.
  2. Motor amarillo motorreductor hobby

    • Pins: vcc, GND
    • Description: Hobby motor with a built-in reducer.
  3. 5V Battery

    • Pins: positive, negative
    • Description: Power source for the circuit.
  4. 5V Mini Water Pump

    • Pins: positive pin, negative pin
    • Description: Water pump activated in case of fire.
  5. 1 Channel 5V Relay Module

    • Pins: VCC+, VCC- (GND), IN, N.O., COM, N.C.
    • Description: Relay module to control the water pump.
  6. 7.4V Battery

    • Pins: +, -
    • Description: Additional power source for the circuit.
  7. SIM800L

    • Pins: NFT, RING, VCC, DTR, RST, MIC +, RXD, MIC-, TXD, SPK+, GND, SPK-
    • Description: GSM module for sending SMS and making calls.
  8. Arduino UNO

    • 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
    • Description: Microcontroller to control the entire system.
  9. L293 Motor Driver

    • Pins: A1, A2, EN_A, VCC, GND, EN_B, B2, B1, MA 2, MA1, -V, +V, MB1, MB2
    • Description: Motor driver to control the motors.
  10. KY-026 Flame Sensor

    • Pins: AO, GND, VCC, DO
    • Description: Sensor to detect flames.
  11. Buck Converter

    • Pins: IN+, IN-, OUT+, OUT-
    • Description: Voltage regulator to step down voltage.
  12. MQ-2

    • Pins: GND, VCC, ANALOG, Digital
    • Description: Gas sensor to detect gas leaks.
  13. Micro Servo 9G

    • Pins: GND, +5V, PWM
    • Description: Servo motor for additional mechanical control.

Wiring Details

Motor with reducer

Motor amarillo motorreductor hobby

5V Battery

5V Mini Water Pump

1 Channel 5V Relay Module

7.4V Battery

SIM800L

Arduino UNO

L293 Motor Driver

KY-026 Flame Sensor

Buck Converter

MQ-2

Micro Servo 9G

Code Documentation

/*
 * Fire and Gas Detecting Robot with Call and SMS Alert
 *
 * This code integrates fire and gas sensors to detect hazards. Upon detection,
 * it sends an SMS and makes a call using the SIM800L module. It also controls
 * motors for movement and activates a water pump via a relay in case of fire.
 */

#include <Servo.h>

// Pin definitions
const int flameSensor1Pin = 4;
const int flameSensor2Pin = 5;
const int flameSensor3Pin = 6;
const int gasSensorPin = 7;
const int relayPin = 12;
const int motorA1Pin = 8;
const int motorA2Pin = 9;
const int motorB1Pin = 10;
const int motorB2Pin = 11;
const int servoPin = 13;
const int sim800lRxPin = 2;
const int sim800lTxPin = 3;

Servo myservo;

void setup() {
  // Initialize serial communication
  Serial.begin(9600);

  // Initialize pins
  pinMode(flameSensor1Pin, INPUT);
  pinMode(flameSensor2Pin, INPUT);
  pinMode(flameSensor3Pin, INPUT);
  pinMode(gasSensorPin, INPUT);
  pinMode(relayPin, OUTPUT);
  pinMode(motorA1Pin, OUTPUT);
  pinMode(motorA2Pin, OUTPUT);
  pinMode(motorB1Pin, OUTPUT);