ESP32-Controlled Ultrasonic Distance Measurement with LED Feedback and Buzzer Alert System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to interface an ESP32 microcontroller with a variety of peripheral devices, including a Grove LED bar, an HC-SR04 Ultrasonic Sensor, a Buzzer Module, and a power supply module. The ESP32 serves as the central processing unit, controlling the LED bar and buzzer, and receiving input from the ultrasonic sensor. The power supply module regulates the power from a DC power source to provide a stable 5V supply to the components. Ground connections are shared among all components, establishing a common reference point for the voltages.
Component List
Grove LED Bar
- Description: A linear LED indicator typically used for displaying signal strength or progress.
- Pins: gnd, vcc, DI (Data Input), DCKI (Clock Input)
MKE-M12 5VDC 5A Power Supply Module
- Description: A power supply module that converts input voltage to a regulated 5V output.
- Pins: GND (Ground), VIN (Input Voltage), 5V (Output Voltage), VM 5~12V (Variable Module Voltage), NC (No Connection)
ESP32 (30 pin)
- Description: A microcontroller with Wi-Fi and Bluetooth capabilities, suitable for a wide range of applications.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
HC-SR04 Ultrasonic Sensor
- Description: A sensor used for measuring distances via ultrasonic sound waves.
- Pins: VCC, TRIG (Trigger), ECHO (Echo), GND
Buzzer Module
- Description: An electronic buzzer for producing sound signals.
- Pins: GND, Vcc, I/O (Input/Output)
DC Power Source
- Description: A source of DC power for the circuit.
- Pins: Ground, Positive
Wiring Details
Grove LED Bar
- GND: Connected to ESP32 GND
- VCC: Connected to 5V from the power supply module
- DI: Connected to ESP32 pin D14
- DCKI: Connected to ESP32 pin D12
MKE-M12 5VDC 5A Power Supply Module
- GND: Connected to ESP32 GND and DC Power Source Ground
- VIN: Connected to DC Power Source Positive
- 5V: Connected to ESP32 Vin, HC-SR04 VCC, Buzzer Module Vcc, and Grove LED Bar VCC
ESP32 (30 pin)
- GND: Connected to the ground of all other components
- Vin: Connected to 5V from the power supply module
- D26: Connected to Buzzer Module I/O
- D14: Connected to Grove LED Bar DI
- D12: Connected to Grove LED Bar DCKI
- D18: Connected to HC-SR04 ECHO
- D5: Connected to HC-SR04 TRIG
HC-SR04 Ultrasonic Sensor
- GND: Connected to ESP32 GND
- VCC: Connected to 5V from the power supply module
- TRIG: Connected to ESP32 pin D5
- ECHO: Connected to ESP32 pin D18
Buzzer Module
- GND: Connected to ESP32 GND
- Vcc: Connected to 5V from the power supply module
- I/O: Connected to ESP32 pin D26
DC Power Source
- Ground: Connected to the power supply module GND
- Positive: Connected to the power supply module VIN
Documented Code
No code was provided for the microcontroller. For this circuit to function as intended, embedded code for the ESP32 is required to control the peripherals (LED bar, buzzer, and ultrasonic sensor) and to handle the logic of the application. The code would typically initialize the peripherals, define the main loop with the device logic, and include functions to handle sensor data and actuator responses. Since no code is available, this section cannot be completed.