lokeshpurulia
Published © GPL3+

Fire alarm system by taking temperature value from DHT11 sen

A fire alarm system is Developed Using Arduino Uno and Temperature Sensor(DHT11). The System Consists Three LED's and a Buzzer for alarm.

BeginnerWork in progress3,634
Fire alarm system by taking temperature value from DHT11 sen

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
5 mm LED: Green
5 mm LED: Green
×1
5 mm LED: Yellow
5 mm LED: Yellow
×1
5 mm LED: Red
5 mm LED: Red
×1
Breadboard (generic)
Breadboard (generic)
×1
Buzzer
Buzzer
×1

Software apps and online services

Arduino IDE
Arduino IDE
Windows 10
Microsoft Windows 10

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering
Plier, Long Nose
Plier, Long Nose
Premium Male/Male Jumper Wires, 40 x 3" (75mm)
Premium Male/Male Jumper Wires, 40 x 3" (75mm)

Story

Read more

Code

FU6X0TMIOLRB0HR.ino

Arduino
int Buzz=A1;
#include <DHT.h>

#include "DHT.h"

#define DHTPIN A0     // what pin we're connected to

#define DHTTYPE DHT11   // DHT 11


DHT dht(DHTPIN, DHTTYPE);

void setup()
{
  Serial.begin(9600);
  for (int DigitalPin = 7; DigitalPin <= 9; DigitalPin++) 
 {
  pinMode(DigitalPin, OUTPUT);
  pinMode(Buzz,OUTPUT);
 }
  
dht.begin();
}
 
void loop()
{
  delay(1000);
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
 // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  
  if (t<=22)
  {
  digitalWrite(7, HIGH);
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
  digitalWrite (Buzz,LOW);
  }
  else if (t>22)
  {
  digitalWrite(8, HIGH);
  digitalWrite(7, LOW);
  digitalWrite(9, LOW);
  }
  else if (t>=35)
  {
  digitalWrite(9, HIGH);
  digitalWrite(7, LOW);
  digitalWrite(8, LOW);
  digitalWrite(Buzz,HIGH);
  } 
  
}

 

Credits

lokeshpurulia
2 projects • 9 followers
Contact

Comments

Please log in or sign up to comment.