,

Ultrasonic HC-SR04 DISTANCE Measuring module

Availability:

83 in stock


This ultrasonic sensor module can be used for measuring distance, object sensor, motion sensors etc. High sensitive module can be used with microcontroller to integrate with motion circuits to make robotic projects and other distance, position & motion sensitive products.The module sends eight 40Khz square wave pulses and automatically detects whether it receives the returning signal. If there is a signal returning, a high level pulse is sent on the echo pin. The length of this pulse is the time it took the signal from first triggering to the return echo.

100.30 Price Including GST

83 in stock

Compare

Ultrasonic HC-SR04 DISTANCE Measuring module

Product information:
1.Working Voltage : 5V(DC)
2.Static current: Less than 2mA.
3.Output signal: Electric frequency signal, high level 5V, low level 0V.
4.Sensor angle: Not more than 15 degrees.
5.Detection distance: 2cm-450cm.
6.High precision: Up to 0.3cm
7.Input trigger signal: 10us TTL impulse
8.Echo signal : output TTL PWL signal

Mode of connection:
1.VCC
2.trig(T)
3.echo(R)
4.GND

Use method:
Supply module with 5V, the output will be 5V while obstacle in range, or 0V if not.The out pin of this module is used as a switching output when anti-theft module, and without the feet when ranging modules.
Note : the module should be inserted in the circuit before been power, which avoid producing high level of misoperation;if not, then power again.

Module Working Principle:
1.Adopt IO trigger through supplying at least 10us sequence of high level signal.
2.The module automatically send eight 40khz square wave and automatically detect whether receive the returning pulse signal.
3.If there is signals returning, through outputting high level and the time of high level continuing is the time of that from the ultrasonic transmitting to receiving. Test distance = (high level time * sound velocity (340M/S) / 2.

Note : This module is not suitable to connect with electric power, if you need to connect this module with electronic power,then let the GND terminal of this module to be connected first,otherwise, it will affect the normal work of the module

Please Read Below the Coding parameter.

 

Connect the VCC to 5V and GND to GND. Connect Trig to Pin 13 and Eco to pin 12 and run the code below.

 

#define trigPin 13

#define echoPin 12

void setup() {

Serial.begin (9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

}

void loop() {

long duration, distance;

digitalWrite(trigPin, LOW); // Added this line

delayMicroseconds(2); // Added this line

digitalWrite(trigPin, HIGH);

delayMicroseconds(10); // Added this line

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration/2) / 29.1;

if (distance < 4) { //Do something

}

else { //Do Something

}

if (distance >= 200 || distance <= 0){

Serial.println(“Out of range”);

}

else {

Serial.print(distance);

Serial.println(” cm”);

}

delay(500);

}

SKU: CE-M007 Categories: , Tags: ,

Based on 0 reviews

0.0 overall
0
0
0
0
0

Be the first to review “Ultrasonic HC-SR04 DISTANCE Measuring module”

There are no reviews yet.

WhatsApp chat