arduino hand sanitizer .In this current scenario of global outbreak, it is advised by WHO (world health organization) to maintain Healthy Hand Wash and Sanitation Habits, but the main problem is the way we do it, that is by physical touch to the bottle, which in short doesn’t serve our purpose, so in this tutorial, we will learn How To make a D.I.Y. Arduino Based Soap or Hand Sanitizer Dispenser.
Supplies for arduino hand sanitizer dispenser:
- Arduino Nano ( or any Arduino ).
- Ultrasonic Sensor ( HC-SR04)
- Servo Motor ( metal Geared Preferred ).
- Jumper Wires ( female to female ).
- Hot Glue Gun.
- Computer or Laptop.
- Alcohol Based Hand Rub or Sanitizer.( most important)
- Self Threading Screw ( 1 pcs).
- 0.8 mm copper wire ( 0.5 meter ).
- plastic container ( which fits everything inside comfortably)
- Stationary ( marker and ruler scale ).
Step 1: Watch the Video for making arduino hand sanitizer
Step 2: Select the Liquid
First and the most important thing we will need for this build is Alcohol Based Hand Rub or Hand Sanitizer or Hand Wash as suggested by W.H.O. ( world health organization ) find more information here .
for this build, it is very important to get right kind of dispenser, since we are just making a dispenser and not printing the entire mechanism, we will need alcohol or hand rub in dispenser or push type bottle.
Step 3: Selection of Components
We will need a Sensor to sense our proximity or presence which will basically act as a trigger or touch less switch for this system. And We have two choices here, that is we can use either IR sensor Module, or Ultrasonic sensor Module. We can use IR sensor Module, which is basically a cheap and efficient option, but sometimes inaccurate. or we can use HC-SR04 Ultrasonic sensor, which is quite accurate above 2 cm range, and slightly expensive option. but we will use Ultrasonic Sensor for this Tutorial, for better accuracy.
For motion or to process the Output, we might need either a pump, either motor, or some electronic component that will convert electrical signal to mechanical displacement of alcohol based hand rub or sanitizer through the dispenser, best choice would be to use a Servo motor with metal gears for maximum torque. We will avoid using micro pumps, since they are to be inserted into the container, which again creates vulnerable containment spot. So using an external mechanism with help of servo would be a wise choice.
For this project build, we will need a Microcontroller to control the Input and Output, to Calculate the distance or sense the Trigger from Sensor and Process the Output in form of Servo Sweep in our Example, for which we can use any arduino, which makes it easy to adjust the parameters, fine tune outputs, so you can use any Arduino, we will use Arduino Nano for our work case.
arduino hand sanitizer
Step 4: Understand the Mechanics
Let’s Understand the Mechanical Arrangement before we start making it.
We will need a mechanism which will create a force to push the nozzle down and dispense the liquid, since we are using servo motor, that provides circular motion, it alone can’t create a downwards force, we will need some kind of mechanical arrangement to make it happen,we will use pulley mechanism to fix one end and convert the rotational force to push, we can do that using Copper Wire to create a downwards vector force for transmission, what it basically does is, it convert the circular force of Servo to a downwards acting force vector, to simulate push. but this all sounds complicated, so let’s execute this task bit by bit, following the further steps
Step 5: Connections for arduino hand sanitizer
Step 6: Attach Servo to Base arduino hand sanitizer
First step in mechanical arrangement is to attach Servo motor to one rigid surface inside the box, using hot glue
( be careful while using the hot glue )
Step 7: Pass the Copper Wire Through Servo Arm
Pass the Copper Wirethrough Servo motor using the holes on Attachment Arm, pass at least through 2 holes to ensure proper tension is achieved using circular attachment arm would be better choice, since straight one can get caught inside enclosure.
Step 8: Add Piece of Hot Glue Stick With Hole in Middle
Cut about 2 cm long piece of Hot Glue Stick and make a hole in middle, pass the copper wire through the piece of hot glue stick, which will indeed help to increase the surface area at contact point,
Step 9: End Screw
Attach the second end of wire to another rigid surface (opposite face of servo motor),
using a Self Threading Screw or a nail here would be a vise choice since it will allow us to adjust the tension or to remove the bottle for refill.
Step 10: Upload the Code
In theory our idea sounds perfect, let’s code this Arduino and test our idea in real world.
arduino hand sanitizer
The code is very simple to understand, we used the servo library, and defined basic setups and variables, the main code is such that it calculates the distance in centimeters and if the distance is less than 10 cm the servo motor performs a sweep motion to release the liquid.
you can find the Library for Servo here.
Step 11: Testing
Once our code is uploaded, it would be good practice to Test this project before we complete this enclosure.
in this test we can clearly see when our hand is placed above sensor and distance for ultrasonic drops below 10 cm. servo motor is engaged and alcohol hand rub is dispensed.
once the project is working properly, we can move further to next step!
Step 12: Complete the Enclosure
Once our project seems to be working, it’s time to complete the enclosure.
follow the steps to complete arduino hand sanitizer:
- measure the Dimensions for Ultrasonic Sensor and holes for Bottle.
- make a slot for Copper wire with extra room for Moment.
- mark all cutting holes.
- use Sharp Blade or Drill to plot the holes.
- fix everything with the help of hot glue.
And finally this project comes to life.
Step 13: All Set!
Step 14: Please Donate!
Most of the parts used in this project would be handy with many of guys, so I would request all of you to make this project and donate it to Hospitals or any needy person, I am personally donating this project to an Essential work force. Do share this video with all your Engineer friends and let’s start a moment, make this project, tag us on Instagram using the id @officialmissioncritical its time to contribute to community and show power of our Arduino Community to fight this Global Issue!