Arduino UNO-Based Ultrasonic Distance Sensor with Servo Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a Servo motor, and an Ultrasonic Sensor. The Arduino UNO serves as the central controller, interfacing with the Servo motor and the Ultrasonic Sensor to perform various tasks. The Servo motor is controlled via a PWM signal from the Arduino, while the Ultrasonic Sensor is used to measure distance by sending and receiving ultrasonic waves.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Servo
- Description: A motor that can be precisely controlled to specific positions.
- Pins: GND, VCC, PWM
Ultrasonic Sensor
- Description: A sensor used to measure distance by emitting ultrasonic waves and measuring the time it takes for the echo to return.
- Pins: +VCC, Trigger, Echo, GND
Wiring Details
Arduino UNO
- 5V: Connected to Servo VCC
- GND: Connected to Servo GND, Ultrasonic Sensor GND
- Vin: Connected to Ultrasonic Sensor +VCC
- D12: Connected to Servo PWM
- D11: Connected to Ultrasonic Sensor Echo
- D10: Connected to Ultrasonic Sensor Trigger
Servo
- VCC: Connected to Arduino UNO 5V
- GND: Connected to Arduino UNO GND
- PWM: Connected to Arduino UNO D12
Ultrasonic Sensor
- +VCC: Connected to Arduino UNO Vin
- GND: Connected to Arduino UNO GND
- Echo: Connected to Arduino UNO D11
- Trigger: Connected to Arduino UNO D10
Code Documentation
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup() function is where you initialize your components and settings, and it runs once when the program starts. The loop() function contains the main logic of your program and runs repeatedly.
Additional Documentation
The additional documentation file is empty and can be used to add further details or instructions as needed.