Arduino UNO-Based Smart Servo Control with Ultrasonic Sensing and LED Indicators
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller interfacing with various components including LEDs, resistors, potentiometers, an ultrasonic sensor, a servo motor, and a pushbutton. The circuit is designed to demonstrate basic input and output operations, sensor interfacing, and control mechanisms.
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
LED: Two Pin (red)
- Description: A red LED with two pins.
- Pins: cathode, anode
LED: Two Pin (green)
- Description: A green LED with two pins.
- Pins: cathode, anode
Resistor (500 Ohms)
- Description: A resistor with a resistance of 500 Ohms.
- Pins: pin1, pin2
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
Potentiometer
- Description: A variable resistor with three pins.
- Pins: GND, Output, VCC
Pushbutton
- Description: A pushbutton with four pins.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
Servo
- Description: A servo motor with three pins.
- Pins: GND, VCC, PWM
Wiring Details
Arduino UNO
5V is connected to:
- VCC of Potentiometer
- VCC of Servo
- VCC of HC-SR04 Ultrasonic Sensor
GND is connected to:
- GND of Potentiometer
- GND of Servo
- GND of HC-SR04 Ultrasonic Sensor
- cathode of LED (red)
- cathode of LED (green)
- Pin 2 of Pushbutton
A0 is connected to the Output of Potentiometer.
A1 is connected to the Output of another Potentiometer.
A2 is connected to the Output of another Potentiometer.
D10 is connected to Pin 4 of Pushbutton.
D9 is connected to pin2 of a Resistor.
D8 is connected to pin2 of another Resistor.
D5 is connected to PWM of Servo.
D4 is connected to ECHO of HC-SR04 Ultrasonic Sensor.
D3 is connected to TRIG of HC-SR04 Ultrasonic Sensor.
LED: Two Pin (red)
- cathode is connected to GND.
- anode is connected to pin1 of a Resistor.
LED: Two Pin (green)
- cathode is connected to GND.
- anode is connected to pin1 of another Resistor.
Resistor (500 Ohms)
- pin1 is connected to the anode of LED (red).
- pin2 is connected to D8 of Arduino UNO.
Resistor (500 Ohms)
- pin1 is connected to the anode of LED (green).
- pin2 is connected to D9 of Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC is connected to 5V of Arduino UNO.
- GND is connected to GND of Arduino UNO.
- TRIG is connected to D3 of Arduino UNO.
- ECHO is connected to D4 of Arduino UNO.
Potentiometer
- VCC is connected to 5V of Arduino UNO.
- GND is connected to GND of Arduino UNO.
- Output is connected to A0 of Arduino UNO.
Potentiometer
- VCC is connected to 5V of Arduino UNO.
- GND is connected to GND of Arduino UNO.
- Output is connected to A1 of Arduino UNO.
Potentiometer
- VCC is connected to 5V of Arduino UNO.
- GND is connected to GND of Arduino UNO.
- Output is connected to A2 of Arduino UNO.
Pushbutton
- Pin 2 is connected to GND.
- Pin 4 is connected to D10 of Arduino UNO.
Servo
- VCC is connected to 5V of Arduino UNO.
- GND is connected to GND of Arduino UNO.
- PWM is connected to D5 of Arduino UNO.
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:
}
Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontroller.