Regularly sanitizing our hands is one of the primary preventive measures followed everywhere during current times of global outbreaks of diseases. Smart hand sanitizer is an efficient way of using hand sanitizer without touching the container surface. In this project, you will learn to design a #smarthandsanitizer using TinkerCAD.
Hardware Components - Smart Hand Sanitizer using TinkerCAD|
1. Arduino Uno:
#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.| Smart Hand Sanitizer using TinkerCAD|
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
4. Jumper wires:
Jumper wires have pins and connectors that are used to connect different components on a breadboard.
Connect Vcc of the ultrasonic sensor to 5V of the Arduino via a breadboard.
Connect the ground of the ultrasonic sensor to the ground of the Arduino via a breadboard.
Connect the trigger pin of the ultrasonic sensor to the D7 of the Arduino.
Connect the echo pin of the ultrasonic sensor to D6 of the Arduino.
Connect the ground of the servomotor to the ground rail on the breadboard.
Connect the signal pin of the servomotor to the D5 of the Arduino.
Include the Servo.h library in the Arduino for the servomotor.
Declare the connections made from the trigger and the echo pin of the ultrasonic sensor to the Arduino.
Create an object Myservo of the type Servo for the servomotor connections.
In void setup(), start the serial monitor output with a 9600 baud rate.
Write a command to indicate the connection between the signal pin of the servomotor and the Arduino board.
Set pin modes for the trigger on and the echo pin of the ultrasonic sensor.
In void loop(), declare "duration" and "cm" variables to store the respective values.
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.
Using the microsecondsToCentimeters() function, convert the duration to the distance and store it in cm.
Print the cm value as the distance of the object from the sanitizer outlet.
Using the if-else condition, set the servomotor's shaft portion to neutral if the object is not in the 10cm range of the ultrasonic sensor. Set the servomotor's shaft to rotate otherwise.
The connections are made as explained in the "circuit connections" section. The distance of the object from the sanitizer outlet is sensed by the ultrasonic sensor. The distance value is processed by the code. If the object is placed within the set range, then the servomotor's shaft is made to rotate thus, dispensing the sanitizer.
Check the Project working video here - Smart Hand Sanitizer using TinkerCAD
Name- Nagashree R Nadig
Portfolio Link- https://www.learnelectronicsindia.com/team/nagashree-r-nadig
Follow us -
Please do follow us i.e #learnelectronicsindia to get daily updates about new blogs, videos, courses, quizzes, and contests.
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