sim[le automatic hand sanitizer

Simple Automatic Arduino hand Sanitizer

 Arduino hand Sanitizer using Arduino

Hello Guys, Welcome back to Techatronic, In This post, we are going to make a Simple Automatic Arduino hand Sanitizer at Home. This post is for those people who have non – technical background. All the instruction is simple and easy to make. so, you can easily make that Simple Automatic hand Sanitizer at Home with the help of this article. but you need to read the full article and follow all the given steps. Automatic Hand sanitizer is the best gadget that can help us in this covid-19 pandemic. There are many hand sanitizers available in the market but all those are expensive that’s why we are making this simple and cheap automatic hand sanitizer. you can use this mechanism in each size of the sanitizer machine.

simple automatic hand sanitizer

At this time of the c0vid-19 pandemic, we need some small gadgets and help from the technology which can help us to fight with the coronavirus.

HTML Image as link

How does Arduino hand sanitizer work?

working on automatic hand sanitizer is pretty simple. you need to place your hand before the machine it will naturally give you the sanitizer. there is a sensor name ultrasonic sensor that can identify the presence before it. at that point send the data to the Controller. the controller gets the data from the ultrasonic sensor and the controller compares this data with the condition if the condition gets true the simple automatic Arduino hand sanitizer using Arduino will start for 3 seconds. and if the condition not true the system doesn’t start work.

Ultrasonic sensor working in simple automatic hand sanitizer dispenser Arduino.

the ultrasonic sensor can communicate and get the ultrasonic waves. there are two terminals in the ultrasonic sensor one is TRIG and another ECHO.  transmitter. the transmitter sends the ultrasonic waves and gets them by another terminal after the impact from any surface. at that point when taking from sending to accepting we can figure the snag good ways from the ultrasonic sensor. presently this distance uses to make the sanitizer work. for instance, in the event that we utilize the edge distance of 10 cm. we need to contrast the ultrasonic and item distance and the limit distance and in the event that the distance is under 10 cm, at that point the sanitizer will on, in any case, the sanitizer stay off.

When we put our hand in front of the automatic hand sanitizer dispenser Arduino then the hand sanitizer gives sanitizer for 3 seconds. there is an ultrasonic sensor inside the sanitizer which detects the object in front of it. then it will trigger the Arduino according to the distance if the given condition is true then the pump will start to flow the sanitizer.

HTML Image as link

The component used in Hand sanitizer:- simple automatic hand sanitizer components

  • Arduino nano
  • RGB led
  • ultrasonic sensor
  • breadboard
  • Jumper wires
  • 220ohm resistor
  • 12v Water pump
  • 12v Adapter
  • Pipe or tube for pump

simple automatic Arduino hand sanitizer circuit diagram:-

simple automatic hand sanitizer circuit diagram
Arduino UNO, NanoUltrasonic Sensor 
( +5V ) VCC 
D9 PinTrig Pin
D10 PinEcho Pin
Arduino UNORelay Module
D3 PinS signal Pin
( +5V )VCC 
Arduino RGB Led220 ohm Res
D4 PinTerminal R 
 TerminalTerminal 1
D5 PinTerminal G 
 Terminal B 
GND Terminal 2
DC Water PumpRelay ModulePower Supply
 Normally Open 
Terminal 1Normally Closed 
Terminal 2 Negative

Simple automatic Arduio hand sanitizer dispenser code 

int RELAY = 3;
int RED_LED = 4;
int GREEN_LED = 5;

const int trigPin = 9;
const int echoPin = 10;
long duration;
int distanceCm, distanceInch;
void setup()
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
void loop() {
digitalWrite(trigPin, LOW);
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
Serial.println(“Distance: “);

if(distanceCm < 10)
digitalWrite(RELAY , HIGH);
digitalWrite(RED_LED , LOW);
digitalWrite(GREEN_LED , HIGH);
digitalWrite(RELAY , LOW);
digitalWrite(RED_LED , HIGH);
digitalWrite(GREEN_LED , LOW);

Upload the given code into the Arduino using 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

Spread the love

1 thought on “Simple Automatic Arduino hand Sanitizer”

  1. we have an error message stating “stray ‘/342’ in the program”. how should we rectify the error please message me to the mail

Leave a Comment

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

Scroll to Top