About this product
ประเภทของการรับประกันการรับประกันของผู้ผลิต
Product description
Sensor Ultrasonic Module HC-SR04 เป็น Sensor Arduino แบบ ดิจิตอล หลักการทำงานใช้วิธีการส่งเคลื่อนเสียง Ultrasonic ที่ความถี่ 40kHz แล้วให้สะท้อนกลับวัตถุแล้วคำนวณจับเวลาเพื่อวัดระยะทาง ความแม่นยำอยู่ที่ 2-400 CM ใช้งานง่ายมีไลบารี่มาตราฐานพร้อมใช้งาน ใช้งานได้ง่าย กับ Arduino
HC-SR04 เป็นเซ็นเซอร์วัดระยะทางด้วยคลื่นอัลตราโซนิคส์ (Ultrasonic Sensor) ที่ใช้งานร่วมกับบอร์ด Arduino หรือไมโครคอนโทรลเลอร์อื่นๆ เพื่อวัดระยะทางจากเซ็นเซอร์ถึงวัตถุหรือผ่านวัตถุนั้น ๆ โดยทำงานด้วยการส่งสัญญาณเสียงคลื่นชนิดอัลตราโซนิคส์ออกไป แล้วรอรับสัญญาณเสียงคลื่นที่ถูกส่งกลับมาหลังจากนั้นนับเวลาเพื่อคำนวณหาค่าระยะทาง
HC-SR04 มีความแม่นยำในการวัดระยะทางได้สูงถึงเมตร และเชื่อมต่อได้ผ่านพอร์ตไฟหรือ VCC 5V และ GND และมีสัญญาณออกเป็น Digital และ Analog เพื่อสามารถนำมาใช้งานกับ Arduino ได้อย่างสะดวก สามารถนำไปใช้ในหลายแอปพลิเคชัน เช่น หุ่นยนต์ที่ต้องการเคลื่อนที่ไปสู่จุดที่ตั้งไว้อย่างแม่นยำ หรือระบบตรวจจับความเต็มที่ของถังน้ำ และอื่น ๆ
The HC-SR04 is an ultrasonic distance sensor that can be used to measure the distance of an object from a fixed point. It works by emitting an ultrasonic sound wave, and measuring the time it takes for the wave to bounce back after it hits an object.
The HC-SR04 sensor has four pins: Vcc (positive power supply), Trig (Trigger), Echo (Echo), and GND (ground). To use the sensor with an Arduino, you will need to connect the Vcc pin to the 5V pin on the Arduino, the GND pin to the GND pin on the Arduino, the Trig pin to a digital pin on the Arduino (this is used to trigger the measurement), and the Echo pin to another digital pin on the Arduino (this is used to read the measurement).
In order to measure the distance of an object, you will need to send a short pulse to the Trig pin, and then measure the time it takes for the Echo pin to go from LOW to HIGH. The distance of the object can be calculated using the speed of sound and the time it takes for the sound wave to travel to the object and back.
You can find example arduino code and library that can help you to get distance from HC-SR04
•Power Supply :+5V DC
•Quiescent Current : 2mA
•Working Currnt: 15mA
•Effectual Angle: 15
•Ranging Distance : 2cm 400 cm/1" - 13ft
•Resolution : 0.3 cm
•Measuring Angle: 30 degree
•Trigger Input Pulse width: 10uS
•Dimension: 45mm x 20mm x 15mm
•Sensor Ultrasonic Module HC-SR04 Distance จำนวน 1 ชิ้น
pinMode(trigPin, OUTPUT);
digitalWrite(trigPin, LOW);
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
Serial.print("Distance: ");
Serial.println(distance);