Circuit Documentation
Summary
The circuit in question consists of an Arduino UNO microcontroller, an HC-SR04 Ultrasonic Sensor, and a Servomotor SG90. The Arduino UNO serves as the central processing unit, controlling the sensor and the servomotor. The HC-SR04 is used to measure distances via ultrasonic waves, and the Servomotor SG90 is used to actuate or move to specific positions based on the control signals from the Arduino. The circuit is powered by the 5V output from the Arduino, which is distributed to both the ultrasonic sensor and the servomotor. 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:
- 5V: Power supply to other components.
- GND: Common ground for the circuit.
- D10: Digital output to the HC-SR04 Ultrasonic Sensor (TRIG).
- D11: Digital input from the HC-SR04 Ultrasonic Sensor (ECHO).
- D12: Digital output to the Servomotor SG90 (SIG).
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor.
- Pins Used:
- VCC: Power supply from the Arduino (5V).
- GND: Ground connection.
- TRIG: Trigger input from the Arduino (D10).
- ECHO: Echo output to the Arduino (D11).
Servomotor SG90
- Description: A small and lightweight servo for RC (Radio Control) and hobby use.
- Pins Used:
- SIG: Signal input from the Arduino (D12).
- VCC: Power supply from the Arduino (5V).
- GND: Ground connection.
Wiring Details
Arduino UNO
- 5V: Connected to HC-SR04 VCC and Servomotor SG90 VCC.
- GND: Connected to HC-SR04 GND and Servomotor SG90 GND.
- D10: Connected to HC-SR04 TRIG.
- D11: Connected to HC-SR04 ECHO.
- D12: Connected to Servomotor SG90 SIG.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to Arduino UNO 5V.
- GND: Connected to Arduino UNO GND.
- TRIG: Connected to Arduino UNO D10.
- ECHO: Connected to Arduino UNO D11.
Servomotor SG90
- SIG: Connected to Arduino UNO D12.
- VCC: Connected to Arduino UNO 5V.
- 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:
}
This code is a template for the Arduino UNO. The setup() function is intended to contain initialization code that runs once at the start, such as pin mode declarations. The loop() function is designed to contain the main logic of the program, which will run repeatedly.
Note: The actual functionality needs to be implemented within these functions to control the HC-SR04 Ultrasonic Sensor and the Servomotor SG90 based on the requirements of the application.
End of Documentation
