How to make Automatic hand sanitizer dispenser with Arduino (DIY)

The automatic hand sanitizer dispenser has been one of the technological devices employed in the fight against the the spread of the Corona Virus contagion in the world. Since the virus broke out in late 2019, a lot of measures have been put in place to contain the covid-19 virus spread. Though there is covid-19 vaccine, however, more measure are being put in place to keep curtailing the spread of the virus.
In line with this, a lot of tech companies have done tremendous innovations in designing technological gadgets that will help stop the spread of the corona virus pandemic, especially, now that we have the delta variant of the corona virus.

What is automatic hand sanitizer dispenser

Automatic hand sanitizer dispenser is a device that automatically dispenses hand sanitizer without you pressing a knob or turning a lever. The device works with a proximity sensor, the sensor senses the presence of the palm, if the palm is close enough to the dispensing nozzle, the device will dispense the sanitizer in small amount enough to serve for the sanitization.

Different types of automatic hand sanitizer dispenser

This device is one of the gadgets that have been designed by some covid-19 solution based technological companies, to help fight the spread of the corona virus contagion. The device is already on the market. It comes in different sizes, shapes and colors. Before delve into how to make a DIY version of the project, let us take a look at the finished products of the device that we already have in the market. See images below.

Automatic hand sanitizer

Some companies that make automatic hand sanitizer dispenser

Ostlabz Pvt. Ltd.

The Ostlabz PVt. Ltd automatic hand sanitizer has the following features:

Electrical Parameters 
Input90-275 VAC
PowerIdeal State: 5W, Full Running- 60W
Sensor Range10 CM
Liquid Dispense5-10ml Per Cycle
Liquid Time1 Sec
Tank Capacity (Min)5 Litre
Tank Capacity (Max)10 Litre
Dispenser BodyABS

Swastik Systems And Services

Swastik systems and services automatic hand sanitizer dispenser has the following features:

Automatic hand sanitizer dispenser
Packaging Size2000 ml
Packaging TypeWall Mounted
BrandCorona Killer
Usage/ApplicationClinical
Operation ModeElectric
Type Of AlcoholAny
Battery Power230
Minimum Order Quantity1

How to make DIY automatic hand sanitizer dispenser

Above are just two of the tech companies that manufacture the device, the dispenser and their features.
If you visit the companies’ websites, you will discover that the prices of this covid-19 solution product may not be expensive for some people to acquire, and that is why I decided to make a tutorial, explaining and showing how to make a DIY automatic hand sanitizer at home. If you have a basic knowledge of electronics, you will be able to put some electronic parts together and design your own device at home or in the work place.

In this Arduino project tutorial, I will show you how you can make your own DIY automatic hand sanitizer dispenser.
The parts you need for the design of the project are shown below:

Automatic hand sanitizer

List of the components used for the design:

  1. Arduino board (1)
  2. Ultrasonic sensor (1)
  3. 5V DC pump (1)
  4. Lithium-ion Batteries (3)
  5.  Battery casing (1)
  6. NPN BJT Transistor (1)
  7. LED (1)
  8. 330R Resistor (1)
  9. Power Jack (1)
  10. Switch
  11. Hose
  12. Sensor support
  13. Container for sanitizer
  14. Jumper wires
  15. Twist strips
  16. Device casing
  17. Screws

Circuit diagram of the automatic hand sanitizer dispenser

automatic-sanitizer-dispenser

Connect the components as shown in the circuit diagram, and build the device as shown in the figure below. watch the video to get a better understanding of the construction and detailed explanation of how the device works.

How to make Automatic-hand-sanitiser-dispenser
DIY Automated-hand-sanitiser-dispenser

Design code of the Arduino project

Below is the Arduino code for the design, copy and paste this code in your Arduino IDE and upload to your Arduino board. Make sure you unplugged the Arduino from the battery before uploading the code to the board.

int trigPin = 9;      
int echoPin = 8;     

int to_transistor=12;    

long duration;
 int distance;
 int led=2;

void setup() 
{
 
  Serial.begin(9600);
  
  delay(random(500,2000));  
  
  pinMode( to_transistor, OUTPUT);
        pinMode( trigPin, OUTPUT);
        pinMode( echoPin, INPUT);
              pinMode( led, OUTPUT);
               digitalWrite(led ,HIGH);
              
}

void loop() {

  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);   
  digitalWrite(trigPin, HIGH);    
  delayMicroseconds(10);
   digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration*0.034/2;   
  delay(10);

   Serial.println(distance);
    
  if (distance <=8)            
  {
    digitalWrite(to_transistor, HIGH);                    
     delay(300); 
     digitalWrite(to_transistor,LOW);
     delay(2000);    
                                             
  }
else 
{
  
   digitalWrite(to_transistor, LOW);                    
      
                          
}
       
  }
  
    

Suggested reading

Check out other nice tutorials below:

Arduino remote controlled car
Obstacle avoidance robot
Bluetooth controlled scrolling text display
Water level indicator and control

Leave a Reply

Your email address will not be published. Required fields are marked *