HY-SRF05 Ultrasonic module
Shopee

HY-SRF05 Ultrasonic module

5.0
ขายแล้ว 2 ชิ้น 0 ครั้ง
฿55
ช็อป99
แบรนด์: NoBrand
ซื้อที่ Shopee

คุณจะถูกนำไปยัง Shopee

รายละเอียดสินค้า

module HY-SRF05 Ultrasonic 5 pin ช่วงการวัด ประมาณ 2 cm ถึง 4.5 m

โมดูล HY-SRF05 สำหรับวัดระยะห่างด้วยคลื่นอัลตราโซนิค (ใช้คลื่นเสียงความถี่ ประมาณ 40kHz) มีสองส่วนหลักคือ ตัวส่งคลื่นที่ทำหน้าที่สร้างคลื่นเสียงออกไปในการวัดระยะแต่ละครั้ง ("Ping") แล้วเมื่อไปกระทบวัตถุหรือสิ่งกีดขวาง คลื่นเสียงถูกสะท้อนกลับมายังตัวรับแล้วประมวลผลด้วยวงจรอิเล็กทรอนิกส์ภายในโมดูล ถ้าจับเวลาในการเดินทางของคลื่นเสียงในทิศทางไปและกลับ และถ้าทราบความเร็วเสียงในอากาศ ก็จะสามารถคำนวณระยะห่างจากวัตถุกีดขวางได้
Specifications
- Trigger Pin Format: 10 uS digital pulse
- Sound Frequency: 40 kHz
- Echo Pin Output: 0-Vcc
- Echo Pin Format: output is DIGITAL and directly proportional with range. See our conversion formula above.
- Measurement Range: 2cm to ~4.5m
- Measurement Resolution: 0.3cm
- Measurement Angle: up to 15 deg
- Measurement Rate: 40 Hz
- Supply Voltage: 4.5V to 5.5V
- Supply Current: 10 to 40mA
- Connector: standard 5-pin male connector which can plug directly into breadboards.




code:ตัวอย่าง
/*
Arduino with Test Ultrasonic
For complete project details, visit:Arduinoshop99

*
* Complete Guide for Ultrasonic Sensor HY-SRF05
*
Ultrasonic sensor Pins:
VCC: +5VDC
Trig : Trigger (INPUT) - Pin13
Echo: Echo (OUTPUT) - Pin 12
GND: GND
*/

float TRIG_PIN = 13;
float ECHO_PIN = 12;

void setup() {
// initialize serial communication:
Serial.begin(9600);

pinMode(TRIG_PIN,OUTPUT);
pinMode(ECHO_PIN,INPUT);
}

void loop()
{
float duration, distanceCm, distanceIn;

// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
duration = pulseIn(ECHO_PIN,HIGH);

// convert the time into a distance
distanceCm = duration / 29.1 / 2 ;
distanceIn = duration / 74 / 2;

if (distanceCm
Serial.println("Out of range");
}
else {
Serial.print(distanceIn);
Serial.print("in, ");
Serial.print(distanceCm);
Serial.print("cm");
Serial.println();
}
delay(1000);
}



At a quick glance there are only small differences between these two:
HC-SR04 HY-SRF05
Working Voltage 5 VDC 5 VDC
Static current
Output signal: Electric frequency signal, high level 5V, low level 0V Electric frequency signal, high level 5V, low level 0V
Sensor angle
Detection distance (claimed) 2cm-450cm 2cm-450cm
precision ~3 mm ~2 mm
Input trigger signal 10us TTL impulse 10us TTL impulse
Echo signal output TTL PWL signal output TTL PWL signal
Pins - VCC
- trig(T)
- echo(R)
- GND
- VCC
- trig(T)
- echo(R)
- OUT
- GND

สินค้าที่เกี่ยวข้อง