Arduino-Controlled Dual DC Motor Driver with Wireless NRF24L01 Communication
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control a set of DC motors using an L298N DC motor driver, which is interfaced with an Arduino Nano microcontroller. The Arduino Nano also communicates with an NRF24L01 module for potential wireless control capabilities. The motors are powered by a 2x 18650 battery pack, and the Arduino Nano is powered by a separate 9V battery. The circuit is likely intended for a small robotic vehicle or a similar application where independent motor control is required.
Component List
DC Motor
- Description: A standard DC motor used for converting electrical energy into mechanical motion.
- Pins: pin 1, pin 2
L298N DC Motor Driver
- Description: A motor driver module capable of driving two DC motors. It controls the direction and speed of the 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 consisting of two 18650 batteries, providing power to the motor driver and motors.
- Pins: vcc, gnd
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
9V Battery
- Description: A standard 9V battery used to power the Arduino Nano.
- Pins: -, +
NRF24L01
- Description: A wireless transceiver module that operates in the 2.4GHz band.
- Pins: IRQ (not used), MOSI, CSN, VCC (3V), GND, CE, SCK, MISO
Wiring Details
DC Motors
- Motor 1: Connected to L298N OUT1 and OUT2
- Motor 2: Connected to L298N OUT3 and OUT4
L298N DC Motor Driver
- Power (12V, GND): Connected to 2x 18650 Battery Pack (vcc, gnd)
- Motor Outputs (OUT1, OUT2, OUT3, OUT4): Connected to DC Motors
- Control Inputs (ENA, IN1, IN2, IN3, IN4, ENB): Connected to Arduino Nano (D3, D4, D5, D6, D7, D9)
2x 18650 Battery Pack
- Provides power to the L298N DC motor driver
Arduino Nano
- Digital Pins (D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, D13/SCK): Control signals for L298N and NRF24L01
- Power (VIN, GND): Connected to 9V Battery
- 3V3: Provides power to NRF24L01 VCC (3V)
9V Battery
- Provides power to the Arduino Nano
NRF24L01
- Control Pins (CE, CSN, MOSI, MISO, SCK): Connected to Arduino Nano (D8, D10, D11/MOSI, D12/MISO, D13/SCK)
- Power (VCC (3V), GND): Connected to Arduino Nano (3V3, GND)
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:
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the L298N motor driver and to handle communication with the NRF24L01 module.