Project in progress
Automatic Hand-wash / Sanitizer Dispenser - Peristaltic pump

Automatic Hand-wash / Sanitizer Dispenser - Peristaltic pump

This device detects the presence of your hand and automatically release a specific amount of Hand-wash / Sanitizer to your hand.

  • 1,496 views
  • 3 comments
  • 11 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)

Apps and online services

About this project

This device is an automatic hand wash dispenser which dispenses a specific amount of handwashing liquid on to your hands when placed under a distance measuring sensor(ultrasonic sensor).

Here the ultrasonic sensor is used to detect the presence of hand placed under the device ( 20 cm from the sensor).

A 12 V Peristaltic pump is employed to eject the right amount of liquid at the right time. i.e. when the hands are placed in the 20 cm range.

The Arduino UNO board controls the pump based on the distance obtained from the ultrasonic sensor.

The peristaltic pump is controlled via NPN Transistor (BC 547), a flyback diode (IN4007) is connected in parallel with the motor. The diode protects the Arduino from the back emf produced by the pump.

An adapter (12 V 1 A DC Output) is used to power the Arduino, which in turn controls the 12 V Pump.

Make sure the U. S. sensor is placed just above the outlet of the peristaltic pump so that it can detect the hands kept under the outlet.


Make sure the U. S. sensor is placed just above the outlet of the peristaltic pump so that it can detect the hands kept under the outlet.

The code given below can be modified to obtain the required amount of liquid, the details regarding this are given in the code.

Put the inlet tube of the pump inside the solution which is to be dispensed.

ENJOY!

Code

CodeC/C++
#define echoPin 4                // defining pins and variables
#define trigPin 5
int 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
  }
}

Schematics

Circuit Diagram
Circuit diagram 7btvmmfbtg

Comments

Similar projects you might like

Fighting Corona: Multichoice automatic hand sanitizer

Project tutorial by herolivechannel

  • 2,700 views
  • 1 comment
  • 6 respects

Automatic Fear 1.0

Project showcase by Alexis Santiago Allende

  • 1,728 views
  • 3 comments
  • 9 respects

Hands-Free Soap, Water and Paper Towel Dispenser

Project showcase by Samuel Adranyi

  • 4,917 views
  • 5 comments
  • 23 respects

DIY Hand Sanitizer Dispenser Using Arduino

Project tutorial by Mission Critical

  • 21,519 views
  • 6 comments
  • 13 respects

Automatic Pet Water Chiller

Project tutorial by Mitomon

  • 2,633 views
  • 0 comments
  • 9 respects

Touchless Automatic Motion Sensor Trash Can

Project showcase by Will Su

  • 49,139 views
  • 36 comments
  • 83 respects
Add projectSign up / Login