Fire Fighting Robot using Arduino Uno
In the event of a fire breakout, to rescue people and
to put out the fire we are forced to use human resources which are not safe.
With the advancement of technology especially in Robotics it is very much
possible to replace humans with robots for fighting the fire. This would
improve the efficiency of firefighters and would also prevent them from risking
human lives. Today we are going to build a Fire Fighting Robot using Arduino,
which will automatically sense the fire and start the water pump
List of Materials
Arduino UNO1X
5v DC motor 6X
Micro servo 9g 1X
Water Pump 1X
1way Flame sensor 4X
On/off Switch 1X
Mini breadboard 2X
Arduino Cables
3.7V battery 1X
3.7V battery holder 1X
lion 7.4 Volt battery 1X
Whool 6X
Motor dribar 2X
Spacer (M3 female-female 50mm) 8X
Screws (M3)
Water tank 1X
Water hose 1X
Specification of Materials
DC motors with encoder
The advantage of encoder DC motor over a simple DC
motor is the ability to compensate speeds when having more than one motor and
the same speed for all of them is desired. Generally, when you have more than
one motor with the same input (Voltage and current) and your target is to have
them exactly with the same speed, what might happen is that some motors might
slip which will cause a difference in speed between them which e.g. for our
case (two motors as driving power) could cause a deviation to one side when the
target was to go forward. what encoders do is to count the number of rotations
for both motors and in case of having a difference, compensate them. However
since when we have tested our robot, no difference was observed in the speed of
the two motors, we did not use the encoders.
Servo motors
For the water gun mechanism what
we needed was to have motors that can provide relatively precise motion in a
specific range. For what regards, there exist two choices : servo motor OR
stepper motor
generally a stepper motor is
cheaper than a servo motor.However, depend on the application, there are many
other factors that should be taken into account. For our project we have
considered the following factors:
1) The Power/mass ratio of servo
motor is higher than steppers, which means for having the same amount of power
the stepper is going to be heavier than the servo motor.
2) A servo motor consume less
energy than a stepper which is due to the fact that servomotor consumes power
as it rotates to the commanded position but then the servomotor rests. Stepper
motors continue to consume power to lock in and hold the commanded position.
3) Servo motors are more capable
of accelerating loads than steppers.
These
reasons will lead to less consumption of energy which was important in our case
since we used a Battery as the power supply for all motors.
In case that you are interested
to know more about differences between servo and stepper check the following
H-bridge
What it does is to make you
capable of controlling both direction and speed of your dc motors. In our case
we just used them to control the direction of rotation for both DC motors
(Connected to driving wheels).
In addition, another h-bridge is
used as a simple on/off switch for the pump. (This can be also done by means of
a transistor)
Flame sensors
Totally 4 flame sensors are used
. 3 sensors under the chassis are connected to both analogue and digital pins
of Arduino. The digital connections are used for detecting the fire for further
actions while the analogue connections are used only to provide readings of the
distance to fire for the user. The other sensor on the top is used digitally
and it's function is to send the command for stopping the vehicle at a suitable
distance from the fire, so in the moment that the sensor on the top which has
an specific angle detect the fire, it will send the command for stopping the
vehicle and starting the pump the water and running the water gun to put the
fire off.
Arduino uno
The arduino uno is a microcontroller. It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started. The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial
converter."Uno" means one in Italian and is named to mark the
upcoming release of Arduino 1.0. The Uno and version1.0 will be the reference
versions of Arduno, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform
Circuit Diagram
Program
#include <Servo.h>
Servo myservo;
int pos = 0;
int right = 0;
int left = 0;
int top = 0;
int off = 0;
void setup()
{
// put your setup code here, to run once:
pinMode (2,INPUT);
pinMode (3,INPUT);
pinMode (4,INPUT);
pinMode (5,OUTPUT);
pinMode (6,OUTPUT);
pinMode (7,OUTPUT);
pinMode (8,OUTPUT);
pinMode (9,OUTPUT);
pinMode (10,INPUT);
myservo.attach(11);
}
void loop() {
right = digitalRead (2);
left = digitalRead (3);
top = digitalRead (4);
off = digitalRead (10);
if (off ==HIGH)
{digitalWrite (9,HIGH);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
digitalWrite (7,LOW);
digitalWrite (8,LOW);
for (pos = 0; pos <= 180; pos += 3) {
myservo.write(pos); '
delay(15); }
for (pos = 180; pos >= 0; pos -= 3) { //
goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position
in variable 'pos'
delay(15); // waits 15ms for the
servo to reach the position
}
delay (2000);
digitalWrite (9,LOW);
}
else if(off==LOW)
{
if
((right==HIGH)&&(left==HIGH)&&(top==HIGH))
{
digitalWrite (5,HIGH);
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
digitalWrite (8,LOW);
}
if
((right==LOW)&&(left==HIGH)&&(top==HIGH))
{
digitalWrite (5,HIGH);
digitalWrite (6,LOW);
digitalWrite (7,LOW);
digitalWrite (8,HIGH);
}
if
((right==LOW)&&(left==HIGH)&&(top==LOW))
{
digitalWrite (5,HIGH);
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
digitalWrite (8,LOW);
}
if
((right==HIGH)&&(left==LOW)&&(top==HIGH))
{
digitalWrite (5,LOW);
digitalWrite (6,HIGH);
digitalWrite (7,HIGH);
digitalWrite (8,LOW);
}
if
((right==HIGH)&&(left==LOW)&&(top==LOW))
{
digitalWrite (5,HIGH);
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
digitalWrite (8,LOW);
}
if
((right==LOW)&&(left==LOW)&&(top==LOW))
{
digitalWrite (5,HIGH);
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
digitalWrite (8,LOW);
}
}}
Working
Steps
1. Make robot body.
2. Connecting All Motor and Wheel in
body .
3. Connecting All component Follow the
Circuit .
4. All connection complete then Arduino
connect to pc .
5. Writing program
6. Upload program to arduino .
7. Disconnect arduino in pc
8. Then Power to circuit and
arduino
কোন মন্তব্য নেই