Arduino Nano Battery-Powered Motor Controller with LED Indicator
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano microcontroller, an L298N DC motor driver, a hobby gearmotor, a green LED, a 7805 voltage regulator, and several terminal PCB connectors. The circuit is powered by two 3.7V batteries and is designed to control a motor and an LED.
Component List
Arduino Nano
- Description: A small, complete, and breadboard-friendly 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
Terminal PCB 2 Pin
- Description: A simple 2-pin terminal block for easy connection and disconnection of wires.
- Pins: Pin A, Pin B
Hobby Gearmotor with 48:1 Gearbox
- Description: A small DC motor with a 48:1 gearbox for increased torque.
- Pins: pin 1, pin 2
7805 Voltage Regulator
- Description: A voltage regulator that outputs a stable 5V from a higher input voltage.
- Pins: Vin, Gnd, Vout
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
LED: Two Pin (Green)
- Description: A green LED with two pins for indicating status.
- Pins: cathode, anode
3.7V Battery
- Description: A rechargeable lithium-ion battery with a nominal voltage of 3.7V.
- Pins: +, -
Wiring Details
Arduino Nano
- GND is connected to the cathode of the green LED and Pin B of a terminal PCB 2 pin.
- D3 is connected to the anode of the green LED and Pin A of a terminal PCB 2 pin.
- D5 is connected to IN2 of the L298N DC motor driver and Pin B of a terminal PCB 2 pin.
- D7 is connected to IN1 of the L298N DC motor driver and Pin A of a terminal PCB 2 pin.
- VIN is connected to 12V of the L298N DC motor driver, Vout of the 7805 voltage regulator, and Pin B of a terminal PCB 2 pin.
- GND is connected to GND of the L298N DC motor driver, - of a 3.7V battery, Gnd of the 7805 voltage regulator, Pin B of a terminal PCB 2 pin, and Pin A of another terminal PCB 2 pin.
Terminal PCB 2 Pin
- Pin A is connected to anode of the green LED and D3 of the Arduino Nano.
- Pin B is connected to cathode of the green LED and GND of the Arduino Nano.
- Pin A is connected to IN1 of the L298N DC motor driver and D7 of the Arduino Nano.
- Pin B is connected to IN2 of the L298N DC motor driver and D5 of the Arduino Nano.
- Pin B is connected to 12V of the L298N DC motor driver, VIN of the Arduino Nano, and Vout of the 7805 voltage regulator.
- Pin B is connected to GND of the L298N DC motor driver, GND of the Arduino Nano, - of a 3.7V battery, Gnd of the 7805 voltage regulator, and Pin A of another terminal PCB 2 pin.
- Pin A is connected to Vin of the 7805 voltage regulator and + of a 3.7V battery.
Hobby Gearmotor with 48:1 Gearbox
- pin 1 is connected to OUT2 of the L298N DC motor driver.
- pin 2 is connected to OUT1 of the L298N DC motor driver.
7805 Voltage Regulator
- Vin is connected to + of a 3.7V battery and Pin A of a terminal PCB 2 pin.
- Gnd is connected to GND of the L298N DC motor driver, GND of the Arduino Nano, - of a 3.7V battery, Pin B of a terminal PCB 2 pin, and Pin A of another terminal PCB 2 pin.
- Vout is connected to 12V of the L298N DC motor driver, VIN of the Arduino Nano, and Pin B of a terminal PCB 2 pin.
L298N DC Motor Driver
- IN2 is connected to D5 of the Arduino Nano and Pin B of a terminal PCB 2 pin.
- IN1 is connected to D7 of the Arduino Nano and Pin A of a terminal PCB 2 pin.
- 12V is connected to VIN of the Arduino Nano, Vout of the 7805 voltage regulator, and Pin B of a terminal PCB 2 pin.
- GND is connected to GND of the Arduino Nano, - of a 3.7V battery, Gnd of the 7805 voltage regulator, Pin B of a terminal PCB 2 pin, and Pin A of another terminal PCB 2 pin.
- OUT1 is connected to pin 2 of the hobby gearmotor.
- OUT2 is connected to pin 1 of the hobby gearmotor.
- 5V-ENA-JMP-I is connected to 5V-ENA-JMP-O.
- ENA is connected to +5V-J1.
LED: Two Pin (Green)
- cathode is connected to GND of the Arduino Nano and Pin B of a terminal PCB 2 pin.
- anode is connected to D3 of the Arduino Nano and Pin A of a terminal PCB 2 pin.
3.7V Battery
- + is connected to Vin of the 7805 voltage regulator and Pin A of a terminal PCB 2 pin.
- - is connected to GND of the L298N DC motor driver, GND of the Arduino Nano, Gnd of the 7805 voltage regulator, Pin B of a terminal PCB 2 pin, and Pin A of another terminal PCB 2 pin.
- + of one battery is connected to - of the other battery.
Code Documentation
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:
}
documentation.txt