Behavioural mixed-signal modelHC-SR04hcsr04
Ultrasonic distance sensor HC-SR04
5 V ultrasonic sensor: TRIG ≥ 10 µs starts a measurement, ECHO then stays high as long as the sound takes for the round trip (343 m/s; 2 cm … 4 m, without echo 38 ms). The distance is adjustable in the inspector, also during simulation. ECHO has 5 V levels: use a voltage divider on the 3.3 V Pico.
Key data
- Category
- Modules
- Simulation model
- Behavioural mixed-signal model
- Manufacturer part number
- HC-SR04
- Reference prefix
- U
- Pins
- 4
- Land pattern
- PinHeader_1x04_P2.54mm_Vertical
Simulation model
A behavioural model implements the interface of the chip (registers, protocol, timing) at its pins. The pins are connected to the analog circuit like CMOS pins.
- Model
- hcsr04
- Supply pins
- VCC / GND
Pins 4
| Pin | Name | Use |
|---|---|---|
| VCC | VCCSupply pin | Supply 5 V |
| TRIG | TRIGInput pin | Trigger input: 10 µs high pulse starts a measurement |
| ECHO | ECHOOutput pin | Echo output (5 V!): high time ∝ distance; divider for 3.3 V inputs |
| GND | GNDGround pin | Ground |
Parameters 1
Distance
distanceliveDefault50 cm
PCB
Connector / off-board
PinHeader_1x04_P2.54mm_VerticalUltrasonic distance sensor HC-SR04 as a module on a 4-pin header (VCC, TRIG, ECHO, GND) – compare the order with your own module