Arduino Nano Controlled Dual DC Motor Driver with Battery-Powered Step-Down Converter
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control two DC Mini Metal Gear Motors using an L298N DC motor driver, powered by a 7.4V battery and regulated by an XL4015 5A DC Buck Step-down converter. The control logic is managed by an Arduino Nano microcontroller.
Component List
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
7.4V Battery
- Description: A 7.4V battery used to power the circuit.
- Pins: +, -
XL4015 5A DC Buck Step-down
- Description: A DC-DC buck converter that steps down the 7.4V battery voltage to a lower voltage suitable for the motor driver and microcontroller.
- Pins: Output +, Output -, Input +, Input -
Arduino Nano
- Description: A small, complete, and breadboard-friendly microcontroller board based on the ATmega328P.
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
DC Mini Metal Gear Motor (Motor 1)
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
DC Mini Metal Gear Motor (Motor 2)
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
Wiring Details
L298N DC Motor Driver
- OUT1 connected to IN2 of Motor 2
- OUT2 connected to IN1 of Motor 2
- 12V connected to Output + of XL4015 and VIN of Arduino Nano
- GND connected to Output - of XL4015 and GND of Arduino Nano
- OUT3 connected to IN2 of Motor 1
- OUT4 connected to IN1 of Motor 1
- ENA connected to D6 of Arduino Nano
- IN1 connected to D2 of Arduino Nano
- IN2 connected to D3 of Arduino Nano
- IN3 connected to D4 of Arduino Nano
- IN4 connected to D5 of Arduino Nano
- ENB connected to D7 of Arduino Nano
7.4V Battery
- + connected to Input + of XL4015
- - connected to Input - of XL4015
XL4015 5A DC Buck Step-down
- Output + connected to 12V of L298N and VIN of Arduino Nano
- Output - connected to GND of L298N and GND of Arduino Nano
- Input + connected to + of 7.4V Battery
- Input - connected to - of 7.4V Battery
Arduino Nano
- VIN connected to Output + of XL4015
- GND connected to Output - of XL4015
- D2 connected to IN1 of L298N
- D3 connected to IN2 of L298N
- D4 connected to IN3 of L298N
- D5 connected to IN4 of L298N
- D6 connected to ENA of L298N
- D7 connected to ENB of L298N
DC Mini Metal Gear Motor (Motor 1)
- IN1 connected to OUT4 of L298N
- IN2 connected to OUT3 of L298N
DC Mini Metal Gear Motor (Motor 2)
- IN1 connected to OUT2 of L298N
- IN2 connected to OUT1 of L298N
Documented Code
Arduino Nano 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 in the Arduino Nano microcontroller.