Raspberry Pi 4B Ultrasonic Distance Sensor with Audible Alert
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Ultrasonic Sensor, a Piezo Speaker, and a Raspberry Pi 4B. The Raspberry Pi 4B serves as the central microcontroller, interfacing with the Ultrasonic Sensor to measure distance and the Piezo Speaker to produce sound. The document includes a component list, wiring details, and code documentation.
Component List
Ultrasonic Sensor
- Description: A sensor used to measure distance by emitting ultrasonic waves and measuring the time it takes for the echo to return.
- Pins: +VCC, Trigger, Echo, GND
Piezo Speaker
- Description: A speaker that produces sound when an electrical signal is applied.
- Pins: pin1, pin2
Raspberry Pi 4B
- Description: A versatile single-board computer used for various applications, including interfacing with sensors and actuators.
- Pins: 3V3, 5V, GPIO2, GPIO3, GND, GPIO4, GPIO14, GPIO15, GPIO17, GPIO18, GPIO27, GPIO22, GPIO23, GPIO24, GPIO10, GPIO9, GPIO25, GPIO11, GPIO8, GPIO7, ID_SD, GPIO5, GPIO6, GPIO12, GPIO13, GPIO19, GPIO16, GPIO26, GPIO20, GPIO21, ID_SC, TR01_TAP, TR00_TAP, TR03_TAP, TR02_TAP, RUN, GLOBAL_EN, ETH, HDMI 0, HDMI 1, CAMERA, AV
Wiring Details
Ultrasonic Sensor
- +VCC is connected to 5V on the Raspberry Pi 4B.
- Trigger is connected to GPIO23 on the Raspberry Pi 4B.
- Echo is connected to GPIO24 on the Raspberry Pi 4B.
- GND is connected to GND on the Raspberry Pi 4B.
Piezo Speaker
- pin1 is connected to GPIO18 on the Raspberry Pi 4B.
- pin2 is connected to GND on the Raspberry Pi 4B.
Code Documentation
There is no code provided for this circuit.
This document provides a comprehensive overview of the circuit, including the components used, their descriptions, and detailed wiring instructions. This should serve as a useful reference for anyone looking to understand or replicate the circuit.