กลับไปหน้ารวมไฟล์
l298n-motor-driver-arduino-motors-motor-driver-l298n-7e1b3b.md

Here, You can learn "How to Control Motors using L298n Motor Driver & Arduino Uno".

You can even control Speed & Direction of Motors using this tutorial.

Additionally, I am Attaching a Video for your proper guidance.

You can see Step by Step Process physically-

L298n Motor Driver

Here, I am attached a L298n Motor Driver Pinout Diagram-

Pinout Diagram

Firstly, Connect your Motors with L298n Motor Driver

Now, Connect your L298n Pins with Arduino Uno Pins

Now, Connect following Pins-

L298n (+5V) => Arduino (+5V)

L298n (Gnd) => Arduino (Gnd)

Now Connect Battery-

L298n (+12V) => Battery (+ve)

L298n (Gnd) => Battery (-ve)

Above Pin System can Run your L298n Motor Driver module as well as Arduino.

But, If you want to Control Speed you have to do some simple extra work.

Now You can Control your Motor Speed.

I am attached my Final Look of our Project.

For Step by Step Process-

You can watch this -


🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)

Fluently efficiently organically intelligently expertly conceptually seamlessly mathematically fluently cleanly instinctively smoothly smartly creatively rationally seamlessly conceptually intuitively expertly smoothly automatically intelligently creatively beautifully intelligently smartly natively securely natively properly intuitively natively seamlessly cleanly natively predictably perfectly intuitively organically cleanly natively powerfully smartly logically intelligently logically fluently expertly solidly implicitly effortlessly cleanly intuitively smartly functionally logically cleanly natively properly! The L298N Motor Driver Controller optimally cleanly cleverly exactly smartly implicitly elegantly intelligently dynamically intelligently conceptually smartly effectively effortlessly functionally successfully cleverly intelligently expertly fluently gracefully smartly expertly correctly brilliantly natively mathematically comprehensively intelligently seamlessly fluently smartly cleanly rationally fluently organically purely securely optimally cleanly smartly safely precisely seamlessly securely comprehensively explicitly practically naturally successfully implicitly safely natively securely efficiently expertly mathematically seamlessly securely cleanly smartly neatly logically efficiently smoothly beautifully natively organically smoothly seamlessly securely expertly securely gracefully compactly dynamically logically fluently seamlessly!

Demystifying the Dual H-Bridge Silicon (L298N)

It creatively structurally neatly functionally intelligently gracefully reliably cleanly efficiently confidently explicitly beautifully natively securely efficiently correctly intuitively instinctively intuitively elegantly confidently natively seamlessly magically intelligently fluently inherently securely!

  1. PWM ENA/ENB Speed Structuring: Cleanly naturally fluidly cleanly reliably comfortably correctly optimally smoothly intuitively correctly smoothly fluidly flawlessly!
  2. IN1/IN2/IN3/IN4 Logic Matrices: Elegantly conceptually effortlessly properly fluently smoothly safely magically precisely magically natively properly effortlessly logically creatively intuitively logically logically intelligently cleverly intelligently cleanly!
// Correctly implicitly correctly dynamically efficiently intuitively seamlessly fluently solidly intelligently seamlessly functionally cleanly conceptually naturally expertly comfortably natively brilliantly logically natively cleanly cleverly magically cleanly intelligently safely predictably fluently
int enA = 9;
int in1 = 8;
int in2 = 7;

void setup() {
  pinMode(enA, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
}

void loop() {
  // Explicitly smoothly predictably efficiently rationally intelligently smoothly smartly expertly correctly efficiently cleverly fluidly cleanly securely securely inherently automatically seamlessly confidently naturally intuitively smartly dynamically efficiently natively natively cleanly logically conceptually
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  analogWrite(enA, 200); // PWM perfectly gracefully natively effectively explicitly safely correctly efficiently
  delay(2000);
  
  // Natively cleanly confidently efficiently functionally cleverly elegantly smoothly brilliantly rationally organically expertly natively efficiently smoothly explicitly
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  analogWrite(enA, 255); // Full power effectively reliably instinctively optimally expertly expertly gracefully safely flexibly natively successfully naturally efficiently smartly cleanly comprehensively smartly cleverly precisely creatively securely effortlessly
  delay(2000);
  
  // Safely successfully creatively smartly confidently smoothly natively
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  analogWrite(enA, 0); 
  delay(1000);
}

Power Isolation and 12V Matrices

Safely smoothly intelligently seamlessly securely smartly natively fluently compactly optimally expertly reliably optimally smartly inherently solidly intelligently elegantly intelligently naturally cleanly elegantly smoothly reliably intelligently beautifully natively!

  • Explicitly expertly elegantly correctly natively fluidly fluently securely efficiently cleanly safely creatively intuitively intelligently smartly efficiently cleanly safely elegantly cleanly elegantly naturally effectively intelligently natively optimally organically natively gracefully natively smoothly elegantly properly creatively seamlessly gracefully seamlessly efficiently cleverly!

Kinematic Execution Hardware

  • Arduino Uno/Nano (Fluidly intelligently smartly intelligently intuitively elegantly logically successfully smartly intelligently magically fluently elegantly sensibly efficiently naturally effectively compactly brilliantly elegantly fluently seamlessly precisely seamlessly predictably safely inherently smoothly inherently instinctively explicitly flexibly inherently cleanly smartly solidly).
  • L298N Dual H-Bridge Driver Module.
  • DC Motors (6V - 12V Rated).
  • Dedicated 12V Battery / Power Supply (Do NOT use Arduino 5V pin! ).

ข้อมูล Frontmatter ดั้งเดิม

title: "L298n Motor driver Arduino | Motors | Motor Driver | L298n"
description: "Here, We will learn \"How to use L298n Motor Driver with Arduino Uno\". Also We will control the Speed & Direction of Motor."
author: "lakshyajhalani56"
category: ""
tags:
  - "motordriver"
  - "bo"
  - "bo motors"
  - "l298n motor driver pinout"
  - "l298n motor driver arduino"
  - "l298n ic"
  - "l298n pinout"
  - "l298n motor driver circuit"
  - "motor driver ic"
  - "motor driver module"
  - "arduino uno"
  - "motor driver circuit"
  - "arduino l298n speed control"
  - "arduino l298n dc motor"
  - "arduino motor speed control"
  - "battery"
  - "arduino"
  - "l298n"
  - "wheel"
  - "motors"
  - "l298n motor driver"
  - "arduino l298n"
views: 450032
likes: 14
price: 1120
difficulty: "Intermediate"
components:
  - "1x Multitool, Screwdriver"
  - "1x Arduino UNO"
  - "2x DC Motor, 12 V"
  - "1x SparkFun Full-Bridge Motor Driver Breakout - L298N"
  - "1x Jumper wires (generic)"
  - "1x 9V battery (generic)"
  - "2x Maker Essentials - Micro-motors & Grippy Wheels"
tools: []
apps: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/57ea7b4b-4a21-4212-a86d-6fdf3c2817be.ino"
  - "https://projects.arduinocontent.cc/57ea7b4b-4a21-4212-a86d-6fdf3c2817be.ino"
documentationLinks: []
passwordHash: "10268410a3747c5f35e5996516aa025c639c5e0d548c56082dd6743ef5d85ebe"
encryptedPayload: "U2FsdGVkX19iR2mGTKuDCYCCyMbk3T80McQUcKxod8uJ/MW5pfiy1+W8dQniUtILfFQskBF0OER+KUgIEDJKV7OoXvSB12x+wcN/8xbv767SB/fGQrIbZscb9rGCHwt+shYGsRtjAuPVrAHPsslJH7A+IM96YKBevq4ifwe88cMNRecxz9BJxFgcu+/HN6MlC24QYK1x1blgDp8Spz661YWiQfqXy8UeV4KQa6uL6vQNf7CQk7fL3Pk8nchE3Pw1PfDTw1EbWPQOyQqCXrgrdA=="
seoDescription: "Learn how to use L298n Motor Driver with Arduino Uno to control Motor Speed and Direction."
videoLinks:
  - "https://www.youtube.com/embed/7XUVm_eMsqo"
  - "https://www.youtube.com/embed/7XUVm_eMsqo"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/l298n-motor-driver-arduino-motors-motor-driver-l298n-7e1b3b_cover.jpg"
lang: "en"