กลับไปหน้ารวมไฟล์
diy-security-alarm-using-lcd-and-ultrasonic-sensor-0a42ac-en.md

Connect me on Youtube

https://www.youtube.com/channel/UC0e1GXy-etqAIfIv1iHESRA?sub_confirmation=1

In this project I will show you how to make DIY Arduino Based Security Alarm

This project will help the People to identify the Distance of an object from the Sensor and shows the level of Risk through LED, LCD and Buzzer.

It's Glows different type of LED based on Distance and Make Different type of Alarm

When there is no Object it Glows green LED and Display Safe no Risk on LCD

Glowing Green LED and Displaying Safe in LCD

When there is Object between 150 cm to 250 cm it Glows 1 Blue LED and Buzzer starts Beeping with Different Tune in Gap of 2 Second and LCD Display's Low Risk

When there is Object between 100 cm to 150 cm it Glows 2 Blue LED and Buzzer starts Beeping with Different Tune in Gap of 1.2 Second and LCD Display's Medium Risk

When there is Object between 25 cm to 100 cm it Glows 3 Blue LED and Buzzer starts Beeping with Different Tune in Gap of 0.7 Second and LCD Display's High Risk

Glowing 3 Blue LED and Displaying High Risk in LCD

When there is Object between 1 cm to 25 cm it Glows all 4 Blue LED and Buzzer starts Beeping with Different Tune in Gap of 0.1 Second and LCD Display's Extreme Risk

Glowing 4 Blue LED and Displaying Extreme Risk in LCD

Watch Video

Proximity Defense: Ultrasonic Security Alarm

The Ultrasonic Security Alarm is an excellent fusion project. It takes the basic "Ping" distance sensor and elevates it into a complete, standalone electronic product featuring a user interface, visual logging, and audio deterrence.

The Logic of the Safe Zone

The code establishes a variable safeZone = 100 (centimeters).

  1. Monitoring: The HC-SR04 sensor bounces sound waves down a hallway.
  2. The LCD: It constantly prints "Status: ALL CLEAR" and the current distance (e.g., "Dist: 150cm") on a 16x2 Text LCD.
  3. The Intruder: When someone walks into the hallway, the distance reading drops to 80cm.
  4. The Breach: Since 80 < safeZone, the Arduino triggers the alarm sequence. The LCD screen wipes and flashes "INTRUDER ALERT!" while a piezo siren blares.

Recommended Hardware

  • Arduino Uno/Nano: The command logic.
  • HC-SR04 Ultrasonic Sensor: The detector.
  • 16x2 I2C LCD Screen.
  • Active 5V Buzzer or Relay to a 12V Siren.
  • Hidden Reset Button: Used by the owner to disable the alarm after it trips.

Why use an LCD?

Adding an LCD transforms the project from a toy into a tool. It allows you to debug the sensor in real-time (to see exactly where the "ghost" reflections are bouncing off side walls) and allows the user to confirm the system is armed and active before leaving the room.

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "krishna_agarwal"
category: "Security"
components:
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
  - "1x 5 mm LED: Green"
  - "1x Alphanumeric LCD, 16 x 2"
  - "4x 5 mm LED: Red"
  - "1x Buzzer"
  - "1x Arduino UNO"
  - "1x Resistor 1k ohm"
description: "Set the perimeter! Build a security system that logs intruder distance on a screen and sounds a deafening alarm if a threshold is crossed."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX1/z81/LiEf9I7MmyY+qAFYmkiGIsBH2Eak5ygEQisBTc25R8qmN19M/E0Sl+g6lUokobpGLZxrDjhbhnTouxPC225//vbAUtUI="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/diy-security-alarm-using-lcd-and-ultrasonic-sensor-0a42ac_cover.jpg"
lang: "en"
likes: 1
passwordHash: "b3e0adea1286b80f0e6cd1ea6ad719d0afca6af1e62ccc88368b65231dad5dad"
price: 1120
seoDescription: "Build a DIY Security Alarm using LCD and Ultrasonic Sensor with custom Alerting Sound and LED indicators based on Distance."
tags:
  - "ultrasonic sensor"
  - "arduino r3"
  - "ultrasonic sensor"
  - "buzzer"
  - "ir sensor"
  - "arduino"
  - "breadboard"
  - "led"
  - "security"
  - "lcd"
  - "hc-sr04"
  - "alarm"
title: "DIY Security Alarm using LCD and Ultrasonic Sensor"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/7c2ErZGNnWI"
views: 9996