How to make automatic hand sanitizer
Hey guys , welcome back to the techa tronic . in this project we will make automatic hand sanitizer using Arduino and Ultrasonic sensor. as we at this time we need the sanitizer everywhere at home, offices, travel vehicles, etc. So we are making a machine like which can automatically sanitize your hand when you put your hand in front of the machine. As we all know in this extreme time of Covid-19 it may be useful for all. which would auto be able to automatic hand sanitize till your hand below the machine?
we are making one more precise and different automatic hand sanitizer. which can assist you with giving the time for hand sanitizing. a significant number of the individuals additionally making different undertakings to help in this circumstance we did likewise something that can be useful. We made it with the Arduino, water pump, and the ultrasonic. there is just 1 sensor that recognizes the individual and gives the sanitizer to that individual. so this is extremely simple and easy to make. along these lines, when you will begin the task you will naturally feel how it is simple as our more project like an automatic soap dispenser. Presently, we are going to impart to you how can it work in the following section.
How does it work?
In this paragraph, we will talk about how does the automatic hand sanitizer works. so you need to put your hand in front of the sanitizer machine only and the sanitizer machine will give you the sanitizer in your hand till your hand present at the same location. there is an ultrasonic sensor in the machine which detects your presence there. the ultrasonic sensor has two terminal one is a transmitter and another is a receiver. the transmitter transmits the ultrasonic waves and the receiver receives the signal when it comes back and then it will calculate the distance of the object by the ultrasonic sensor distance calculation formula. then the distance send to the Arduino and there is some database for comparison with the present value and according to the threshold the Arduino will send the command to the water pump. so if there any person put their hand then the water pump gets on and sanitizer release to that hand. and when the person pulls back their hand the sanitizer gets to stop.
Material required to make automatic hand sanitizer
- Arduino Uno
- Ultrasonic Sensor
- Water pump 9v
- Battery
- Wires
- Sanitizer
- Plastic box
automatic hand sanitizer circuit diagram
Code for Automatic hand sanitizer:-
int duration_front=0;
long distance_front=0;
void setup() {
// put your setup code here, to run once:
pinMode(2,OUTPUT);
pinMode(3,INPUT);
pinMode(7,OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(2, HIGH);
delayMicroseconds(10);
digitalWrite(2, LOW);
delayMicroseconds(2);
duration_front= pulseIn(3,HIGH);
distance_front=duration_front*0.034/2;
Serial.println(distance_front);
if(distance_front<=10)
{
digitalWrite(7,HIGH);
}
else
{
digitalWrite(7,LOW);
}
}
https://www.youtube.com/watch?v=llW4nlKR3hs&t=2s
Upload the given code in Arduino with Arduino IDE.
Learn 10+ basic activity & sensor interfacing with our Arduino ebook. Well explained program. And brief circuit diagram WhatsApp and email support. which will help you to learn basic electronics, Arduino Coding, Sensor interfacing with Arduino, Arduino, and much more. buy Arduino Ebook to learn https://techatronic.com/arduino-ebook/