Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Ultrasonic Distance Measurement with Buzzer Indicator

Image of Arduino UNO Based Ultrasonic Distance Measurement with Buzzer Indicator

Circuit Documentation

Summary

This circuit integrates an Arduino UNO microcontroller with an HC-SR04 Ultrasonic Sensor and a buzzer. The Arduino UNO is used as the central processing unit to control the ultrasonic sensor for distance measurement and to drive the buzzer based on the sensor's readings. The HC-SR04 Ultrasonic Sensor is powered by the Arduino and sends ultrasonic pulses to measure the distance to an object. The buzzer is controlled by the Arduino and is used to provide an audible alert.

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 capable of measuring distances from 2cm to 400cm.
  • Pins: VCC, TRIG, ECHO, GND.

Buzzer

  • Description: An electromechanical component that produces sound.
  • Pins: PIN, GND.

Wiring Details

Arduino UNO

  • 5V connected to HC-SR04 Ultrasonic Sensor VCC.
  • GND connected to HC-SR04 Ultrasonic Sensor GND and Buzzer GND.
  • D10 connected to HC-SR04 Ultrasonic Sensor ECHO.
  • D9 connected to HC-SR04 Ultrasonic Sensor TRIG.
  • D8 connected to Buzzer PIN.

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 D8.
  • GND connected to Arduino UNO GND.

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:

}

Note: The provided code is a template and does not include specific functionality. It needs to be completed with the logic for controlling the HC-SR04 Ultrasonic Sensor and the buzzer based on the sensor's readings.