Arduino UNO-Based Battery-Powered Robotic System with Ultrasonic Sensors 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, multiple motors, a motor driver, a battery, a buck converter, servos, ultrasonic sensors, and a rocker switch. The circuit is designed to control motors and sensors, with power management handled by a buck converter and a 12V battery.
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
Motor amarillo motorreductor hobby
- Description: A small DC motor with a gearbox.
- Pins: vcc, GND
L298N DC motor driver
- Description: A dual H-Bridge motor driver.
- 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
12V 7Ah Battery
- Description: A rechargeable lead-acid battery.
- Pins: 12v +, 12v -
Buck converter
- Description: A DC-DC converter to step down voltage.
- Pins: IN+, IN-, OUT+, OUT-
Servo
- Description: A small servo motor.
- Pins: gnd, vcc, pulse
Ultrasonic Sensor
- Description: A sensor for measuring distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
Wiring Details
Arduino UNO
- GND connected to Rocker Switch pin 2
- Vin connected to L298N DC motor driver pin 5V
- D12 connected to Rocker Switch pin 1
- D11 connected to Ultrasonic Sensor pin Echo (e305e31c)
- D10 connected to Ultrasonic Sensor pin Trigger (e305e31c)
- D9 connected to Servo pin pulse (93842565)
- D8 connected to Ultrasonic Sensor pin Echo (fa414ad3)
- D7 connected to Ultrasonic Sensor pin Trigger (fa414ad3)
- D6 connected to Servo pin pulse (3a6253f5)
- D5 connected to L298N DC motor driver pin IN4
- D4 connected to L298N DC motor driver pin IN3
- D3 connected to L298N DC motor driver pin IN2
- D2 connected to L298N DC motor driver pin IN1
Motor amarillo motorreductor hobby
- vcc connected to L298N DC motor driver pin OUT3
- GND connected to L298N DC motor driver pin OUT4
L298N DC motor driver
- 5V connected to Arduino UNO pin Vin
- IN1 connected to Arduino UNO pin D2
- IN2 connected to Arduino UNO pin D3
- IN3 connected to Arduino UNO pin D4
- IN4 connected to Arduino UNO pin D5
- OUT1 connected to Motor amarillo motorreductor hobby pin GND (38a12d79, dbdb2464)
- OUT2 connected to Motor amarillo motorreductor hobby pin vcc (38a12d79, dbdb2464)
- OUT3 connected to Motor amarillo motorreductor hobby pin vcc (581592d7, 68916a70)
- OUT4 connected to Motor amarillo motorreductor hobby pin GND (581592d7, 68916a70)
- 12V connected to Buck converter pin OUT+
- GND connected to Buck converter pin OUT-
12V 7Ah Battery
- 12v + connected to Buck converter pin IN+
- 12v - connected to Buck converter pin IN-
Buck converter
- OUT+ connected to L298N DC motor driver pin 12V
- OUT- connected to L298N DC motor driver pin GND
Servo
- vcc connected to Buck converter pin OUT+
- gnd connected to Buck converter pin OUT-
- pulse connected to Arduino UNO pin D6 (3a6253f5), D9 (93842565)
Ultrasonic Sensor
- +VCC connected to Buck converter pin OUT+
- GND connected to Buck converter pin OUT-
- Trigger connected to Arduino UNO pin D7 (fa414ad3), D10 (e305e31c)
- Echo connected to Arduino UNO pin D8 (fa414ad3), D11 (e305e31c)
Rocker Switch
- 1 connected to Arduino UNO pin D12
- 2 connected to Arduino UNO pin GND
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup function is where you initialize your components, and the loop function is where you place the code that needs to run continuously.