กลับไปหน้ารวมไฟล์
bluetooth-obstruction-sensor-with-android-app-4f709c-en.md

Wireless Security: The Obstruction Sensor

The Bluetooth Obstruction Sensor is a sophisticated security project that turns a simple distance sensor into a wireless tracking system. By using the physics of SONAR, this device detects objects move within its field of vision and instantly transmits the precise distance to your smartphone. It’s an ideal build for anyone interested in Robotics, Security Systems, or App Development.

The Science of Distance: Ultrasonic Telemetry

The heart of this project is the HC-SR04 sensor. It works by emitting a high-frequency sound pulse ($40\text{kHz}$) and measuring how long it takes for the echo to bounce back from an obstruction.

  1. Trigger & Echo: The Arduino pulses the 'Trig' pin, the sound travels out, hits an intruder, and the 'Echo' pin catches the return.
  2. Distance Calculation: Using the speed of sound ($340\text{m/s}$), the code calculates the distance in centimeters.
  3. Transmission: This numerical data is then piped through the HC-05 Bluetooth Module via SoftwareSerial, sending it through the air to your phone.

Custom App Integration: MIT App Inventor

Unlike many static projects, this build includes a custom-designed Android Application. Developed using MIT App Inventor 2, the app features:

  • Live Data Stream: A real-time display that updates every few milliseconds with the intruder's current distance.
  • Bluetooth Connect/Disconnect: An easy-to-use interface to pair your phone with the sensor module.
  • Visual Indicators: A clean UI that allows the user to see the "Health" of the connection and the status of the sensor.

Setup and Connections

Connecting the components is straightforward:

  • HC-SR04: Scalable VCC ($3.3\text{V}$ or $5\text{V}$), Trig at Pin 7, Echo at Pin 8, and Ground.
  • HC-05: Uses standard UART communication. Remember: TX goes to RX, and RX goes to TX to ensure the flow of data is criss-crossed between the module and the board.

This project is a fantastic demonstration of how IOT (Internet of Things) concepts can be applied to everyday security, providing you with a functional, portable, and wireless tracker.

This is my second project and I'm thrilled with the enthusiasm from the community! In this build, we create a functional obstruction sensor using the ultrasonic HC-SR04 and a Bluetooth HC-05 link. The result is a clean, simple Android app that keeps you informed about your surroundings in real-time. Give it a try!

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

title: "Bluetooth Obstruction Sensor with Android App"
description: "A smart wireless security and tracking system that uses ultrasonic waves to detect intruders and visualize their distance on a smartphone."
author: "Druhi_C"
category: "Sensors & Environment"
tags:
  - "security"
  - "ultrasonic"
  - "bluetooth"
  - "tracking"
  - "automation"
views: 516
likes: 1
price: 1120
difficulty: "Easy"
components:
  - "1x Arduino UNO"
  - "1x HC-SR04 Ultrasonic Distance Sensor"
  - "1x HC-05 Bluetooth Module"
  - "1x Breadboard (generic)"
  - "1x Female/Female Jumper Wires"
  - "1x Female/Male Jumper Wires"
tools: []
apps:
  - "1x MIT App Inventor 2"
  - "1x Arduino IDE"
  - "1x Arduino Web Editor"
downloadableFiles: []
documentationLinks:
  - "https://github.com/gamegine/HCSR04-ultrasonic-sensor-lib"
passwordHash: "b9cfc8b9a4e26265477ff44adde7af96bdda06bda91f5c0a27f1957b6c583b4e"
encryptedPayload: "U2FsdGVkX19CUjb6YT4qRcgcMfXDSAtP+fY6qbl3nXKDaIMNWPJVSSlNXpSweFE68w6CgSyEGnK70BWrXn/f5xr7AQ9laTdDaL2DHEBb3G+XR3W2ptknjLLKAZ5mjosWl/T28ML0ZREaAL6hTJb5ICbUjfCuYL57G1Z8chzQxik="
seoDescription: "Build a DIY Bluetooth Obstruction Sensor. Learn to use HC-SR04 and HC-05 to create a wireless distance-tracking app for Android using MIT App Inventor."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/bluetooth-obstruction-sensor-with-android-app-4f709c_cover.jpg"
lang: "en"