top of page

automatic hand sanitizer | project report pdf |

Updated: Feb 12

In this project, you will learn to design an automatic hand sanitizer.


Hardware Components:


1. Arduino Uno: - automatic hand sanitizer

#ArduinoUno board is used for interfacing the input-output elements to construct a project. It is an open-source microcontroller board that can be programmed according to user requirements.


Arduino Uno
Arduino Uno

2. Ultrasonic Sensor:

This sensor measures the distance of an object by emitting ultrasonic waves through a transmitter. Its receiver receives the reflected signal and converts it into an electrical signal.

In this project, we use an ultrasonic sensor to recognize the presence of the hand near the nozzle of the sanitizer.


Ultrasonic Sensor
Ultrasonic Sensor

3. Servo Motor:

A servomotor is a linear or a rotatory actuator that aids in the precise control of velocity, acceleration, and angular position. It works on the principle of Pulse Width Modulation.

In this project, the servomotor is used to control the flow of the sanitizer through the nozzle or an outlet.

To learn to interface a servomotor with Arduino, click here: INTERFACING SERVO MOTOR WITH ARDUINO



Servomotor
Servomotor


Circuit Connections:


Circuit Connections
Circuit Connections
  1. Connect the Vcc of the ultrasonic sensor to the 5V of the Arduino.

  2. Connect the trigger pin of the ultrasonic sensor to the D2 of the Arduino.

  3. Connect the echo pin of the ultrasonic sensor to the D3 of the Arduino.

  4. Connect the ground pin of the ultrasonic sensor to the ground of the Arduino.

  5. Connect the power pin of the servomotor to the 5V of the Arduino board.

  6. Connect the signal pin of the servomotor to the D9 of the Arduino.

  7. Connect the ground pin of the servomotor to the ground of the Arduino

Code:



  • Include the servo.h library in the Arduino IDE.

  • Define the variables myservo, duration, and distance, and define the ultrasonic sensor pins used.

  • In void setup(), set the pin modes for the trigger pin and the echo pin. Start the serial monitor output with a 9600 baud rate.

  • Using the digitalWrite() function, set the trigger pin to low and high alternatively by giving a suitable delay.

  • Store the value of the echo pin the duration variable.

  • Convert the value in the duration variable to the distance value.

  • Using the if-else condition, set the servomotor shaft to a neutral position if the distance between the hand and the sensor is not between 2cm to 4cm. Set the motor shaft to rotate otherwise.

Working:

The distance between the sensor and the object is measured and processed by the ultrasonic sensor. When the object comes within the range of the sensor, the shaft of the servomotor is made to rotate and, the sanitizer is dispensed from the container.


Hardware connections
Hardware connections

Check the Project Working video here - Automatic Hand Sanitizer - DIY

Video by- Sowmya G


Written by-

Name- Nagashree R Nadig


See also-

Motion Controlled Colour Changer



automatic hand sanitizer project report pdf

Follow us -


Please do follow us i.e #learnelectronicsindia to get daily updates about new blogs, videos, courses, quizzes, and contests.


Components and Code_ - Google Docs
.pdf
Download PDF • 1.99MB

Want us to help you with the projects, write your inquiry here - Order Projects


Check out our Free Arduino Projects Playlist - Arduino Projects

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects

Check out our Free IoT Projects Playlist - IoT Projects

Check out our Free Home Automation Projects Playlist - Home Automation Projects

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects

880 views2 comments

Related Posts

See All
bottom of page