Automatic Hand Sanitizer Dispenser Using Arduino
Hi guys! Welcome to an exciting Blog. Today we are going to do a project which is very relevant in the present scenario We are going to make an automatic hand sanitizer or hand wash dispenser. We just need to keep our hand below it and it dispenses hand sanitizer or hand wash without any direct contact.
Components:
- Arduino
- Battery
- Servo Motor
- HC-SR04
- Glue Gun
Description:
First of all, we need some sheets to make the structure of the dispenser We'll stick the longer sheet on the smaller one by using a hot gun We are using the sheet that is used to make the ceiling Next we need a piece of sheet with a hole in its center we can stick that sheet on top of the longer sheet Now lets stick a small piece in the gap for a stronger hold Then stick a washer over the hole We made this washer Then we made a piston using a sketch pen and wheel cup of a toy JCB For a stronger hold we stick a washer between the sketch pen and the wheel cup Now insert the piston through the hole. We need a plastic cup on top of the piston like the one used in its bottom portion . This cup should have radius more than the bottom one. Now, stick the cup on the sketch pen. Then we need a servo motor . Before sticking the servo motor we need to stick 2 small pieces of the sheet for height. Now using glue gun stick the servo motor on the sheet piece. Then we need an ultrasonic sensor and some jumper wires. Connect them to the 4 pins of the sensor. Then lets stick the sensor on the top edge. So, the structure of the dispenser is now almost ready.
Connections:
We need an Arduino Nano. Now lets connect the servo and the sensor to the Arduino. The circuit is in this manner and lets connect accordingly In order to connect a 9 volt battery to the Arduino, we have soldered 9 volt battery connector and jumper wire. Now lets connect the 9 volt battery and see what happens. The arduino has turned on. Now lets stick the arduino using a double side tape. Then lets bring the wires together for a more ordered appearance. Now the wires look neat, lets stick the 9 volt battery beside it using a glue gun. Next we need to program the arduino. For that lets connect the Arduino to a laptop or a desktop. Now reset the Arduino by pressing the reset button on it. Then open the Arduino software, So this is our program. Now press the upload button.We can see that the uploading is done . Now keep a hand-sanitizer or hand wash on the base for automatic dispensing. Let now connect the 9 volt battery and see. Our automatic dispenser is now ready.
Now all you need to do is keep your hand below the hand wash. The hand wash will automatically come to your hand we hope that this project has been useful to all of you. Please wash your hands frequently and stay safe. So if you like this Blog do share and Comment below.
Code:
#define echoPin 4 // defining pins and variables #define trigPin 5int long duration; int distance; const int motor= 10; // pin connected to base of npn transistor void setup() { pinMode(echoPin,INPUT); // defining pin modes pinMode(trigPin,OUTPUT); pinMode(motor, OUTPUT); } void loop() { digitalWrite(trigPin,LOW); delayMicroseconds(2); digitalWrite(trigPin,HIGH); delayMicroseconds(10); digitalWrite(trigPin,LOW); duration=pulseIn(echoPin,HIGH); distance=(duration*0.034/2); // now you got the distance if(distance<=20) // checking the presence of hands in 20 cm limit { digitalWrite(motor,HIGH); // if present motor operates for some time delay(400); // delay value to changes the operating time digitalWrite(motor,LOW); // pump stop working for some time delay(1000); // some delay prevents continous operation } else { digitalWrite(motor,LOW); // if no hands detected - no operation } }Hope You completed the project without any doubt!!!
Comments
Post a Comment
If you have any doubts ,Please let me know.