Circuit Documentation
Summary
The circuit in question is designed to interface an Arduino UNO microcontroller with two servo motors and an infrared (IR) sensor. The Arduino UNO controls the servo motors via PWM signals and reads the output from the IR sensor. The servos and the IR sensor are powered by the 5V supply from the Arduino. Ground connections are shared among all components to complete the circuit.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins Used: GND, 5V, D2, D11, D12.
Servo (Wokwi Compatible)
- Description: A standard servo motor compatible with PWM control signals.
- Pins Used: GND, V+, PWM.
IR Sensor
- Description: An infrared sensor used for detecting objects or measuring distances.
- Pins Used: out, gnd, vcc.
Comments
- Description: Textual annotations with no electrical function.
Wiring Details
Arduino UNO
- GND: Connected to the ground pins of both servo motors and the IR sensor.
- 5V: Powers both servo motors and the IR sensor.
- D11: Outputs a PWM signal to control the first servo motor.
- D12: Outputs a PWM signal to control the second servo motor.
- D2: Reads the output signal from the IR sensor.
Servo (Wokwi Compatible) #1
- GND: Connected to the Arduino UNO ground.
- V+: Powered by the 5V output from the Arduino UNO.
- PWM: Receives PWM control signal from pin D11 of the Arduino UNO.
Servo (Wokwi Compatible) #2
- GND: Connected to the Arduino UNO ground.
- V+: Powered by the 5V output from the Arduino UNO.
- PWM: Receives PWM control signal from pin D12 of the Arduino UNO.
IR Sensor
- out: Output signal connected to pin D2 of the Arduino UNO.
- gnd: Connected to the Arduino UNO ground.
- vcc: Powered by the 5V output from the Arduino UNO.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Filename: sketch.ino
Description: This is the main code file for the Arduino UNO microcontroller. The setup() function is intended to initialize settings once the microcontroller is powered on or reset. The loop() function contains the main logic that will run continuously. Currently, both functions are empty and should be filled with the appropriate initialization and operational code to control the servo motors based on the IR sensor's output.
