Introduction:
In this blog, we make one Automatic Contactless Sanitizer Dispenser using some sensors and microcontrollers.
Requirements:
I) Arduino Nano & Cable
II) 1-Channel Relay Module
III) DC Water Pump
IV) Photoeletric Switch
V) DC Female Socket
VI) 12V 2Amp Adapter
VII) Nozzle & Pipe
VIII) Sanitizer Container
IX) Sun Board
X) LED
XI) Soldering Kit
Description:
Here we will make one machine that can sanitize your hand touchless and also contactless.
For the sanitization purpose, we have taken one 12v DC pump, nozzle, pipe, and to automate the sanitization we have taken one 2-Channel relay module and one Arduino nano. To detect the hand we have taken one photoelectric switch.
When one person takes his/her hand near to the photoelectric switch, this switch will activate and sends the data to the microcontroller, then the microcontroller will activate the relay for sanitization.
So let's start with the circuit diagram.
Circuit Diagram:
Components | Pins | Arduino Pins |
Photoelectric Switch | Out | D8 |
Relay | Out | D4 |
LED | Out | D7 |
Code:
//////////////////////////////////////////define part
#define ir 8
#define relay 4
#define led 7
void setup()
{
////////////////////////////////////////////declaration part
pinMode(led,OUTPUT);
pinMode(relay,OUTPUT);
pinMode(ir,INPUT);
}
void loop()
{
/////////////////////////////////////////////////condition
if(digitalRead(ir) == LOW)
{
digitalWrite(relay,LOW);
digitalWrite(led,HIGH);
}
else
{
digitalWrite(relay,HIGH);
digitalWrite(led,LOW);
}
}
For more details also watch the video.
Comments