Tekko BDSimSimulatorProjects

কনট্যাক্টছাড়া স্যানিটাইজার — 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.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Contactless Sanitizer Dispenser with a VL53L0X Laser Eye circuit diagram — Arduino Uno R3, Laser distance sensor (VL53L0X), Mini water pump (3–6V), Buzzer (5 V), Resistor 220Ω, LED (blue), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · 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