Project tutorial
Fighting Corona: Multichoice automatic hand sanitizer

Fighting Corona: Multichoice automatic hand sanitizer © LGPL

Make Automatic hand santinizer using ultrasonic sensor module, arduino uno and rc servo motor

  • 8,717 views
  • 1 comment
  • 8 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)
4418162
Drill, Screwdriver

Apps and online services

About this project

Automatic washing machine helps people who do not need to touch the wash bottle to prevent corona virus infection.

This hand washing machine has an outstanding function:

I hope that you like this project. And subscribe my youtube channel.

Thanks for your watching!!!

Code

Automatic hanitizer codeC/C++
#include <Servo.h>
int echoPin = 12;
int trigPin = 11;
int servoPin = 10;
int duration; //micro second
float d_cm;
int pos01=0;
int pos02 = 100;
Servo myServo;
void setup() {

// initialize serial communication:
  Serial.begin(9600);
  pinMode(trigPin,OUTPUT);
  pinMode(echoPin,INPUT);
  myServo.attach(servoPin);
  myServo.write(pos01);
}

void loop() {
  // generate pusle trigger
  digitalWrite(trigPin,LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin,HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin,LOW);
  // receive 
  duration = pulseIn(echoPin,HIGH);
  d_cm = duration * 0.034/2.;
  //servo
  if(d_cm>=11 & d_cm<=14){
    for (int i=0;i<=pos02; i+=10){
      myServo.write(i);
      delay(15);
    }
    delay(400);
    myServo.write(pos01);
    delay(1000);
  }
  //print
  Serial.print("Distance:");
  Serial.print(d_cm);
  Serial.println("cm");
}

Schematics

Automatic hanitizer Schematics
auto-santinizer_hKBh7kY4ky.fzz

Comments

Similar projects you might like

Automatic Hand-wash / Sanitizer Dispenser - Peristaltic pump

Project in progress by Rebeldose

  • 21,332 views
  • 15 comments
  • 27 respects

Automatic Hand Sanitizer

Project tutorial by Nikolaos Babetas

  • 35,786 views
  • 14 comments
  • 37 respects

Automatic Soap Dispenser with 20 second hand washing LED

Project tutorial by Athanasios Dimopoulos

  • 7,924 views
  • 4 comments
  • 10 respects

DIY Hand Sanitizer Dispenser Using Arduino

Project tutorial by Mission Critical

  • 57,861 views
  • 8 comments
  • 20 respects

Corona Hand Wash Timer

Project tutorial by Team Random Stuff We Make!

  • 15,643 views
  • 17 comments
  • 77 respects

Simple Hand controlled instrument

Project tutorial by theriveroars

  • 3,369 views
  • 0 comments
  • 7 respects
Add projectSign up / Login