สวัสดีทุกคน ในโปรเจกต์นี้ ผมจะมาแสดงวิธีทำ
Led distance measurement using ultrasonic sensor and Arduino
.มันง่ายมาก
การเชื่อมต่อมีดังนี้
การเชื่อมต่อ LED
anode = digital pins cathode = gnd
การเชื่อมต่อ ultrasonic sensor
vcc = 5v
gnd = gnd
trig = digital pin 10
Echo = digital pin 11
หากมีข้อสงสัยใด ๆ โปรดคอมเมนต์
รายละเอียดทางเทคนิคเพิ่มเติม
พื้นฐานการไล่ระดับความใกล้เคียงด้วยภาพ
คู่มือทางเทคนิคสำหรับการสร้าง "กราฟแท่งระยะทาง" โดยใช้ LED strip หรือแถวของ LED ซึ่งให้การตอบสนองด้วยภาพที่เข้าใจง่ายเกี่ยวกับความใกล้เคียงของวัตถุ
- HC-SR04 Sonar Timing Kernel: Arduino จะจับระยะทางเป็นเซนติเมตร จากนั้น firmware จะ "Map" ระยะทางนี้ (เช่น 0-50cm) ไปยังจำนวน LED ที่สว่างอยู่
- Rainbow Proximity Shift: (ความสวยงาม) เมื่อวัตถุเข้ามาใกล้ขึ้น, Arduino จะเปลี่ยนสีของ addressable LED strip จาก Green (ปลอดภัย) เป็น Yellow (ระมัดระวัง) ไปยัง Red (วิกฤต) ซึ่งให้สัญญาณ "อันตราย" ที่ชัดเจน
การสร้างต้นแบบ
- Verified with Arduino IDE: ได้รับการปรับแต่งเพื่อประสิทธิภาพที่เสถียร 100% และปราศจากการกระพริบของจอแสดงผล ทำให้เหมาะอย่างยิ่งสำหรับ garage parking aids หรือ factory safety sensors.
ข้อมูล Frontmatter ดั้งเดิม
title: "Led distance measurement using ultrasonic sensor and aurdino"
description: "After making this project you see distances using leds"
author: "brillianttechnoz"
category: ""
tags:
- "leds"
- "distance mesurement"
- "hc-sr04"
views: 12463
likes: 3
price: 1120
difficulty: "Easy"
components:
- "1x Ultrasonic Sensor - HC-SR04 (Generic)"
- "1x Breadboard (generic)"
- "1x Arduino UNO"
- "10x LED (generic)"
- "1x Jumper wires (generic)"
tools: []
apps:
- "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "3538c442bcd75f69028db05062903fb5604bab611c864c68de8734a9f8f23b3c"
encryptedPayload: "U2FsdGVkX1+y/srWyRffDIOll5+8TESr4/aguubMQSSxTbAXUYdFxNuww7HhxzTLLZi2Iz/482iK0Kgd8/iFEoc+bgh2G7xfi30afd7aSfo="
seoDescription: "Measure distance with Ultrasonic Sensor and Arduino. Display readings using LED indicators. Simple DIY electronics project."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/led-distance-measurement-using-ultrasonic-sensor-and-aurdino-08ee14_cover.jpg"
lang: "th"