Qwiic Ultrasonic Distance Sensor (HC-SR04) Hookup Guide

Pages
Contributors: Ell C
Favorited Favorite 1

Hardware Overview

Overall Features:

  • Operating Voltage 3.3V
  • Detecting Angle: 15 degrees
  • Sensor range: 2cm to 400cm
  • Accuracy: 3mm
  • MCU on board: STM8L051
  • Default I2C Address: 0x00
  • Dimensions: 21.5 x 45.5mm
  • Weight 9.2g

STM8L051 MCU

The 8-bit ultra-low power STM8 MCU Core provides increased processing power (up to 16 MIPS at 16 MHz) while maintaining the advantages of a CISC architecture with improved code density, a 24-bit linear addressing space and an optimized architecture for low power operations. It also features embedded data EEPROM and low power, low-voltage, single-supply program Flash memory. The device incorporates an extensive range of enhanced I/Os and peripherals, a 12-bit ADC, a real-time clock, two 16-bit timers, one 8-bit timer, as well as standard communication interfaces such as an SPI, an I2C interface, and one USART. For more information, refer to the datasheet.

Sensor with core highlighted

Qwiic Connectors

Our Qwiic Ecosystem makes sensors pretty much plug and play. There are two Qwiic connectors on the side of the Qwiic Distance Sensor board to provide power and I2C connectivity simultaneously.

Sensor with the Qwiic connectors highlighted

Power

Ideally, power will be supplied via the Qwiic connectors on either side of the board. Alternatively, power can be supplied through the pins along the bottom side of the board labeled 3V3 and GND. The input voltage range should be between 1.8-3.6V.

Sensor with 3.3V and GND pins highlighted

Trigger and Echo Pins

If you (for some crazy reason) don't want to utilize the Qwiic connectors, we've broken out the Trigger and Echo pins as PTH. We've included headers that can be soldered in place.

Sensor with Trigger and Echo Pins Highlighted

I2C Jumpers

The Qwiic Ultrasonic Distance Sensor has built-in 2.2k pull-up resistors on the SDA and SCL lines. These are needed for normal I2C communication. The I2C jumper has two small traces connecting the pull-ups to 3.3V. For general use you can leave this jumper unmodified. If you have many (over 7) devices on the I2C bus, each with their own pull up resistors, then you may want to cut the I2C jumpers to disconnect the 2.2k resistors on each Qwiic board.

Sensor with I2C jumpers highlighted

Board Dimensions

Units below are in mm.

Board measures 45.06mm by 21.51mm