This repository contains the source code for a flame detection and robotic motion control system built using Arduino. The system integrates DC motors, a servo motor, flame sensors, and a temperature sensor to detect flames and respond appropriately with motorized actions and a relay-controlled actuator.
Flame Detection: Utilizes three flame sensors and a temperature sensor to detect fire or high temperatures.
Smooth Motor Control: Provides acceleration and deceleration for DC motors for smooth movement.
Servo Swivel Action: Swivels a servo motor to simulate a spraying mechanism or other actuating response.
Relay Control: Activates a relay for further operations, such as triggering an extinguisher.
Forward Movement: Moves the robot forward until a flame is detected.
Interactive Debugging: Prints system status and sensor readings to the serial monitor.
- Microcontroller: Arduino board (compatible with the AFMotor library).
- Motor Driver: Adafruit Motor Shield.
- DC Motors: Four motors for robot movement.
- Servo Motor: Controlled swivel action for spraying.
- Flame Sensors: Three sensors for flame detection.
- Temperature Sensor: For additional flame detection criteria.
- Relay Module: To control external devices, such as extinguishers.
Step 1: Initialization
- Sets up pins, motor speeds, and servo positions.
- Configures flame sensors with internal pull-up resistors.
Step 2: Loop
- Continuously monitors flame sensors and the temperature sensor.
- Moves forward if no flame is detected.
- Stops, activates the relay, and performs a servo swivel action when a flame is detected.
Step 3: Motor Acceleration/Deceleration
- Gradually changes motor speeds to ensure smooth transitions.
Step 4: Servo Swivel Action
- Moves the servo in a predefined pattern (0° to 180° and back).