Circuit Documentation
Summary
This circuit is designed to interface an Arduino UNO with a variety of components including a servo motor, an HC-SR04 ultrasonic sensor, an IR sensor, two DC motors, and a UEETEK L298N Dual H Bridge motor driver. The circuit is powered by a 12V battery. The Arduino UNO controls the servo motor and the IR sensor directly and interfaces with the motor driver to control the DC motors. The motor driver also receives power from the battery and distributes 5V to the other components.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
Servo
- A rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity, and acceleration.
- It consists of a suitable motor coupled to a sensor for position feedback.
HC-SR04 Ultrasonic Sensor
- An ultrasonic distance sensor that provides 2cm to 400cm of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm.
IR Sensor
- An electronic device that measures and detects infrared radiation in its surrounding environment.
DC Motor (x2)
- A motor that runs on direct current electricity.
UEETEK L298N Dual H Bridge DC Stepper Motor Driver Module Controller Board for Arduino
- A motor driver module that allows for the control of two DC motors or one stepper motor.
Battery 12V
- A 12V battery that provides power to the circuit.
Wiring Details
Arduino UNO
- 5V: Provides power to the Servo, IR sensor, HC-SR04 sensor, and L298N motor driver.
- GND: Common ground for Servo, IR sensor, HC-SR04 sensor, and L298N motor driver.
- D8: Connected to the Servo's pulse input.
- D7: Connected to the IR sensor's output.
- D5: Connected to IN1 on the L298N motor driver.
- D4: Connected to IN2 on the L298N motor driver.
- D3: Connected to IN3 on the L298N motor driver.
- D2: Connected to IN4 on the L298N motor driver.
Servo
- VCC: Connected to 5V from the L298N motor driver.
- GND: Connected to the common ground.
- Pulse: Controlled by D8 on the Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V from the L298N motor driver.
- GND: Connected to the common ground.
IR Sensor
- VCC: Connected to 5V from the L298N motor driver.
- GND: Connected to the common ground.
- Out: Connected to D7 on the Arduino UNO.
DC Motors
- Motor 1: Connected to A1 and A2 on the L298N motor driver.
- Motor 2: Connected to B1 and B2 on the L298N motor driver.
UEETEK L298N Dual H Bridge DC Stepper Motor Driver Module Controller Board for Arduino
- 5V: Provides power to the Servo, IR sensor, and HC-SR04 sensor.
- GND: Connected to the common ground and the negative terminal of the battery.
- IN1, IN2, IN3, IN4: Controlled by D5, D4, D3, and D2 on the Arduino UNO respectively.
- A1, A2: Connected to the first DC motor.
- B1, B2: Connected to the second DC motor.
- VMS: Connected to the positive terminal of the battery.
Battery 12V
- Positive terminal: Connected to VMS on the L298N motor driver.
- Negative terminal: Connected to GND on the L298N motor driver.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the connected components based on the requirements of the circuit's application.