Ultrasonic Range Detector Distance Sensor HY-SRF05 (2cm - 400cm) 2mm Resolution

  • Was  RM17.00 
  • RM8.50

  • Product Code: HY-SRF05
  • Availability: In Stock

The SRF05 is an evolutionary step from the SRF04, and has been designed to increase flexibility, increase range, and to reduce costs still further. As such, the SRF05 is fully compatible with the SRF04. Range is increased from 3 meters to 4 meters. A new operating mode (tying the mode pin to ground) allows the SRF05 to use a single pin for both trigger and echo, thereby saving valuable pins on your controller. When the mode pin is left unconnected, the SRF05 operates with separate trigger and echo pins, like the SRF04. The SRF05 includes a small delay before the echo pulse to give slower controllers such as the Basic Stamp and Picaxe time to execute their pulse in commands.
 
Features
  • Provides precise, non-contact distance measurements to 4 m range
  • Ultrasonic measurements work in any lighting condition, making this a good choice to supplement infrared object detectors
  • 5-pin header (2.54 mm spacing) makes it easy to connect to a development board, directly or with an extension cable, no soldering required
  • Narrow acceptance angle
 
Application Ideas
  • Security systems
  • Interactive animated exhibits
  • Parking assistant systems
  • Robotic navigation
 
Details
  • Range: Approximately to 4 m (12 feet)
  • Resolution: 2 mm
  • Power requirements: +5 VDC
  • Current: 10 – 40 mA active
  • Effectual angle: <15°
  • Sound Frequency: 40 kHz
  • Input trigger signal: 10us TTL impulse
  • Communication: positive TTL pulse
  • Dimensions: 22 x 46 x 16 mm(0.81 x 1.8 x 0.6 in )
  • Operating temperature range: 0 to +70 °C (+32 to +158 °F)

 

Pins

  1. VCC
  2. trig(T)
  3. echo(R) – Digital Signal; 0-Vcc(5v)
  4. OUT
  5. GND
 

Connect SRF05 to Arduino

 

const unsigned int TRIG_PIN=7;
const unsigned int ECHO_PIN=6;
const unsigned int BAUD_RATE=9600;

void setup() {
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  Serial.begin(BAUD_RATE);
}

void loop() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);
  

 const unsigned long duration= pulseIn(ECHO_PIN, HIGH);
 int distance= duration/29/2;
 if(duration==0){
   Serial.println("Warning: no pulse from sensor");
   } 
  else{
      Serial.print("distance to nearest object:");
      Serial.print(distance);
      Serial.println(" cm");
  }
 delay(100);
 }

 Then open the Serial Monitor to view the result

Write a review

Note: HTML is not translated!
    Bad           Good

 

Related Products

Tags: Ultrasonic