Automatic Hand Sanitizer Using Arduino-Redo
Automatic Hand Sanitizer Using Arduino-Redo
ARDUINO
Project report
B Tech
PRESIDENCY UNIVERSITY
Carried out at
Presidency University
Bengaluru
By
ANJALI 20181CSE0058
AMOGHA 20181CSE0052
ANAND 20181CSE0054
AMEGHANA 20181CSE0005
YAMUNA THEJA 20181CSE0003
MOHAMMED MUTTANA 20181CSE0001
This is to certify that the project entitled “Automatic Hand sanitizer using Arduino” has
been successfully completed by ANJALI M, ANAND, AMOGHA,
Guide:
Group Members
ANJALI 20181CSE0058
AMOGHA 20181CSE0052
ANAND 20181CSE0054
AMEGHANA 20181CSE0005
YAMUNA THEJA 20181CSE0003
MOHAMMMED MUTTA 20181CSE0001
Acknowledgement
When a person's hand comes below the sanitizer and obstructs the sensor
line-of-sight, the Arduino board receives a low distance reading and instructs
the servo motor to actuate and dispense the sanitizer.
ABSTRACT
Hand sanitizer dispensing machine is automated, Non contact, Alcohol based hand
sanitizer dispenser, which find it’s used in hospital, workplace, office, dispenser, which finds
It’s use in hospitals, work places, offices, schools and much more. Alcohol is basically a
solvent, and also a very good disinfectant when compared to liquid soap or solid soap, also
it does not need water to wash off since it is volatile and vaporizes instantly after
application to hands. It is also proven that a concentration of >70% alcohol can kill
Coronavirus in hands. Here, an ultrasonic sensor senses the hand placed near it, the Arduino
uno is used as a microcontroller, which senses the distance and the result is the pump
running to pump out the hand sanitizer. The IR Sensor is the photodiode used for sensing
the human hand detection and it is used to control the motor pump from the liquid. The
motor is connected to an RC timer delay setup and the pipe connected to a reducer are used
to control the flowing liquid of the sanitizer. It has three modes of Control LED’s in the
system, White LED is used for the user to understand that the setup is in working mode and
battery is in use.
Demand for hand sanitizers has surged since the coronavirus broke out and spread around
the world. Hand sanitizers are usually applied by squirting the sanitizer liquid when one
presses a pump with one’s hand. This causes many people to come into contact with the
pump handle, which increases the risk of viral transmission. Some hand sanitizers on the
market are automatically pumped. However, because sanitizer containers and pump devices
are designed to be compatible only between products produced by the same manufacturer,
consumers must also repurchase the container for the liquid if they replace the hand
sanitizer. Therefore, this paper suggests the design of an automatic hand sanitizer system
compatible with various sanitizer containers.
Some hand sanitizers on the market are automatically pumped. However, because sanitizer
containers and pump devices are designed to be compatible only between products
produced by the same manufacturer, consumers must also repurchase the container for the
liquid if they replace the hand sanitizer. It is not economical and it has a negative impact on
the environment by increasing waste emissions. In addition, some users may think that it is
a hassle to buy a hand sanitizer-containing device-compatible again, so they pour other
hand sanitizers into previously used containers and reuse them. However, sanitizers that
come directly into contact with the human body are classified as medicines or non-medical
products, and they are safest to use in original containers.
➢TABLE OF CONTENTS:-
➢ Acknowledgement
➢ ABSTRACT:-
➢ Components required :-
1. Arduino Uno
2. Ultrasonic Sensor HC-SR04
3. Jumper Cables
4. Servo Motor
5. Breadboard
➢ 1.ARUDUINO UNO:-
3. Jumper Cables:-
➢ 4. Servo Motor:-
Servo motors have three wires: power, ground, and signal. The power
wire is typically red, and should be connected to the 5V pin on the Arduino board.
A Servo Motor is a small device that has an output shaft. This shaft can be positioned
to specific angular positions by sending the servo a coded signal. As long as the coded
signal exists on the input line, the servo will maintain the angular position of the shaft.
Let’s get into some more technical bits for a moment: a servo motor is the most
common position-controlled actuator. It works on the conventional servo-mechanism
principle, where a rotary potentiometer measures the position of the shaft based on the
varying resistance and feeds it to a comparator. The comparator computes the difference
between the reference position value from the controller against the actual position and
sends the amplified error signal to the motor. The error amplification is usually a PID loop.
➢ 5. Breadboard :-
#include<Servo.h>
#define echoPin 4
#define trigPin 5
Servo Myservo;
void loop()
{
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
duration=pulseIn(echoPin,HIGH);
distance=(duration*0.034/2);
if(distance<=60){
Myservo.write(180);
}
else {
Myservo.write(0);
}
delay(2500);
}
➢ Code explanation :-
#include<Servo.h>
#define echoPin 4
#define trigPin 5
Servo Myservo;
We need to declare two variables. First one is "duration". This is for store
the total travel time of sound wave. And other is "distance", for store the
calulated distance.
Step - 2
First set the attach pin of servo motor by Servo.attach() on the digital pin
3. Then set the echoPin as "INPUT" and trigPin as "OUTPUT" by using the
keyword pinMode().
void setup(){
Myservo.attach(3);
pinMode(echoPin,INPUT);
pinMode(trigPin,OUTPUT);
}
Now we need to write the servo motor to 180 degree only when the
distance is less than or equal to 5 cm. Else the servo position keep in 0
degree.
if(distance<=5){
Myservo.write(180);
}
else {
Myservo.write(0);
}
Then add a delay instruction for wait 500 millisecond for the next read.
delay(500);
The coding part is completed. You can get the complete code in attachment
section.
Step - 4
There is only one 5V female Header available in Arduino Uno. So, We need
to Joint three male to male jumber wire connect together. After that one
end of this jumber wire connect to Arduino board and other to Vcc of the
Servo Motor and Vcc of the HC-SR 05. There are two GND connects
available in Arduino Uno. So connect the one GND to GND of Servo motor
and other GND connect to GND of HC-SR 05. The electronic connection is
completed.
CIRCUIT DIAGRAM
SCHEMATIC REPRESENTATION
➢ WORKING
➢ APPLICATIONS :-
CONCLUSION :-
This is a one-day build that you can try at home and works
equally well in any commercial setting, but it also has obvious real-world
implications for people looking to combine their passion for Maker work
with more at-home sanitization during a pandemic! If you adjust the
height of the servo mounting appropriately, any off-the-shelf sanitizer
bottle can be put into use.