Arduino UNO Controlled Ultrasonic Distance Measurement with LED and Buzzer Indicators
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an HC-SR04 Ultrasonic Sensor, an Arduino UNO microcontroller, a green LED, and a buzzer. The Arduino UNO serves as the central processing unit, controlling the ultrasonic sensor to measure distances and providing output signals to the LED and buzzer based on the sensor readings. The LED and buzzer serve as indicators for certain conditions determined by the Arduino's programmed logic.
Component List
HC-SR04 Ultrasonic Sensor
- Pins: VCC, TRIG, ECHO, GND
- Description: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
Arduino UNO
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13
- Description: A microcontroller board based on the ATmega328P, widely used for building digital devices and interactive objects that can sense and control objects in the physical world.
LED: Two Pin (green)
- Pins: cathode, anode
- Description: A basic green light-emitting diode used for indication purposes.
Buzzer
- Pins: PIN, GND
- Description: An electromechanical component that produces sound when an electrical signal is applied.
Wiring Details
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino UNO 5V
- TRIG connected to Arduino UNO D9
- ECHO connected to Arduino UNO D10
- GND connected to common ground net
Arduino UNO
- D11 connected to buzzer PIN
- D12 connected to LED anode
- 5V connected to HC-SR04 VCC
- D9 connected to HC-SR04 TRIG
- D10 connected to HC-SR04 ECHO
- GND connected to common ground net
LED: Two Pin (green)
- cathode connected to common ground net
- anode connected to Arduino UNO D12
Buzzer
- PIN connected to Arduino UNO D11
- GND connected to common ground net
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Notes (documentation.txt)
No additional code documentation provided.
This documentation provides an overview of the circuit's components, their connections, and the initial code structure for the Arduino UNO. Further details, such as the specific logic and functionality of the code, would need to be added as the project progresses.