Arduino UNO-Based Battery-Powered Robotic System with Ultrasonic Sensor and Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO, an L298N DC motor driver, a micro servo, an ultrasonic sensor, a 9V battery, a toggle switch, and two motors with reducers. The circuit is designed to control motors and a servo based on inputs from an ultrasonic sensor, powered by a 9V battery and controlled by an Arduino UNO.
Component List
9V Battery
- Description: Provides power to the circuit.
- Pins: -, +
Arduino UNO
- Description: Microcontroller used to control the circuit.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
L298N DC Motor Driver
- Description: Controls the motors.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
Micro Servo 9G
- Description: Small servo motor for precise control.
- Pins: GND, +5V, PWM
Ultrasonic Sensor
- Description: Measures distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
Motor with Reducer (x2)
- Description: Motors with gear reducers for controlled movement.
- Pins: 3 - 6 VCC, GND
Toggle Switch SPST
- Description: Simple on/off switch.
- Pins: L1, COM
Wiring Details
9V Battery
- - connected to COM of Toggle Switch SPST
- + connected to 12V of L298N DC Motor Driver
Arduino UNO
- 5V connected to 5V of L298N DC Motor Driver, +5V of Micro Servo 9G, and +VCC of Ultrasonic Sensor
- GND connected to GND of L298N DC Motor Driver, GND of Micro Servo 9G, GND of Ultrasonic Sensor, and L1 of Toggle Switch SPST
- A1 connected to Trigger of Ultrasonic Sensor
- A2 connected to Echo of Ultrasonic Sensor
- D11 connected to IN2 of L298N DC Motor Driver
- D8 connected to PWM of Micro Servo 9G
- D6 connected to IN3 of L298N DC Motor Driver
- D5 connected to IN4 of L298N DC Motor Driver
- D3 connected to IN1 of L298N DC Motor Driver
L298N DC Motor Driver
- OUT1 connected to GND of Motor with Reducer
- OUT2 connected to 3 - 6 VCC of Motor with Reducer
- OUT3 connected to 3 - 6 VCC of second Motor with Reducer
- OUT4 connected to GND of second Motor with Reducer
Micro Servo 9G
- +5V connected to 5V of L298N DC Motor Driver
- GND connected to GND of Arduino UNO
- PWM connected to D8 of Arduino UNO
Ultrasonic Sensor
- +VCC connected to 5V of L298N DC Motor Driver
- GND connected to GND of Arduino UNO
- Trigger connected to A1 of Arduino UNO
- Echo connected to A2 of Arduino UNO
Motor with Reducer
- 3 - 6 VCC connected to OUT2 of L298N DC Motor Driver
- GND connected to OUT1 of L298N DC Motor Driver
Second Motor with Reducer
- 3 - 6 VCC connected to OUT3 of L298N DC Motor Driver
- GND connected to OUT4 of L298N DC Motor Driver
Toggle Switch SPST
- L1 connected to GND of Arduino UNO
- COM connected to - of 9V Battery
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:
}
Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.