Arduino UNO Controlled Servo with Ultrasonic Sensor and Buzzer Alert
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is composed of an Arduino UNO microcontroller, a servo motor, an HC-SR04 ultrasonic sensor, and a buzzer. The Arduino UNO acts as the central processing unit, controlling the servo motor, reading distance measurements from the ultrasonic sensor, and driving the buzzer. The servo motor is likely used for some form of mechanical movement or positioning, the ultrasonic sensor for distance measurement or object detection, and the buzzer for audible feedback.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Purpose: Acts as the central controller for the circuit, interfacing with the sensor, the servo, and the buzzer.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, Analog Pins (A0-A5), I2C Pins (SCL, SDA), AREF, Digital Pins (D0-D13).
Servo
- Description: An actuator that can be precisely controlled for angular rotation.
- Purpose: Provides controlled movement to a part of the circuit.
- Pins: gnd, vcc, pulse.
HC-SR04 Ultrasonic Sensor
- Description: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
- Purpose: Used for distance measurement or object detection.
- Pins: VCC, TRIG, ECHO, GND.
Buzzer
- Description: An electronic component that emits sound.
- Purpose: Provides audible feedback or alerts.
- Pins: PIN, GND.
Wiring Details
Arduino UNO
- 5V connected to Servo (vcc) and HC-SR04 Ultrasonic Sensor (VCC).
- GND connected to Servo (gnd), HC-SR04 Ultrasonic Sensor (GND), and Buzzer (GND).
- D10 connected to HC-SR04 Ultrasonic Sensor (ECHO).
- D9 connected to HC-SR04 Ultrasonic Sensor (TRIG).
- D7 connected to Buzzer (PIN).
- D6 connected to Servo (pulse).
Servo
- vcc connected to Arduino UNO (5V).
- gnd connected to Arduino UNO (GND).
- pulse connected to Arduino UNO (D6).
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 (D7).
- 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 contain any functional code. It is expected that the user will fill in the setup and loop functions with code to control the servo, read the ultrasonic sensor, and activate the buzzer as required by the circuit's purpose.