What is an Ultrasonic Sensor?

An ultrasonic sensor is a device used to measure the distance to an object through transmitting sound waves. Once the sound waves hit the object, it’ll bounce back and time traveled will be recorded. The time where the waves go to and fro is how distance is measured.

Things to note

  1. Not all objects can be detected by an ultrasonic sensor as the object shape varies
  2. Some objects (e.g. carpet, cloths) can absorb the sound wave altogether, resulting in inaccuracy

HC-SR04 Ultrasonic Sensor

What is the HC-SR04?

The HC-SR04 is an ultrasonic distance sensor that utilizes non-contact technology, with physical contact between the sensor and objects not needed for it to work.

Product Features

Here are some of the significant product features:

  • Power Supply: DC 5V
  • Quiescent Current : <2mA
  • Working Current: 15mA
  • Working Frequency: 40Hz
  • Ranging Distance : 2cm – 400cm/4m
  • Resolution : 0.3 cm
  • Measuring Angle: 15 degree
  • Trigger Input Pulse width: 10uS
  • Dimension: 45mm x 20mm x 15mm

How does it work?

  • The transmitter (trig pin) sends a sound wave
  • The object picks the wave up, reflecting it back
  • The receiver (echo pin) picks it up

The time between transmission and reception allows distance between to be calculated since sound’s velocity in air is known.

When using the HC-SR04, take note of:

Not to directly connect to electric

  • If directly connected, it’ll affect the normal work of the module

Range of area when testing objects to not be less than 0.5 square meters

  • Results of measuring will be affected if not followed

Comparing the HC-SR04 to Seeed Grove Ultrasonic Distance Sensor

What is Seeed Grove-Ultrasonic Distance Sensor?

It is Seeed very own version of an ultrasonic distance sensor which is comparative to the HC-SR04 but contains significant differences as shown below:

Grove – Ultrasonic Distance Sensor HC-SR04
Working Voltage 3.3V / 5V compatible
Wide voltage level: 3.2V – 5.2V
Measurement Range 3cm – 350cm 2cm – 400cm
I/O Pins needed 3 4
Operating Current 8mA 15mA
Dimensions 50mm x 25mm x 16mm 45mm x 20mm x 15mm
Ease of pairing with Raspberry Pi Easy, directly connect to I/O of Raspberry Pi Requires voltage conversion circuit

The main differences we can observe from the table above include:

Working Voltage

  • Grove -Ultrasonic Distance Sensor supports a wider voltage level

I/O Pins Needed

  • Transmitting and receiving signals on the Grove-Ultrasonic Distance Sensor share one pin, saving the requirement of using all available pins

Ease of pairing with Raspberry Pi

  • The Grove Ultrasonic Distance Sensor supports 3.3V, allowing it to be directly connected to the I/O of the Raspberry Pi instead of using a voltage conversion circuit

Despite the popularity of HC-SR04, the grove ultrasonic distance sensor is a more versatile option that allows for lesser external components and easier pairing with the Raspberry Pi. Apart from having the regular functionality of an ultrasonic sensor, it can be applied for proximity alarms and smart cars as well.

Start pairing with:

If you’re thinking of picking up a Grove-Ultrasonic Distance Sensor after the above comparison, you can simply pair it with the following:

Seeeduino Lotus Cortex-M0+: Seeed very own Arduino

The Grove-Ultrasonic Distance Sensor is compatible with the above Seeeduino Lotus Cortex-M0+, Seeed’s very own Arduino. It can be connected through firstly connecting it to the I2C port and then to your PC via a USB cable.

For Software and further configuration guide, you can head here

Raspberry Pi Zero

If you’ve yet to own raspberry pi, you can pick up a Raspberry Pi Zero, a low-cost option to use alongside the Grove-Ultrasonic Distance Sensor.

It can be directly connected to the unpopulated 40 GPIO pins of the Raspberry Pi Zero.


The HC-SR04 is at no means a bad ultrasonic sensor with its integrated technology and wide working range, but it loses out to the Grove-Ultrasonic Distance Sensor as seen through the comparison.

As of now, pre-orders for the Grove-Ultrasonic Distance Sensor are available and estimated to be back on stock on Nov 9th, 2019. Pick one up yourself now!

Please follow and like us: