কনট্যাক্টছাড়া স্যানিটাইজার — VL53L0X লেজার চোখ দিয়েContactless Sanitizer Dispenser with a VL53L0X Laser Eye
VL53L0X লেজার আলো ফিরতে কত সময় লাগে সেটা মেপে দূরত্ব বের করে। নuzzle এর নিচে ১০ সেমি এর মধ্যে হাত দিলে পাম্প এক বার ছিটে দেয়; ২ সেকেন্ডের কুলডাউন আছে।
The VL53L0X times how long laser light takes to bounce back, accurate to millimetres. A hand closer than 10 cm runs the pump for one squirt; a 2-second cooldown keeps one slow hand from emptying the bottle.
সার্কিট ডায়াগ্রাম · Circuit diagram
যা যা লাগবে · Parts you need
- 1 × Arduino Uno R3 Arduino Uno
- 1 × Laser distance sensor (VL53L0X) লেজার দূরত্ব সেন্সর (VL53L0X)
- 1 × Mini water pump (3–6V) ছোট পানির পাম্প (৩–৬V)
- 1 × Buzzer (5 V) Buzzer (বাঁশি, 5 V)
- 1 × Resistor 220Ω Resistor
- 1 × LED (blue) LED বাতি
- 11 × Jumper wires জাম্পার তার
তার লাগানো · Wiring
| Laser distance sensor (VL53L0X) VIN | → | Arduino Uno R3 5V |
| Laser distance sensor (VL53L0X) GND | → | Arduino Uno R3 GND |
| Laser distance sensor (VL53L0X) SDA | → | Arduino Uno R3 A4 |
| Laser distance sensor (VL53L0X) SCL | → | Arduino Uno R3 A5 |
| Mini water pump (3–6V) + | → | Arduino Uno R3 D7 |
| Mini water pump (3–6V) - | → | Arduino Uno R3 GND.3 |
| Buzzer (5 V) + | → | Arduino Uno R3 D8 |
| Buzzer (5 V) - | → | Arduino Uno R3 GND.3 |
| Arduino Uno R3 D13 | → | Resistor a |
| Resistor b | → | LED A |
| LED K | → | Arduino Uno R3 GND.3 |
Code (Arduino C++)
#include <Wire.h>
#include <Adafruit_VL53L0X.h>
// Contactless sanitizer dispenser: the VL53L0X is a tiny laser rangefinder —
// it times how long light takes to bounce back, accurate to a few millimetres.
// A hand under the nozzle (closer than 10 cm) runs the pump for a squirt and
// chirps the buzzer; a 2-second cooldown stops one slow hand from emptying
// the bottle. It is the same sensor family the InfraPulse kit carries.
Adafruit_VL53L0X lox;
int dispenses = 0;
long lastSquirt = -5000;
void setup() {
Serial.begin(115200);
pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(13, OUTPUT);
if (!lox.begin()) { Serial.println("VL53L0X not found"); while (1) delay(10); }
}
void loop() {
VL53L0X_RangingMeasurementData_t measure;
lox.rangingTest(&measure, false);
int mm = measure.RangeStatus != 4 ? measure.RangeMilliMeter : 3000;
bool hand = mm > 20 && mm < 100;
digitalWrite(13, hand ? HIGH : LOW);
if (hand && millis() - lastSquirt > 2000) {
lastSquirt = millis();
dispenses++;
Serial.print("Hand at "); Serial.print(mm);
Serial.print(" mm | Dispensed #"); Serial.println(dispenses);
}
digitalWrite(7, hand && millis() - lastSquirt < 800 ? HIGH : LOW);
digitalWrite(8, hand && millis() - lastSquirt < 800 ? HIGH : LOW);
delay(80);
}
আরো project · More projects
- পানির ট্যাংক অটো-ফিল — পাম্প নিজে নিজে বন্ধ হয়Water tank auto-fill (pump cuts off by itself)
- টিল্ট ট্যাম্পার অ্যালার্ম — নাড়ালেই বাজতে থাকে, রিসেট দিলে থামেTilt tamper alarm (money box screams until reset)
- 18650 ব্যাটারি হেলথ চেকার — তিনটা বাতি দিয়ে রায়18650 battery health checker (traffic-light verdict)
- চুম্বকীয় দরজার গার্ড — রিড সুইচ আর সireন দিয়েMagnetic door guard (reed switch + grace siren)