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 Name | Purpose |
---|---|
Arduino Nano | This will be the microcontroller |
L298N Motor driver | This will be the motor driver |
DC motor | This will be the motor |
Circuit Diagram
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 Pin | L298N Pin |
---|---|
D2 | IN2 |
D3 | IN1 |
D4 | ENA |
Vin | 5v |
Gnd | Gnd |
Code