Arduino UNO-Based Distance Measuring and Servo Control System with LED Indicator
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a Servo motor, an HC-SR04 Ultrasonic Sensor, and a green LED. The Arduino UNO serves as the central controller, interfacing with the other components to perform various tasks. The Servo motor is controlled via a PWM signal, the Ultrasonic Sensor is used for distance measurement, and the LED provides visual feedback.
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 standard servo motor.
- Pins: GND, VCC, PWM
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
LED: Two Pin (green)
- Description: A green LED with two pins.
- Pins: cathode, anode
Comment
- Description: Placeholder for comments in the circuit.
- Pins: None
Wiring Details
Arduino UNO
- D12 is connected to the anode of the green LED.
- GND is connected to the GND of the HC-SR04 Ultrasonic Sensor, the cathode of the green LED, and the GND of the Servo.
- D10 is connected to the ECHO of the HC-SR04 Ultrasonic Sensor.
- D9 is connected to the TRIG of the HC-SR04 Ultrasonic Sensor.
- 5V is connected to the VCC of the HC-SR04 Ultrasonic Sensor and the VCC of the Servo.
- D8 is connected to the PWM of the Servo.
Servo
- GND is connected to the GND of the Arduino UNO.
- VCC is connected to the 5V of the Arduino UNO.
- PWM is connected to the D8 of the Arduino UNO.
HC-SR04 Ultrasonic Sensor
- GND is connected to the GND of the Arduino UNO.
- ECHO is connected to the D10 of the Arduino UNO.
- TRIG is connected to the D9 of the Arduino UNO.
- VCC is connected to the 5V of the Arduino UNO.
LED: Two Pin (green)
- cathode is connected to the GND of the Arduino UNO.
- anode is connected to the D12 of the Arduino UNO.
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:
}
Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used for the Arduino UNO.