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.
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.
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
Circuit Connections:
Connect the Vcc of the ultrasonic sensor to the 5V of the Arduino.
Connect the trigger pin of the ultrasonic sensor to the D2 of the Arduino.
Connect the echo pin of the ultrasonic sensor to the D3 of the Arduino.
Connect the ground pin of the ultrasonic sensor to the ground of the Arduino.
Connect the power pin of the servomotor to the 5V of the Arduino board.
Connect the signal pin of the servomotor to the D9 of the Arduino.
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.
Check the Project Working video here - Automatic Hand Sanitizer - DIY
Video by- Sowmya G
Written by-
Name- Nagashree R Nadig
Portfolio Link- https://www.learnelectronicsindia.com/team/nagashree-r-nadig
See also-
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
Order Electronics Projects
Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607
You can -
Order Basic Electronics Projects
Order Embedded Systems Projects
Order IoT Projects
Order FPGA Projects
Order VLSI Projects
Order Image Processing Projects
Order Matlab Projects
Order TinkerCAD Projects
Order Proteus Projects
Click on the button below to fill out the project inquiry form -
Create Various 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
Follow us -
Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.
Informative and concise! LearnElectronics India always delivers quality content.
I'm blown away by the level of detail and clarity in this blog by Learn Electronics India. The automatic hand sanitizer project report PDF is an excellent resource for anyone looking to delve into this project. The author's passion for electronics and commitment to sharing knowledge shines through. Highly commendable.