Arduino UNO-Based Battery-Powered Robotic Car with MPU6050 and L298N Motor Driver
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, a motor driver, motors with wheels, a 12V battery, and an MPU6050 sensor. The circuit is designed to control the motors using the Arduino and gather sensor data from the MPU6050.
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 and Wheels
- Description: A motor with attached wheels.
- 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
Battery 12V
- Description: A 12V battery.
- Pins: +, -
InvenSense MPU6050
- Description: A 6-axis motion tracking device.
- Pins: VCC, GND, SCL, SDA, XDA, XCL, AD0, INT
Wiring Details
Arduino UNO
- 5V connected to VCC of InvenSense MPU6050
- GND connected to GND of battery 12v and GND of L298N DC motor driver and GND of InvenSense MPU6050
- Vin connected to 5V of L298N DC motor driver
- A4 connected to SDA of InvenSense MPU6050
- A5 connected to SCL of InvenSense MPU6050
- D10 connected to ENB of L298N DC motor driver
- D9 connected to ENA of L298N DC motor driver
- D7 connected to IN1 of L298N DC motor driver
- D6 connected to IN2 of L298N DC motor driver
- D5 connected to IN3 of L298N DC motor driver
- D4 connected to IN4 of L298N DC motor driver
- D2 connected to INT of InvenSense MPU6050
Motor and Wheels
- vcc of first motor connected to OUT3 of L298N DC motor driver
- GND of first motor connected to OUT4 of L298N DC motor driver
- vcc of second motor connected to OUT1 of L298N DC motor driver
- GND of second motor connected to OUT2 of L298N DC motor driver
L298N DC Motor Driver
- 12V connected to + of battery 12v
Battery 12V
- - connected to GND of Arduino UNO, L298N DC motor driver, and InvenSense MPU6050
InvenSense MPU6050
- VCC connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO
- SDA connected to A4 of Arduino UNO
- SCL connected to A5 of Arduino UNO
- INT connected to D2 of Arduino UNO
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:
}
Additional Documentation
// This file is reserved for additional documentation.
This document provides a comprehensive overview of the circuit, including the components used, their connections, and the code running on the Arduino UNO.