ESP32 and HC-SR04 Ultrasonic Sensor Distance Measurement System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates an ESP32 DevKit V1 microcontroller with an HC-SR04 Ultrasonic Sensor. The ESP32 is used to control and read data from the ultrasonic sensor, which is used for distance measurement. The document includes a list of components, wiring details, and code (if any) for the microcontroller.
Component List
ESP32 DevKit V1 (30 pins)
- Description: A development board based on the ESP32 microcontroller, featuring 30 pins for various I/O functions.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23
- Purpose in Circuit: Acts as the main controller, processing data from the ultrasonic sensor and potentially performing other tasks.
HC-SR04 Ultrasonic Sensor
- Description: A sensor used for measuring distance by emitting ultrasonic waves and measuring the time it takes for the echo to return.
- Pins: VCC, TRIG, ECHO, GND
- Purpose in Circuit: Measures distance and sends the data to the ESP32 for processing.
Wiring Details
ESP32 DevKit V1 (30 pins)
- GND is connected to GND of the HC-SR04 Ultrasonic Sensor.
- VIN is connected to VCC of the HC-SR04 Ultrasonic Sensor.
- D2 is connected to ECHO of the HC-SR04 Ultrasonic Sensor.
- D4 is connected to TRIG of the HC-SR04 Ultrasonic Sensor.
HC-SR04 Ultrasonic Sensor
- GND is connected to GND of the ESP32 DevKit V1.
- VCC is connected to VIN of the ESP32 DevKit V1.
- ECHO is connected to D2 of the ESP32 DevKit V1.
- TRIG is connected to D4 of the ESP32 DevKit V1.
Code
No code is provided for this circuit.
This document provides a comprehensive overview of the components and wiring details for the circuit. If code is added in the future, it should be documented in the "Code" section.