Arduino UNO Based Ultrasonic Distance Measurement with Visual and Audio Indicators
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed around the Arduino UNO microcontroller board and includes an HC-SR04 Ultrasonic Sensor, a buzzer, and a red LED with a series resistor. The Arduino UNO is used as the central processing unit to control the ultrasonic sensor for distance measurement, to drive the buzzer, and to control the LED based on the sensor readings or other logic defined in the embedded code.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
- Pins: VCC, TRIG, ECHO, GND.
Buzzer
- Description: An electromechanical component that emits sound when an electrical signal is applied.
- Pins: PIN, GND.
LED: Two Pin (red)
- Description: A red light-emitting diode that emits light when current flows through it.
- Pins: cathode, anode.
Resistor (220 Ohms)
- Description: A passive two-terminal electrical component that implements electrical resistance as a circuit element.
- Pins: pin1, pin2.
- Properties: Resistance value of 220 Ohms.
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 Arduino UNO GND.
Buzzer
- PIN connected to Arduino UNO D11.
- GND connected to Arduino UNO GND.
LED: Two Pin (red)
- Anode connected to Arduino UNO D13.
- Cathode connected through a 220 Ohm resistor to Arduino UNO D12.
Resistor (220 Ohms)
- Pin1 connected to Arduino UNO D12.
- Pin2 connected to the cathode of the red LED.
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 was provided.