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

  • 271 views
  • 0 comments
  • 3 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

Corona Hand Wash Timer

Project tutorial by Team Random Stuff We Make!

  • 8,561 views
  • 13 comments
  • 66 respects

Automatic Fear 1.0

Project showcase by Alexis Santiago Allende

  • 1,697 views
  • 3 comments
  • 9 respects

How to make Arduino based Automatic Door Opening

Project tutorial by vijendra kumar

  • 40,345 views
  • 6 comments
  • 34 respects

Amazing Control Computer Using Hand Motion And Arduino

Project tutorial by Smart Technology

  • 14,017 views
  • 16 comments
  • 17 respects

DIY Hand Sanitizer Dispenser Using Arduino

Project tutorial by Mission Critical

  • 11,495 views
  • 3 comments
  • 8 respects
Add projectSign up / Login