sonuvazarkarshreyashvazarkar7e12702
Created August 25, 2020

Since 2020

Crowd Control with Automatic Sanitizer Dispenser and Temprature Sensing.

Since 2020

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
Our Hero
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Infrared Module (Generic)
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
1N4007 – High Voltage, High Current Rated Diode
1N4007 – High Voltage, High Current Rated Diode
×1
General Purpose Transistor NPN
General Purpose Transistor NPN
×1
DC Motor, 12 V
DC Motor, 12 V
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
×1
Breadboard (generic)
Breadboard (generic)
×2
Jumper wires (generic)
Jumper wires (generic)
×1
Temperature Sensor
Temperature Sensor
LM35
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

"Since 2020"

Automatic Sanitiser Dispenser and Temprature Sensing with Crowd Control

Code

"Since 2020-The Code"

C/C++
Just Assemble the hardware and place the code. And we are good to go.
// Since 2020 //                                                                                                                                                                             
//This project will prevent crowd in places like shops, temples etc//


#include <LiquidCrystal.h>                                                                                                                                                          
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int ir=9;
int sensor;

//water pump
int motor= 10; 

//temprature
int value;
float celsius;   
const int lm= A1;                                                                                                                                           

//counter senosr
int trig=7;
int echo=8;
long duration;
int distance;

int count = 0;

void setup()
{
Serial.begin(9600);

pinMode(ir,INPUT);
pinMode(motor,OUTPUT);
pinMode(13,OUTPUT);  //inbuild led of arduino\\
pinMode(trig,OUTPUT);
  pinMode(echo,INPUT);                                                                   
Serial.println("Welcome!");   

lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Welcome!");

}

void loop()
{

//count
digitalWrite(trig,LOW);
delay(2);
digitalWrite(trig,HIGH);
delay(10);
digitalWrite(trig,LOW);

sensor = digitalRead(ir);
if(sensor == 0)
 {
 value = analogRead(lm);
 celsius = (value / 2.048); // Getting the temperature from the sensor

 lcd.clear();
 lcd.noCursor();
 lcd.setCursor(0,0);
 lcd.print("Hello!");
 Serial.println("नमस्कार");
 
 digitalWrite(motor,1);
 delay(1000);
 digitalWrite(motor,0);
 delay(1000);  
 
 if(celsius <= 40 && celsius >= 27)
{ 
 lcd.clear();
 lcd.noCursor();
 lcd.setCursor(0,1);
 lcd.print(celsius);
 Serial.println(celsius);
 Serial.println("you are safe");
 digitalWrite(13,LOW);
 lcd.setCursor(0,0);
 lcd.print("You are Safe!");
 delay(500);
}
else
{
 digitalWrite(motor,0);
 delay(1000);
 Serial.println(celsius);
 lcd.clear();
 lcd.noCursor();
 lcd.setCursor(0,1);
 lcd.print(celsius);
 lcd.setCursor(0,0);
 lcd.print("Stay Home");
 digitalWrite(13,HIGH);
 delay(2000);
 digitalWrite(13,LOW);
}

 
 Serial.println("घर पर रहिए");

 
}

//counting
if(duration=pulseIn(echo,HIGH))
{
distance=(duration*0.034/2);
if(distance<=40)
 {
 if(count<= 3 )  //can be set upto user limit
 {
    count++; 
    Serial.println(count);
    lcd.clear();
    lcd.noCursor();
    lcd.setCursor(0,0);
    lcd.print(count);
    delay(2000);
    
 }
  else if(count >= 2)
 {
 digitalWrite(13,HIGH);
 delay(1000);
 lcd.clear();
 lcd.noCursor();
 lcd.setCursor(0,0);
 lcd.print("Please Wait!");
 delay(2000);
  
 } 
 }
}}

Credits

sonuvazarkar

sonuvazarkar

2 projects • 1 follower
shreyashvazarkar7e12702

shreyashvazarkar7e12702

2 projects • 1 follower

Comments