Hardware Matrix

Is HC-SR04 Ultrasonic Ranging Sensor Module Compatible with Home Assistant (ESPHome)?

Verdict Badge
VERDICT: [ COMPATIBLE (MANUAL CONFIG REQUIRED) ]
Protocol: GPIO Pulse / Voltage Divider
Bridge Needed: NO

Hardware Safety & Electrical Verification

Electrical parameters & logic voltage safety limits before powering ICs

๐ŸŸข 3.3V Native Direct Hookup ๐Ÿงช Verified in Lab
Power Input 5V DC via USB-C / VBUS
GPIO Logic Voltage 3.3V Logic Level โ€” Level Shifter Required for 5V peripherals
Current Profile Peak Tx Current: ~180mA to ~250mA @ 3.3V
Ingress Protection None (Exposed Board โ€” Enclosure Required)

## Compatibility Overview

Classic ultrasonic distance sensor measuring ranges from 2cm to 400cm with 3mm accuracy.

Interactive Pinout & Wiring Diagram

Hover over any pin to view voltage limits and pull-up specifications

VCC
3.3V Power
GND
Ground Common
SDA / TX
Data Line (GPIO 21)
SCL / RX
Clock Line (GPIO 22)
CS / INT
Chip Select (GPIO 19)

## Technical Specification Matrix

Feature / Attribute Specification / Status
Hardware Protocol GPIO Pulse / Voltage Divider
Bridge Required NO
Border Router Needed None
Hardware Capabilities & Peripherals
Distance Measurement (cm) Proximity Alarm State

Note: Exposing entities to Home Assistant requires corresponding YAML component config.

Pairing Complexity Plug-and-Play
Factory Reset Instruction Hold BOOT button for 3s.

## Step-by-Step Pairing Guide

1

Factory Reset Device

Hold BOOT button for 3s.

2

Initialize Pairing Mode on Home Assistant (ESPHome)

Open Home Assistant (ESPHome) administration console, navigate to Integrations / Add Device, and start pairing scanner.

3

Confirm Entity Binding & State Verification

Verify that primary entities (Distance Measurement (cm), Proximity Alarm State) report live state changes inside Home Assistant (ESPHome).

Production Code Generator & Preset Toolkit

Pre-configured pinouts & drivers for HC-SR04 Ultrasonic Ranging Sensor Module

Test in Wokwi Simulator โ†—
   
๐Ÿ‘ฅ Community Verified Database Continuous hardware testing updates

Report a Pinout Error or Submit Tested Code Snippets

Found a pin mapping quirk or built a custom ESPHome YAML driver for HC-SR04 Ultrasonic Ranging Sensor Module? Help us keep this matrix 100% accurate.

## Frequently Asked Questions

Does this device operate in Offline Mode?
100% local ultrasonic pulse timing.
What is the expected Battery Life & Power specification?
5V VCC Trig=GPIO14 Echo=GPIO15 (requires 1k/2k voltage divider).
How does Signal Mesh & Range Extension function?
Wi-Fi 2.4GHz.

Related Compatibility Matrix Guides