Arduino UNO and L298N DC Motor Driver Battery-Powered Dual Motor Control System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control two DC motors using an Arduino UNO and an L298N DC motor driver. The power is supplied by a 2x 18650 battery pack. The Arduino UNO is programmed to control the motor driver, which in turn drives the two DC motors.
Component List
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows for control 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
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
2x 18650 Battery Pack
- Description: A battery pack consisting of two 18650 lithium-ion batteries.
- Pins: vcc, gnd
DC Motor (Motor 1)
- Description: A standard DC motor.
- Pins: pin 1, pin 2
DC Motor (Motor 2)
- Description: A standard DC motor.
- Pins: pin 1, pin 2
Wiring Details
L298N DC Motor Driver
- OUT1: Connected to pin 2 of DC Motor 2
- OUT2: Connected to pin 1 of DC Motor 2
- 12V: Connected to vcc of 2x 18650 Battery Pack
- GND: Connected to gnd of 2x 18650 Battery Pack and GND of Arduino UNO
- 5V: Connected to 5V of Arduino UNO
- OUT3: Connected to pin 2 of DC Motor 1
- OUT4: Connected to pin 1 of DC Motor 1
- ENA: Connected to D11 of Arduino UNO
- IN1: Connected to D10 of Arduino UNO
- IN2: Connected to D9 of Arduino UNO
- IN3: Connected to D7 of Arduino UNO
- IN4: Connected to D6 of Arduino UNO
- ENB: Connected to D5 of Arduino UNO
Arduino UNO
- GND: Connected to gnd of 2x 18650 Battery Pack and GND of L298N DC Motor Driver
- 5V: Connected to 5V of L298N DC Motor Driver
- D11: Connected to ENA of L298N DC Motor Driver
- D10: Connected to IN1 of L298N DC Motor Driver
- D9: Connected to IN2 of L298N DC Motor Driver
- D7: Connected to IN3 of L298N DC Motor Driver
- D6: Connected to IN4 of L298N DC Motor Driver
- D5: Connected to ENB of L298N DC Motor Driver
2x 18650 Battery Pack
- vcc: Connected to 12V of L298N DC Motor Driver
- gnd: Connected to GND of Arduino UNO and GND of L298N DC Motor Driver
DC Motor (Motor 1)
- pin 1: Connected to OUT4 of L298N DC Motor Driver
- pin 2: Connected to OUT3 of L298N DC Motor Driver
DC Motor (Motor 2)
- pin 1: Connected to OUT2 of L298N DC Motor Driver
- pin 2: Connected to OUT1 of L298N DC Motor Driver
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:
}
Additional Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used for the Arduino UNO.