Ultrasonic Distance Sensor (HC-SR04)


Regular price $9.95

The inexpensive, ubiquitous HC-SR04 module is a sensor that allows us to measure distance using ultrasound.  By connecting its two (2) I/O pins to a microcontroller, and sourcing power on its two power pins, we can trigger an ultrasonic pulse and measure the time it takes to hit an object (assuming there's one nearby), and return to the module. By using the constant for speed of sound, we can calculate (with surprising accuracy!) the distance to an object by dividing the sped over ½ of the recorded time of flight.

This low-cost module has a very stable performance, and a high level of accuracy for a wide range of distances (from approximately 2cm all the way to 400cm). When compared to other ranging solutions such as standard IR-based modules, the HC-SR04 is typically less expensive while offering similar ranging accuracy over longer distances.

Its main feature is that it offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package. The detection distance ranges from 2 to 400 cm (1in to 13ft). Also, its operation is not affected by sunlight or black material as is the case for typical IR-based rangefinders.

Please note that acoustically soft materials like cloth can be difficult to detect.

Features

  • Power Supply : 5VDC
  • Quiescent Current : <2mA
  • Working Current: 15mA
  • Effective Angle: <15°
  • Ranging Distance : 2cm – 400cm (1in–13ft)
  • Resolution : 0.3cm
  • Measuring Angle: 30°
  • Trigger Input Pulse width: 10uS
  • Size: 45mm×20mm×15mm

Pinout

  • VCC = 5VDC
  • Trig = Trigger input of Sensor
  • Echo = Echo output of Sensor
  • GND = GND

The most common application for this module is as a distance sensor for mobile robots powered by microcontroller boards or single-board computers!