Overview
The HC-SR04 is a popular ultrasonic distance measuring module capable of detecting objects from 2 cm to 400 cm with high accuracy (±3 mm). It uses ultrasonic sound pulses (40 kHz) to calculate distance, making it ideal for robotics, obstacle avoidance, and proximity sensing projects. Works seamlessly with Arduino, ESP32, ESP8266, Raspberry Pi, and other microcontrollers.
Introduction / แนะนำสินค้า
HC-SR04 เป็น Ultrasonic Distance Sensor ที่ได้รับความนิยมสูงในโปรเจกต์ DIY และ Robotics วัดระยะได้ตั้งแต่ 2 - 400 cm ด้วยความแม่นยำ ±3 mm ใช้งานง่ายผ่าน Trigger/Echo pin รองรับ Arduino, ESP32, ESP8266, Raspberry Pi และ MCU ทุกรุ่น เหมาะสำหรับงาน obstacle avoidance, parking sensor, water level sensor และ smart home
Features / คุณสมบัติ
- Measuring range: 2 cm to 400 cm
- High accuracy: ±3 mm
- Operating voltage: DC 5V
- Simple 4-pin interface: VCC, Trig, Echo, GND
- Low current consumption: 15 mA during operation, 3 mA static
- Ultrasonic frequency: 40 kHz
- Beam angle: 15 degrees
- Compatible with Arduino, ESP32, ESP8266, Raspberry Pi
- Ideal for obstacle avoidance, robotics, parking sensor, water level measurement
Specification / สเปค
- Model: HC-SR04
- Operating Voltage: DC 5V
- Operating Current: 15 mA (working), 3 mA (static)
- Ultrasonic Frequency: 40 kHz
- Measuring Range: 2 cm - 400 cm
- Accuracy: ±3 mm
- Measuring Angle: 15 degrees
- Trigger Input Signal: 10 µs TTL pulse
- Echo Output Signal: TTL (proportional to distance)
- Dimensions: 45 x 20 x 15 mm
Caution / ข้อควรระวัง
- ใช้แรงดัน DC 5V เท่านั้น -- ห้ามต่อกับแหล่งจ่าย 3.3V โดยตรง (ใช้ logic level converter ถ้าจำเป็น)
- Echo pin ของ HC-SR04 output 5V -- ถ้าต่อกับ ESP32 หรือ Raspberry Pi (3.3V logic) ต้องใช้ voltage divider หรือ level shifter
- ระยะต่ำสุด 2 cm -- วัตถุที่ใกล้กว่านี้อาจให้ค่าผิดพลาด
- หลีกเลี่ยงการวัดในพื้นผิวที่ดูดซับเสียง เช่น ผ้า ฟองน้ำ
Datasheet
HC-SR04 Datasheet (PDF)
Manual
Not available -- ดูตัวอย่างการใช้งานกับ Arduino ได้จากเว็บไซต์สินค้า