HAND SANIDISER DISPENSOR USING LDR
by harishgl in Circuits > Arduino
243 Views, 1 Favorites, 0 Comments
HAND SANIDISER DISPENSOR USING LDR
THIS IS THE PROJECT MADE FOR THE CURRENT SITUTATION COVID-19 PANDAMIC. THIS HELPS IN DO NOT TOUCHING THE SANIDISER TO PRESS THIS AUTTOMATICALY WHEN THE LDR SENSES DARK. THE SERVO OR MOTOR TURNS ON FOR A SECOND. I AM ALSO MAKING PCB FOR THIS TO MAKE THIS AS SMALL CIRCUIT
Supplies
1.) ARDUINO (ANY BOARDS)
2.) LDR
3.) 10K RESISTOR
4.) MOTOR OR SERVO
5.) POWER SUPPLY (5-12 VOLT)
6.) WIRES(JUMPER)
7.) BREADBOARD
8.) RELAY OR RELAY MODULE
MAKING THE CIRCUIT
TO MAKE THIS PROJECT WE NEED TO ASSMBLE THE CIRCUIT SEE THE CIRCUIT DIAGRAM ABOVE . CAN ALSO USE IR OR ULTROSONIC SENSOR
UPLODIND THE CODE
THIS IS THE CODE UPLOAD THIS CODE (COPY AND PASTE)
// AUTOMATIC SANIDISER DISPENSER USING LDR
const int relayPin = 13; const int ldrPin = A0;
void setup() {
pinMode(relayPin, OUTPUT); pinMode(ldrPin, INPUT); }
void loop() {
int ldrStatus = analogRead(ldrPin); if (ldrStatus <= 80) // THIS MAY CHANGE ACCORDING TO YOR BRIGHTNESS OF LIGHT { digitalWrite(relayPin, HIGH); } else { digitalWrite(relayPin, LOW); } }