Devantech SRF04 Sonar Rangefinder

Sale:
$17.50

The Devantech SRF04 sonar range finder is a single-transducer ranging module with a 2-pin serial interface. With a range from 3cm to 3m (or 1.2in to 9.8ft), it’s ideal for situations that require accurate ranging information.

R93-SRF04
Manufactured by in
United Kingdom

This ultrasonic rangefinder uses a short blanking interval (100 microseconds) to cut down on noise from the initial ping. It’s also designed to use low amounts of power, helping reduce energy costs and lengthen battery life, and has a compact design that leaves room for other components. This Devantech sonar ranging module is a good option for projects requiring accurate ranging information.

There are a couple of requirements for the input trigger and output pulse generated by the ranger. The input line should be held low (logic 0) and then brought high for a minimum of 10 microseconds. The pulse is generated on the falling edge of the input trigger. The ranger's receive circuitry is held in a short blanking interval of 100 microseconds to avoid noise from the initial ping and then it is enabled to listen for the echo. The echo line is low until the receive circuitry is enabled. Once the receive circuitry is enabled, the falling edge of the echo line signals either an echo detection or the timeout (if no object echo is detected).

The SRF04 was designed to be just as easy to use as the Polaroid sonar, requiring a short trigger pulse and providing an echo pulse. Your controller only has to time the length of this pulse to find the range. The connections to the SRF04 are shown below:

The SRF04 Timing diagram is shown below. You only need to supply a short 10uS pulse to the trigger input to start the ranging. The SRF04 will send out an 8 cycle burst of ultrasound at 40khz and raise its echo line high. It then listens for an echo, and as soon as it detects one it lowers the echo line again. The echo line is therefore a pulse whose width is proportional to the distance to the object. By timing the pulse it is possible to calculate the range in inches/centimeters or anything else. If nothing is detected then the SRF04 will lower its echo line anyway after about 36mS.

  • The circuit is designed to be low cost
  • Performance is extremely reliable down to >3cm
  • Maximum range is a little over 3m
Applications

Calculating the Distance

The SRF04 provides an echo pulse proportional to distance. If the width of the pulse is measured in uS, then dividing by 58 will give you the distance in cm, or dividing by 148 will give the distance in inches. uS/58=cm or uS/148=inches.

Changing beam pattern and beam width

You can't! This is a question which crops up regularly, however there is no easy way to reduce or change the beam width that I'm aware of. The beam pattern of the SRF04 is conical with the width of the beam being a function of the surface area of the transducers and is fixed. The beam pattern of the transducers used on the SRF04, taken from the manufacturers data sheet, is shown below.

Characteristics
Voltage 5V
Current 30mA typical, 50mA maximum
Frequency 40kHz
Min Range 3cm (1.18in)
Max Range 3m (9.84ft)
Input Trigger 10µS minimum, TTL level pulse
Echo Pulse Positive TTL level signal, proportional to range
Weight 11.33gm (0.4oz)
Sensitivity Detect a 3cm (1.18in) diameter stick at > 2m (6.56ft)
Connection Type Digital