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 microcontroller, an L298N DC motor driver, multiple DC motors, a 12V 7Ah battery, a rocker switch, 775 motors, a 12V single-channel relay, a Tower Pro SG90 servo, and an HC-SR04 ultrasonic sensor. The circuit is designed to control various motors and sensors using the Arduino UNO.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- 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: A dual H-Bridge motor driver module.
- 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
DC Motor
- Description: A standard DC motor.
- Pins: pin 1, pin 2
12V 7Ah Battery
- Description: A rechargeable 12V battery.
- Pins: 12v +, 12v -
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
775 Motor
- Description: A high-torque DC motor.
- Pins: positive, negative
12V Single Channel Relay
- Description: A relay module for switching high-power devices.
- Pins: NC, COM, NO, IN, GND, VCC
Tower Pro SG90 Servo
- Description: A micro servo motor.
- Pins: Signal, +5V, GND
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
Wiring Details
Arduino UNO
- 5V connected to VCC of HC-SR04 Ultrasonic Sensor
- GND connected to GND of Tower Pro SG90 servo, GND of HC-SR04 Ultrasonic Sensor, GND of L298N DC motor driver, GND of 12V SINGLE CHANNEL RELAY, and 12v - of 12V 7Ah Battery
- Vin connected to +5V of Tower Pro SG90 servo, 5V of L298N DC motor driver, and VCC of 12V SINGLE CHANNEL RELAY
- D11 connected to ENA of L298N DC motor driver
- D10 connected to ECHO of HC-SR04 Ultrasonic Sensor
- D9 connected to TRIG of HC-SR04 Ultrasonic Sensor
- D8 connected to ENB of L298N DC motor driver
- D7 connected to IN of 12V SINGLE CHANNEL RELAY
- D6 connected to Signal of Tower Pro SG90 servo
- D5 connected to IN4 of L298N DC motor driver
- D4 connected to IN3 of L298N DC motor driver
- D3 connected to IN2 of L298N DC motor driver
- D2 connected to IN1 of L298N DC motor driver
L298N DC Motor Driver
- GND connected to GND of Arduino UNO, GND of 12V SINGLE CHANNEL RELAY, and 12v - of 12V 7Ah Battery
- 5V connected to Vin of Arduino UNO, +5V of Tower Pro SG90 servo, and VCC of 12V SINGLE CHANNEL RELAY
- 12V connected to 2 of Rocker Switch
- OUT1 connected to pin 2 of DC Motor, positive of 775 motor, and pin 2 of another DC Motor
- OUT2 connected to pin 1 of DC Motor, negative of 775 motor, and pin 1 of another DC Motor
- OUT3 connected to pin 1 of another DC Motor, negative of another 775 motor, and pin 1 of another DC Motor
- OUT4 connected to pin 2 of another DC Motor, positive of another 775 motor, and pin 2 of another DC Motor
12V 7Ah Battery
- 12v - connected to GND of Arduino UNO, GND of L298N DC motor driver, and GND of 12V SINGLE CHANNEL RELAY
- 12v + connected to 1 of Rocker Switch
Rocker Switch
- 1 connected to 12v + of 12V 7Ah Battery
- 2 connected to 12V of L298N DC motor driver
775 Motor
- positive connected to pin 2 of DC Motor and OUT1 of L298N DC motor driver
- negative connected to pin 1 of DC Motor and OUT2 of L298N DC motor driver
12V Single Channel Relay
- GND connected to GND of Arduino UNO, GND of L298N DC motor driver, and 12v - of 12V 7Ah Battery
- VCC connected to Vin of Arduino UNO, +5V of Tower Pro SG90 servo, and 5V of L298N DC motor driver
- IN connected to D7 of Arduino UNO
Tower Pro SG90 Servo
- GND connected to GND of Arduino UNO
- +5V connected to Vin of Arduino UNO, 5V of L298N DC motor driver, and VCC of 12V SINGLE CHANNEL RELAY
- Signal connected to D6 of Arduino UNO
HC-SR04 Ultrasonic Sensor
- VCC connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO
- TRIG connected to D9 of Arduino UNO
- ECHO connected to D10 of Arduino UNO
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.