Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller, an HC-SR04 Ultrasonic Sensor, and a Micro servo 9G. The Arduino UNO acts as the central processing unit, controlling the servo motor and reading distance measurements from the ultrasonic sensor. The servo motor is powered and controlled by the Arduino, and the ultrasonic sensor is used to detect objects within a certain range by emitting ultrasonic waves.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
- Purpose: Acts as the central processing unit for the circuit, controlling the servo and reading data from the ultrasonic sensor.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor capable of measuring distances by emitting ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND.
- Purpose: To detect objects within a certain range and provide distance measurements to the Arduino.
Micro servo 9G
- Description: A small and lightweight servo motor suitable for small-scale projects.
- Pins: GND, +5V, PWM.
- Purpose: To perform physical movements as instructed by the Arduino.
Wiring Details
Arduino UNO
- 5V: Provides power to the Micro servo 9G and HC-SR04 Ultrasonic Sensor.
- GND: Connected to the ground pins of both the Micro servo 9G and HC-SR04 Ultrasonic Sensor to complete the power circuit.
- D12: Sends PWM signals to control the Micro servo 9G.
- D11: Receives the ECHO signal from the HC-SR04 Ultrasonic Sensor.
- D10: Sends the TRIG signal to the HC-SR04 Ultrasonic Sensor.
HC-SR04 Ultrasonic Sensor
- VCC: Receives power from the Arduino UNO 5V pin.
- TRIG: Connected to the Arduino UNO D10 pin to receive trigger signals.
- ECHO: Sends the echo signal to the Arduino UNO D11 pin.
- GND: Connected to the Arduino UNO GND pin.
Micro servo 9G
- +5V: Receives power from the Arduino UNO 5V pin.
- GND: Connected to the Arduino UNO GND pin.
- PWM: Receives PWM control signals from the Arduino UNO D12 pin.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
File: sketch.ino
Note: The provided code is a template and does not contain any functional code to control the servo or read from the ultrasonic sensor. It will need to be populated with the appropriate setup and loop code to implement the desired functionality.
