HC-SR04P Ultrasonic module
Shopee

HC-SR04P Ultrasonic module

4.7
ขายแล้ว 2 ชิ้น
฿45
Rvada ตรวจสอบราคา

ราคาถูกผิดปกติ (5% ของค่าเฉลี่ยหมวด) ควรตรวจสอบร้านค้าก่อนซื้อ

ช็อป99
แบรนด์: NoBrand
ซื้อที่ Shopee

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

ลิงก์นี้เป็นลิงก์พันธมิตร เราอาจได้รับค่าคอมมิชชั่นจากการสั่งซื้อ โดยราคาที่คุณจ่ายไม่เปลี่ยนแปลง

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

module HC-SR04P Ultrasonic ปรับปรุงจาก HC-SR04 ช่วงการวัด ประมาณ 2 cm ถึง 450 cm 5v

โมดูล HC-SR04P สำหรับวัดระยะห่างด้วยคลื่นอัลตราโซนิค (ใช้คลื่นเสียงความถี่ ประมาณ 40kHz) มีสองส่วนหลักคือ ตัวส่งคลื่นที่ทำหน้าที่สร้างคลื่นเสียงออกไปในการวัดระยะแต่ละครั้ง ("Ping") แล้วเมื่อไปกระทบวัตถุหรือสิ่งกีดขวาง คลื่นเสียงถูกสะท้อนกลับมายังตัวรับแล้วประมวลผลด้วยวงจรอิเล็กทรอนิกส์ภายในโมดูล ถ้าจับเวลาในการเดินทางของคลื่นเสียงในทิศทางไปและกลับ และถ้าทราบความเร็วเสียงในอากาศ ก็จะสามารถคำนวณระยะห่างจากวัตถุกีดขวางได้



- Operating Voltage: DC3 - 5V
- Quiescent Current:
- Working Current: 2.8mA @ 5V
- Working Frequency: 40Hz
- Effective Angle:
- 5V: 2cm - 450cm
- 3.3V: 2cm - 400cm
- : -20 ℃ - 80 ℃
- Ranging Distance: 2cm - 4m
- Measuring Angle: 15 degree
- Trigger Input Signal: 10uS TTL pulse
- Echo Output Signal: Input TTL lever signal and the range inproportion
- Dimension: 45*20*15mm
- Weight: 8.5g
- data sheet :คลิก


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

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


float trigPin = 13; // Trigger
float echoPin = 12; // Echo
float duration, cm, inches;

void setup() {
//Serial Port begin
Serial.begin (115200);
//Define inputs and outputs
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
// The sensor is triggered by a HIGH pulse of 10 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Read the signal from the sensor: a HIGH pulse whose
// duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);

// Convert the time into a distance
cm = (duration/2) / 29.1; // Divide by 29.1 or multiply by 0.0343
inches = (duration/2) / 74; // Divide by 74 or multiply by 0.0135

Serial.print(inches);
Serial.print("in, ");
Serial.print(cm);
Serial.print("cm");
Serial.println();

delay(250);
}

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