Arduino Mega 2560 Controlled Fire Detection Robot with Bluetooth Interface and Water Pump Activation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface an Arduino Mega 2560 with various sensors, actuators, and modules to perform a range of functions. The circuit includes flame sensors for detection purposes, a Bluetooth module for wireless communication, a motor driver to control gearmotors, a relay to switch a water pump, and a battery to provide power. The Arduino Mega 2560 serves as the central processing unit, running the embedded code to manage inputs and outputs based on the sensor data and wireless commands.
Component List
Arduino Mega 2560
- Microcontroller board based on the ATmega2560
- It has 54 digital input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
L298N DC Motor Driver
- Module for controlling up to two DC motors with a maximum current of 2A per channel.
- It can also be used to control the direction of the motors.
Hobby Gearmotor with 48:1 Gearbox (4 units)
- A DC motor with a gearbox for increased torque.
- Typically used in robotics and DIY projects where controlled movement is required.
Mini Diaphragm Water Pump
- A small pump used for moving water or other fluids.
- It is controlled by the relay in this circuit.
HC-05 Bluetooth Module
- A wireless communication module that allows for serial communication via Bluetooth.
- It can be used to send and receive data from a smartphone or computer.
KY-026 Flame Sensor (12 units)
- A sensor that can detect fire or other sources of heat.
- The circuit uses multiple flame sensors for comprehensive fire detection.
Battery 12V
- A 12V battery that provides power to the motor driver and indirectly to the motors and the water pump.
Two Channel Relay 5V
- An electromechanical switch that allows for controlling high power devices with low power signals.
- In this circuit, it is used to control the water pump.
Wiring Details
Arduino Mega 2560
VINconnected to L298N DC motor driver5VGNDconnected to the common ground net- Digital pins
D3 PWM,D4 PWM,D5 PWM,D6 PWM,D7 PWM,D52,D50,D48,D46,D44,D30,D28,D26,D24,D22,D53connected to various components for control signals - Analog pin
A5connected to KY-026 Flame SensorA0 - Serial pins
D19/RX1,D18/TX1connected to HC-05 Bluetooth ModuleTXD,RXD
L298N DC Motor Driver
OUT1,OUT2,OUT3,OUT4connected to Hobby Gearmotors12Vconnected to Battery 12V+GNDconnected to the common ground net5Vconnected to Arduino Mega 2560VININ1,IN2,IN3,IN4connected to Arduino Mega 2560 digital pins for motor controlENA,ENBconnected to jumper settings for enabling motor outputs
Hobby Gearmotors
- Two pins connected to L298N DC motor driver outputs
Mini Diaphragm Water Pump
Positive (+)connected to Two Channel Relay 5VNC2Negative (-)connected to the common ground net
HC-05 Bluetooth Module
VCCconnected to common VCC netGNDconnected to the common ground netTXDconnected to Arduino Mega 2560D19/RX1RXDconnected to Arduino Mega 2560D18/TX1
KY-026 Flame Sensors
VCCconnected to common VCC netGNDconnected to the common ground netA0of one sensor connected to Arduino Mega 2560A5D0of each sensor connected to individual digital pins on Arduino Mega 2560
Battery 12V
+connected to L298N DC motor driver12V-connected to the common ground net
Two Channel Relay 5V
VCCconnected to common VCC netGNDconnected to the common ground netIN2connected to Arduino Mega 2560D3 PWMNC2connected to Mini Diaphragm Water PumpPositive (+)
Documented Code
Arduino Mega 2560 - sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino Mega 2560 - documentation.txt
(No additional documentation provided for the code)
(Note: The code provided is a template and does not contain any functional logic. It will need to be populated with the actual code to control the components based on the requirements of the circuit's application.)