Battery-Powered Dual DC Motor Control with Arduino and L298N Driver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of two DC motors controlled by an L298N DC motor driver, powered by a 2x 18650 battery pack, and managed by an Arduino UNO microcontroller. The Arduino UNO is programmed to control the motor driver, which in turn drives the DC motors.
Component List
DC Motor
- Description: A simple DC motor.
- Pins: pin 1, pin 2
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows control of the speed and direction of two DC 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
2x 18650 Battery Pack
- Description: A battery pack holding two 18650 batteries, providing power to the circuit.
- Pins: vcc, gnd
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
Wiring Details
DC Motor 1
- pin 1 connected to OUT2 of L298N DC motor driver
- pin 2 connected to OUT1 of L298N DC motor driver
DC Motor 2
- pin 1 connected to OUT4 of L298N DC motor driver
- pin 2 connected to OUT3 of L298N DC motor driver
L298N DC Motor Driver
- OUT2 connected to pin 1 of DC Motor 1
- OUT1 connected to pin 2 of DC Motor 1
- OUT4 connected to pin 1 of DC Motor 2
- OUT3 connected to pin 2 of DC Motor 2
- 12V connected to vcc of 2x 18650 battery pack
- GND connected to gnd of 2x 18650 battery pack
2x 18650 Battery Pack
- vcc connected to 12V of L298N DC motor driver
- gnd connected to GND of L298N DC motor driver
Code Documentation
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.txt