You are here

How To Make Automatic Hand Sanitizer using Arduino

automatic hand sanitizer project

Hello creators, well i know many have been waiting for this project, finally i will be showing you How to make automatic hand sanitizer using Arduino.

As i have already made video tutorial on How to make touchless hand wash dispenser using arduino nano, after that tutorial many asked me to make same project using arduino Uno

Here i will show u Both ways, Make sure to check out video which is provided at End of this article

1)How to make Automatic hand sanitizer machine using Arduino Uno

automatic hand sanitizer project
automatic hand sanitizer project using Arduino Uno

2)How to make automatic hand sanitizer machine using arduino nano

automatic sanitizer dispensing machine using arduino nano
Contactless hand sanitizer dispensing machine made using sensor

Well both of these automatic hand sanitizer dispenser follows almost same mechanism, Here the purpose of using arduino nano and arduino uno is many enthusiast either have ARDUINO UNO but not ARDUINO NANO or in other way round!

Materials required for Arduino Hand wash Dispenser

  • Empty sanitizer bottle
  • Arduino Uno
  • Ultrasonic sensor HC-SR04
  • Micro servo
  • Jumper wires
  • MDF Wood
  • Hot glue
  • Pieces of wire
  • Arduino IDE
  • Cable to upload program
  • Time!
NameBuy in IndiaBuy in USA
Arduino UNOhttps://amzn.to/3kbjZL2https://amzn.to/3buKSoW
Micro Servohttps://amzn.to/3uj9fyHhttps://amzn.to/3pF5i3Y
Ultrasonic sensorhttps://amzn.to/3qFwf8Jhttps://amzn.to/2NjCLUw
Jumper wires and Breadboardhttps://amzn.to/3qHY406https://amzn.to/2OPKmu6
Part list

Disclosure: These are affiliate links. As an Amazon Associate I earn some credits from qualifying purchases.

arduino hand sanitizer parts
parts for arduino uno hand sanitizer
  • It is easy to work on empty sanitiser bottle, if bottle filled with liquid is used it might spill while on working phase
  • Once all the supplies are gathered we can move on to circuit making part
  • Here we don’t need breadboard since we are using only 2 Arduino modules, hence 2 Gnd ports along with 2 power ports are provided in Arduino Uno board

Automatic Hand Sanitizer Circuit Diagram

Arduino uno automatic hand sanitizer circuit diagram
Arduino uno automatic hand sanitizer circuit diagram

Circuit diagram explanation

Here only digital pins will be used to make this Arduino project

  1. D4 pin of Arduino Uno is connected to signal pin of micro servo
  2. D3 will go for Trig pin of HC-SRO4/ Ultrasonic sensor
  3. D2 is for Echo pin
  4. Vcc and Gnd of sensor to +5v pin and Gnd pins
  5. Micro servo Gnd to Gnd of Uno, Positive wire to 3v pin of Uno
  • Once all the wiring finishes, Upload code to uno using IDE
  • Steps for uploading code already given in detail on my previous projects, u can refer arduino projects section

Arduino Code for Touchless Dispenser

Once u upload the code half of work is done, Test out if arduino code and circuit is working fine by connecting it to power supply, Once its confirmed, let’s build mechanism

Mechanism of touchless sanitizer building
Building Mechanism for touchless sanitizer
  • Place the assembled circuit on MDF wood
  • Alternatively piece of cardboard or 3D Printed body for much more appealing look
  • Using Hot glue stick base of hand wash container to wood base
  • I will be using piece of wire for pulling mechanism
  • Adjust servo shaft for initial position
  • Hot glue micro servo to wood board
  • At first use super glue later followed by hot glue for improved strength
  • Reason of using plastic geared servo is push function is smooth in my type of container, it depends of container manufacturers
  • Make all connections referring images above
  • Allow hot glue to dry completely, make small tests by pushing sanitizer button down a few times
  • Power board using external supply
  • I used 6v adapter to power this project

How it works?

  • Connect power to Board
  • wave your hand or just bring your hand closer to ultrasonic sensor
  • Ultrasonic sensor sends signals to board which later is sent to micro servo
  • Not only hand objects but are detected and responded, it even responds to object which is an obstacle for signal transferred
  • Micro servo rotates at some angle
  • This rotation causes shaft movement which in turn pulls the wire that is connected to hand wash pushing part
  • As a result hand wash/sanitizer comes out
  • Time of response along with distance at which ultrasonic sensor should detect obstacles can be altered in code
  • I have added instructions in code on how to alter

That was all about automatic hand sanitizer project using ARDUINO UNO, Now we will make same arduino projects using ARDUINO NANO

Materials Required

All the materials remain same for this project except here only major change being ARDUINO NANO and Breadboard used

Contactless hand sanitizer Circuit Diagram

Arduino Nano Circuit diagram
Arduino Nano Circuit diagram

Please follow the diagram above to make circuit connections

Once the circuit built as shown in image upload code to board using Arduino IDE

Copy and paste the code later change any parameters if you want and later upload

Code for hand sanitizer project

After the code gets upload to board, Make few trials to check if everything works fine, Once everything built it’s difficult to check for error points

Mechanism For this Arduino project using nano

How to make automatic sanitizer spray machine using arduino
How to make automatic sanitizer spray machine using arduino

Steps

  • Using Hot glue stick servo to Sanitizer bottle body
  • Make 2 holes as shown in image
  • Insert piece of wire into these holes
  • End of these wire will be connected to micro servo shaft
  • Once this is complete using hot glue attach HC-SR04 To one side as in image
  • You can keep it on other places too, since my place is effective kept over in position
  • I coupled rest of components to back side using hot glue, it was easy as everything was in breadboard
  • Later supply power
  • I prefer to use rechargeable batteries
  • Pre-check if mechanism is working, once it is confirmed
  • Fill your container with soap/sanitizer
  • Power it up
  • Bring your hand close to sensor
  • use the dispensed liquid effectively and stay healthy!

Video link For automatic Arduino dispenser

Click here to watch video tutorial

Advantages from both projects

  1. Easy to make Arduino projects
  2. Inexpensive contactless dispenser
  3. Creative project for science fair

Disadvantages

  • No disadvantages!

That was all about these Arduino projects, Hope you enjoyed the idea, if you have any queries let me know in the comments box, Suggestion for improvements are always welcome.

Jeevan
ADMIN

10 thoughts on “How To Make Automatic Hand Sanitizer using Arduino

    1. it will run with no issues, But it can’t handle load(it will jitter) also it depends on type of hand sanitizing pump which you are using(some are hard some are smooth), If you want stability you should go with metal geared servo, Definitely it will help you.
      If you have any queries you can reach out! Thanks

      1. My hand sanitizer bottle is savlon hand wash liqued which is 250 ml pump bottle.I will remove the hand wash liquid from the bottle and keep sanitizer into the bottle.

        1. As u mentioned you are using this for your project recommended to use mg90 servos, it will serve the purpose better!

          1. Thank you for yout recommend.But how much voltage need for mg 90 servo?If i connect it into the 3.3 v servo?? Will it run or not?

  1. I made an automatic hand sanitiser. The problem with it is, the servo motor hasnt got enough power to push the nozzle to draw the soap out.

    1. Hello Nisha, Thanks for reaching out
      Regarding your problem with servo, at first the type of hand sanitizer bottle head which you are using play important role, in my case it was smooth if its hard in your case you can replace plastic servo with metal geared servo commonly called as MG90 servo or MG90s, Hope this helps
      Thanks, Have a great day 🙂

  2. Hi, It was awesome project,it was very helpful to us on this pendamic period (hand sanitizer project) with clearcut explanation,keep posted new projects. I am eagerly waiting your new projects.

Leave a Reply

Top