Tekko BDSimSimulatorProjects

লেজার ট্রিপওয়্যায়ার সিকিউরিটি অ্যালার্মLaser Tripwire Alarm with Arduino (KY-008 + LDR)

KY-008 laser LDR module এর দিকে লাল beam দেয়, তখন AO pin কম পড়ে (উজ্জ্বল)। কেউ beam ভাঙলে sensor অন্ধকার হয়ে যায়, পড়া ক্যালিব্রেট করা লেভেল পার হয়ে যায়, আর sketch টা siren বাজায়, LED স্ট্রোব করে।

The KY-008 shines a red beam onto the LDR module, so its AO pin reads low (bright). When somebody breaks the beam the sensor goes dark, the reading jumps past the calibrated level, and the sketch sounds a tone siren while the LED strobes.

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

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

Laser Tripwire Alarm with Arduino (KY-008 + LDR) circuit diagram — Arduino Uno R3, Laser module (KY-008), Light sensor module (LDR), Buzzer (5 V), LED (red), Resistor 330Ω, Jumper wires

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

তার লাগানো · Wiring

Arduino Uno R3 D7→Laser module (KY-008) S
Laser module (KY-008) -→Arduino Uno R3 GND.3
Light sensor module (LDR) VCC→Arduino Uno R3 5V
Light sensor module (LDR) GND→Arduino Uno R3 GND
Light sensor module (LDR) AO→Arduino Uno R3 A0
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++)

// Laser tripwire: the KY-008 shines a red beam across the doorway into the
// LDR module. Beam lands on the sensor -> AO reads LOW (bright). Someone
// walks through, the LDR goes dark, AO jumps past the calibrated dark level
// -> the siren sounds and the strobe flashes until the beam returns.
// Real build: never look into a laser beam, never aim one at anyone's eyes.
const int DARK = 600;            // calibrated dark level for this room

void setup() {
  pinMode(7, OUTPUT);            // laser module (S pin)
  pinMode(8, OUTPUT);            // siren
  pinMode(13, OUTPUT);           // strobe LED
  digitalWrite(7, HIGH);         // beam on - aim it, then keep hands clear
  Serial.begin(9600);
}

void loop() {
  int reading = analogRead(A0);  // low with the beam on it, ~1023 when it breaks
  bool tripped = reading > DARK;
  digitalWrite(13, tripped && (millis() / 300) % 2 == 0 ? HIGH : LOW);  // strobe
  if (tripped) tone(8, 2000); else noTone(8);
  Serial.print("AO: "); Serial.print(reading);
  Serial.println(tripped ? "  TRIP!" : "  clear");
  delay(100);
}

আরো project · More projects