Circuit Documentation
Summary
This circuit integrates various components controlled by an Arduino UNO microcontroller to perform a range of functions. The circuit includes servo motors for actuation, IR sensors for object detection, an ultrasonic sensor for distance measurement, a DC motor driver for motor control, and hobby gearmotors for mechanical movement. The system is powered by a 12V battery, and the Arduino UNO serves as the central processing unit, interfacing with the sensors and controlling the actuators based on the programmed logic.
Component List
Microcontroller
- Arduino UNO: A microcontroller board based on the ATmega328P. It has digital input/output pins, analog inputs, a USB connection for programming, and power management capabilities.
Actuators
- SG90 Servo Motor: A small and lightweight servo motor capable of precise control. It can be positioned at various angles using PWM signals.
- Hobby Gearmotor with 48:1 Gearbox: A DC motor with a gearbox that provides a high torque output suitable for driving wheels or other mechanical parts.
Sensors
- HC-SR04 Ultrasonic Sensor: An ultrasonic distance sensor that can measure distances by emitting ultrasonic waves and measuring the time it takes for the echo to return.
- IR Sensor: An infrared sensor used for object detection within a short range.
Power
- Battery 12V: A 12-volt battery that provides power to the circuit.
Motor Driver
- L298N DC Motor Driver: A motor driver module capable of driving two DC motors or one stepper motor. It can handle high current loads and is suitable for driving the gearmotors in the circuit.
Wiring Details
Arduino UNO
- Digital Pin D9: Connected to IR Sensor (out)
- Digital Pin D8: Connected to IR Sensor (out)
- Digital Pin D7: Connected to HC-SR04 Ultrasonic Sensor (ECHO)
- Digital Pin D6: Connected to HC-SR04 Ultrasonic Sensor (TRIG)
- Digital Pin D5: Connected to SG90 Servo Motor (PWM)
- Digital Pin D4: Connected to SG90 Servo Motor (PWM)
- Digital Pin D3: Connected to SG90 Servo Motor (PWM)
- Digital Pin D2: Connected to SG90 Servo Motor (PWM)
SG90 Servo Motors
- PWM: Connected to corresponding Arduino UNO digital pins (D5, D4, D3, D2)
- 5V: All connected together and to other 5V components
- GND: All connected together and to other GND components
Hobby Gearmotors
- Pin 1: Connected to L298N DC Motor Driver (OUT1, OUT4)
- Pin 2: Connected to L298N DC Motor Driver (OUT2, OUT3)
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V net
- TRIG: Connected to Arduino UNO (D6)
- ECHO: Connected to Arduino UNO (D7)
- GND: Connected to GND net
IR Sensors
- Out: Connected to Arduino UNO digital pins (D9, D8)
- VCC: Connected to 5V net
- GND: Connected to GND net
L298N DC Motor Driver
- OUT1, OUT2, OUT3, OUT4: Connected to Hobby Gearmotors
- 12V: Connected to Battery 12V (+)
- GND: Connected to GND net
- 5V: Connected to 5V net
Battery 12V
- (+): Connected to L298N DC Motor Driver (12V)
- (-): Connected to GND net
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
Note: The provided code is a template and does not include specific logic for controlling the components. The user should implement the setup and loop functions to initialize the components and define the behavior of the circuit.