Projects
Relays/Motors
Motor

Overview

This project controls the speed of a DC motor from serial monitor. Its makes use of L298N motor driver.This project involves controlling 1 motor.

Components

Component NamePurpose
Arduino NanoThis will be the microcontroller
L298N Motor driverThis will be the motor driver
DC motorThis will be the motor

Circuit Diagram

nano_serial_motor_fritzing

Assembly

The driver needs 12v power to work. For this project we have used 8 1.5v batteries. The driver has a 5v outlet which is suitable to power the Arduino Nano.

The connection of the 2 wires motor with L298N can be in any order ( to one motor outlet). The order decides the clockwise direction for the motor.

L298N motor driver pins

Nano PinL298N Pin
D2IN2
D3IN1
D4ENA
Vin5v
GndGnd

Code