Hello friends, welcome to yet another Interesting Arduino project from TexoBot.
This time, we will learn how to create an Automatic Face Mask and Sanitizer dispenser with the help of Arduino microcontroller.
This project has been specially created for our YouTube channel subscribers. As a Tech channel, we believe that it is our sole responsibility to contribute our Tech ideas towards fighting against the current pandemic(covid-19). Thus we created a fully automatic vending machine system which will help us to avoid any sort of virus contacts while using the Covid-19 protective measures like Face mask and hand sanitizers.
There are a lot of sanitizer projects available around, but none of those ideas were having an all in one combo package(Sanitizer + Face mask in one unit).
Please watch the video to know more about the project.
Arduino UNO ........ Amazon.in / Amazon.com
L298N Motor Driver ......... Amazon.in / Amazon.com
Infrared Module......... Amazon.in / Amazon.com
DC Geared Motor 12V (1000 RPM) ......... Amazon.in
DC submersible Pump......... Amazon.in / Amazon.com
Male and Female Jacks for Arduino ......... Amazon.in / Amazon.com
12V 2AMP DC Adapter......... Amazon.in / Amazon.com
10uF 25V capacitor .............. Amazon.in / Amazon.com
PVC Ceiling panel - Purchase from local Market(It may be available in Aluminum fabrication shops)
Aluminum Angle bar - Purchase from local Market(It may be available in Aluminum fabrication shops)
Hand riveter gun .......... Amazon.in / Amazon.com
Drilling machine ........... Amazon.in / Amazon.com
Flex quick(Super Glue) ......... Amazon.in / Amazon.com
Soldering Iron ........ Amazon.in / Amazon.com
int IRSensorS = 12; // connect ir sensor for sani to arduino 12
int IRSensorM = 8; // connect ir sensor for mask to arduino pin 8
int fla = A2; // Motor Driver 2 Pins IN1
int flb = A3; // Motor Driver 2 Pins IN2
int san = 5; // Motor Driver 2 Pins IN3
int san1 = 6; // Motor Driver 2 Pins IN4
int pwm = 9;
void setup() {
Serial.begin(9600);
pinMode(pwm, OUTPUT);
pinMode(IRSensorM, INPUT);
pinMode(fla, OUTPUT); // Digital pin A2 set as output Pin
pinMode(flb, OUTPUT); // Digital pin A3 set as output Pin
pinMode(IRSensorS, INPUT);
pinMode(san, OUTPUT); // Digital pin 10 set as output Pin
pinMode(san1, OUTPUT); // Digital pin 10 set as output Pin
}
void loop() {
while(1){
delay(100);
while(digitalRead ((IRSensorS) == HIGH)&&(IRSensorM) == HIGH);
if (digitalRead (IRSensorS) == LOW) {
Serial.println(120);
digitalWrite( san1, HIGH);
delay(200);//480
digitalWrite( san1, LOW);
while(digitalRead (IRSensorS) == LOW);
}else if(digitalRead (IRSensorS) == HIGH){
digitalWrite( san1, LOW);
}
if (digitalRead (IRSensorM) == LOW) {
Serial.println(120);
analogWrite(pwm, 140);
delay(10);
digitalWrite( fla, HIGH);
digitalWrite( flb, LOW);
delay(400);//480
digitalWrite( fla, LOW);
digitalWrite( flb, LOW);
analogWrite(pwm, 255);
while(digitalRead (IRSensorM) == LOW);
delay(2000);
}else if(digitalRead (IRSensorM) == HIGH){
digitalWrite( fla, LOW);
digitalWrite( flb, LOW);
}
}
}