HY-SRF05 Ultrasonic Range Finder Module

Uses ultrasonic sound waves to detect obstacles and measure distance DESCRIPTION The HY-SRF05 Ultrasonic Range Finder Module...
Vendor: Keszoox
$2.95
$3.95
$2.95

Shipping

The shipping fee depends on your address

Standard: 9-15 business days,fee is down to $3.99

Express: 4-7 business days,fee is down to $5.99

Support Customization

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.

Built And process your order

We make into production usually Within 1 - 3 Bussiness Days.

Expect customization orders.
HY-SRF05 Ultrasonic Range Finder Module

HY-SRF05 Ultrasonic Range Finder Module

$3.95 $2.95

HY-SRF05 Ultrasonic Range Finder Module

$3.95 $2.95

Uses ultrasonic sound waves to detect obstacles and measure distance

DESCRIPTION

The HY-SRF05 Ultrasonic Range Finder Module uses ultrasonic sound waves to detect the presence of and measure the distance to objects in front of it.

PACKAGE INCLUDES:

  • HY-SRF05 Ultrasonic Range Finder Module

KEY FEATURES OF HY-SRF05 ULTRASONIC RANGE FINDER MODULE:

  • 2cm -450cm (15 feet) detection range
  • 40 kHz operation
  • ±15 degree field of view
  • 5V operation

The detection and measurement range is from 2 cm up to 450 cm which is about 15 feet with a stated accuracy of ± 2mm.  The ultrasonic sound is pulsed at 40 kHz and is not audible to the human ear.  The HY-SRF05 is a higher precision version of the HC-SR04, but otherwise is similar in functionality.

These modules are commonly used on robotic vehicles for obstacle detection and avoidance.  Because they use sound waves for detection they are not sensitive to light sources or optically reflective surfaces like IR can be.  In addition, by using sound instead of light, it is possible to measure the time that it takes for the sound to be echo’d back and therefore the distance to the object can be calculated with a fair amount of accuracy which can be quite handy.

The modules have a ‘view’ of about ±15 degrees, so they are sometimes mounted to a servo motor so that the sensor can ‘look-around’ at its surroundings.  The fact that the sensors look like a couple of eyes adds to the cool factor as well.

The way the HY-SRF05 Ultrasonic Range Finder Module works is as follows:

  1. The module is normally idle.
  2. A 10uSec or wider logic HIGH pulse is sent to the TRIG pin on the module, usually by a microcontroller.  This will cause the module to start a detection cycle.
  3. The module emits eight bursts of 40KHz sound and sets it’s ECHO pin output HIGH.
  4. When the signal is reflected back from an object and is detected by the module, the ECHO pin is set back to LOW.
  5. By measuring the amount of time that the ECHO pin is held HIGH, the distance to the object can be calculated using the basic formula  (Time that ECHO is held HIGH * Speed of sound / 2)  The divide by 2 is because the sound has to travel in both directions (both out and back) and we want to know just the out distance.

If an echo is not returned (no object detected or signal is blocked), the module will still lower the ECHO pin after a fixed delay.  This delay may vary, but is about 200mSec on the modules that I have measured.  This is required to prevent the module from hanging if there is no return echo.  If you run the test software shown down below and then block the sensor with your hand , you will see what is returned when no obstacle is detected.  This is typically something along the lines of 110 feet.  To be safe, it is generally best to assume that any reading over about 15 feet is the same as no obstacle being detected.

The speed of sound varies a bit with the air temperature, so for maximum accuracy the air temperature can be measured and used to calculate the current speed of sound, but it is not required for basic collision detection purposes.

Module Connections:

There is a 5-pin header on the assembly.  The GND pin is connected to the system ground and the Vcc pin is connected to 5V.  The TRIG pin is an input pin on which a 10uSec pulse is applied to start the measurement cycle.  The ECHO pin is an output pin that is held HIGH for the duration of the time from when the module sends a 40KHz pulse out until it receives the echo back.  The OUT pin is not used.

1 x 5 Header

  • VCC –   Connect to 5V.
  • TRIG –   Trigger Input – Connect to any digital output pin on MCU.  A 10uSec or wider pulse starts a measurement cycle
  • ECHO –  Echo Output – Connect to any digital input pin on MCU.  This pin is held high for the duration of the the measurement cycle.
  • OUT –    Not used
  • GND –  Connect to system ground.  This ground needs to be in common with the MCU.

OUR EVALUATION RESULTS:

This is a commonly used module for obstacle detection and basic range finding.  These are much more capable than the basic IR obstacle avoidance sensors that come in sensor kits and are highly recommended if you are building a motorized robotic car and want to implement a nicely capable obstacle avoidance system or just want to measure distance or presence of an object in front of the sensor for some other reason.  The module has a built-in small microprocessor which does all the heavy lifting of managing the ultrasonic sensors.

A similar sensor module that takes care of the of echo timing and temperature measurement for you is the US-100 as shown down below.

The program below implements a basic setup where the  measured range is displayed in centimeters, inches and feet.  Since the speed of sound varies with the temperature, for maximum accuracy the temperature can be measured and used in the calculation, so this is broken out in the code below but defaults to 20C.  It would be straight forward for instance to implement a DS18B20 or LM35 temperature sensor so that the actual temperature can be measured and used in the calculation.

HY-SRF05 Ultrasonic Range Finder Module Program

/*
 * HY-SRF05 Test
 *
 * Exercises the ultrasonic range finder module and prints out the current measured distance
 * VCC - connect to 5V
 * GND - connect to ground
 * TRIG - connect to digital pin 12.  Can be any digital pin
 * ECHO - connect to digital pin 13.  Can be any digital pin
 * OUT - Not connected
 */
const int TRIG_PIN = 12;
const int ECHO_PIN = 13;
float temp_In_C = 20.0;  // Can enter actual air temp here for maximum accuracy or read with sensor
float speed_Of_Sound;          // Calculated speed of sound based on air temp
float distance_Per_uSec;      // Distance sound travels in one microsecond at that temp

//===============================================================================
//  Initialization
//=============================================================================== 
void setup() {
  pinMode(TRIG_PIN,OUTPUT);
  pinMode(ECHO_PIN,INPUT);
  // Formula to calculate speed of sound in meters/sec based on temp
  speed_Of_Sound = 331.1 +(0.606 * temp_In_C);  
  // Calculate the distance that sound travels in one microsecond in Centimeters
  distance_Per_uSec = speed_Of_Sound / 10000.0;
  Serial.begin(9600);
}
//===============================================================================
//  Main
//===============================================================================
void loop() {
  float duration, distanceCm, distanceIn, distanceFt;
 
  digitalWrite(TRIG_PIN, HIGH);       // Set trigger pin HIGH 
  delayMicroseconds(10);              // Hold pin HIGH for 10 uSec
  digitalWrite(TRIG_PIN, LOW);        // Return trigger pin back to LOW again.
  duration = pulseIn(ECHO_PIN,HIGH);  // Measure time in uSec for echo to come back.
 
  // convert the time data into a distance in centimeters, inches and feet
  duration = duration / 2.0;  // Divide echo time by 2 to get the time for the sound to travel in one direction
  distanceCm = duration * distance_Per_uSec;
  distanceIn = distanceCm / 2.54;
  distanceFt = distanceIn / 12.0;
   
  if (distanceCm <= 0){
    Serial.println("Out of range");
  }
  else {
    Serial.print(duration, 0);
    Serial.print("uSec, ");
    Serial.print(distanceCm, 0);
    Serial.print("cm,  ");
    Serial.print(distanceIn,0);
    Serial.print("in, ");
    Serial.print(distanceFt,1);
    Serial.print("ft, ");
    Serial.println();
  }
  delay(1000);  // Delay between readings
}

The board has a 2 small holes that can be used for mounting if desired.  There is also a plastic holder available to mount the module as shown below.

BEFORE THEY ARE SHIPPED, THESE MODULES ARE:

  • Inspected
  • Basic obstacle detection and range finding operation verified
  • Packaged in a high quality resealable ESD bag for protection and easy storage.

Notes: 

  1. Active circuitry is on the back of the module, so care should be used to avoid possible electrical shorts.

TECHNICAL SPECIFICATIONS

Maximum Ratings
          Vcc 4.5 – 5.5V  (5V typical)
          IMax Maximum Current Draw 40 mA
Operating Ratings
          Frequency Detector Center Frequency 40 kHz
          Trigger Pulse Width >= 10uSec
          Detection Distance 2 cm – 450 cm
          Measurement Resolution 2 mm (typical)
          Detection Angle < 15 degrees
Dimensions L x W (PCB) 45 x 21 mm (1.77 x 0.8″)
W x H (Ultrasonic Sensors) 16 x 12 mm (0.62 x 0.47″)
Country of Origin China

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

Contact us:
Support@keszoox.com
What we can help:
If you're looking for a wire or cable assembly, we can help.
What we need your help next:
Kindly contact us via email support@keszoox.com and send us the details fo your need, then we'll let you know how we can deliver the right solution.

Shipping Policy

All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.

Shipping Times

Standard: 9-15 business days. Express: 4-7 business days.

Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.

Tracking

All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.

Related Products

Recently Viewed Products