Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Raspberry Pi 3B Controlled Ultrasonic Distance Measurement System

Image of Raspberry Pi 3B Controlled Ultrasonic Distance Measurement System

Circuit Documentation

Summary of the Circuit

This circuit integrates a Raspberry Pi 3B with an HC-SR04 Ultrasonic Sensor. The Raspberry Pi 3B serves as the central processing unit, controlling the sensor and processing its signals. The HC-SR04 Ultrasonic Sensor is used to measure distances by emitting ultrasonic waves and detecting the reflection from nearby objects. The sensor's TRIG pin is connected to a GPIO pin on the Raspberry Pi to trigger the ultrasonic pulse, and the ECHO pin is connected to another GPIO pin to read the pulse duration, which is used to calculate the distance to the object.

Component List

Raspberry Pi 3B

  • Description: A small single-board computer with a variety of GPIO pins for interfacing with external hardware.
  • Pins: 3v3, GPIO2, GPIO3, GPIO4, GND, GPIO17, GPIO27, GPIO22, 3V3, GPIO10, GPIO9, GPIO11, ID_SD, GPIO5, GPIO6, GPIO13, GPIO19, GPIO26, GPIO21, GPIO20, GPIO16, GPIO12, ID_SC, GPIO7, GPIO8, GPIO25, GPIO24, GPIO23, GPIO18, GPIO15, GPIO14, 5V

HC-SR04 Ultrasonic Sensor

  • Description: A sensor that measures distance by emitting ultrasonic waves and detecting their reflections.
  • Pins: VCC, TRIG, ECHO, GND

Wiring Details

Raspberry Pi 3B

  • 3v3: Not connected
  • GPIO2: Not connected
  • GPIO3: Not connected
  • GPIO4: Connected to HC-SR04 TRIG pin
  • GND: Connected to HC-SR04 GND pin
  • GPIO17: Connected to HC-SR04 ECHO pin
  • Other GPIOs: Not connected
  • 5V: Connected to HC-SR04 VCC pin

HC-SR04 Ultrasonic Sensor

  • VCC: Connected to Raspberry Pi 3B 5V pin
  • TRIG: Connected to Raspberry Pi 3B GPIO4 pin
  • ECHO: Connected to Raspberry Pi 3B GPIO17 pin
  • GND: Connected to Raspberry Pi 3B GND pin

Documented Code

No code has been provided for the microcontrollers in the circuit. To fully utilize the HC-SR04 Ultrasonic Sensor with the Raspberry Pi 3B, embedded code is required to trigger the ultrasonic pulse, measure the duration of the received echo, and calculate the distance based on the speed of sound. This code would typically be written in Python or C and run on the Raspberry Pi's operating system.