L298N is a dual H-Bridge motor driver IC that allows controlling the direction and speed of two DC motors or one stepper motor.
It operates on high voltage and high current, making it suitable for robotics and mechatronics applications.
Operating Voltage: 5V to 35V (Motor supply); 5V logic supply.
Current Handling: Up to 2A per channel continuously.
Logic Level Inputs: Compatible with 5V logic (Arduino, ESP32, etc.).
Heat Sink: Comes with a built-in heat sink to dissipate heat during high load.
Control Pins: IN1, IN2, IN3, IN4 to control motor direction.
Enable Pins (EN): ENA and ENB to control speed using PWM (Enable A for Motor A; Enable B for Motor B).
IN1 & IN2: Control Motor A direction.
IN3 & IN4: Control Motor B direction.
ENA (Enable A): Controls speed of Motor A using PWM.
ENB (Enable B): Controls speed of Motor B using PWM.
VCC: Power for motors (up to 35V).
5V: Logic voltage supply (can be from onboard 5V regulator or external).
GND: Ground connection.
OUT1 & OUT2: Outputs for Motor A.
OUT3 & OUT4: Outputs for Motor B.
Uses H-Bridge configuration to allow voltage to flow in either direction, enabling forward and reverse motor motion.
Direction is controlled by logic levels on INx pins.
Speed is controlled via PWM (Pulse Width Modulation) on the ENA and ENB pins.
| IN1 | IN2 | Motor A Direction |
|---|---|---|
| HIGH | LOW | Forward |
| LOW | HIGH | Reverse |
| LOW | LOW | Stop |
| HIGH | HIGH | Stop/Brake |
(Similar logic applies to IN3 and IN4 for Motor B)
Can control two motors independently.
Built-in protection diodes to handle back EMF from motors.
Low cost and easily available.
Compatible with Arduino, ESP32, Raspberry Pi, etc.
HOW TO OPERATE L298N DC MOTOR
#define IN1 18
#define IN2 19
#define IN3 13
#define IN4 12
void setup() {
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(IN3,OUTPUT);
pinMode(IN4,OUTPUT);
}
void loop() {
// Forward Wise
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
// Backward Wise
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
// HIGH HIGH , LOW LOW (BREAK)
digitalWrite(IN3,LOW);
digitalWrite(IN4,LOW);
}
As per official documentation Step by step process for pico program run after power on:Save your pyt...
ESP32 Board are so popular? Mainly because of the following featuresLow-costBluetoothWiFiLow PowerDu...
Node MCU ESP8266 Board are so popular? Mainly because of the following features.Its true Arduino Kil...
π§ Components Needed:ComponentQuantityESP32 Dev Board1L298N Motor Driver Module1DC Gear Motors (TT o...
The ADXL335 is a small, thin, low-power 3-axis analog accelerometer manufactured by Analog Devices....
π§ What is an Ultrasonic Sensor?An ultrasonic sensor is a device that uses sound waves to detect how...
π What is the DHT11 Sensor?The DHT11 is a basic, low-cost digital temperature and humidity sensor....
π₯ FIRE BOT β Bluetooth Controlled Fire Extinguisher RobotWelcome to the FIRE BOT project! This robo...
BMP180 Sensor: Digital Barometric Pressure SensorThe BMP180 is a digital barometric pressure sensor...
π§ 1. Hardware Overview: 1.8" TFT DisplayMost 1.8" TFT modules are based on the ST7735 driver and co...
The SSD1306 is a popular controller used in OLED (Organic Light Emitting Diode) displays, most commo...
A servo motor is a type of motor designed for precise control of angular position, making it ideal f...
The Gravity Voice Recognition Module is a user-friendly module developed by DFRobot that allows micr...
The APDS-9960 is an advanced, compact sensor from Broadcom (formerly Avago Technologies) that offers...
π What is the 28BYJ-48 Stepper Motor?The 28BYJ-48 is a 5V unipolar stepper motor with a built-in re...
How Soil Moisture Sensor Works and Interface it with Esp32Β When you hear the term βsmart garden,β on...
π§ What is an Analog Joystick?An analog joystick typically has:2 potentiometers (one for X-axis, one...
π‘ What is the NEO-8M GPS Module?The NEO-8M is a high-precision GNSS GPS receiver by u-blox, capable...
π§ What is a NeoPixel?NeoPixel is Adafruitβs name for individually addressable RGB LEDs using the WS...
π§ What is a PIR Sensor?PIR = Passive Infrared SensorA PIR sensor detects motion by measuring change...
β What is AI Thinker GP-02?The AI Thinker GP-02 is a GNSS (GPS) module, designed to work with satel...
π‘ What is SIM900?The SIM900 is a GSM/GPRS module from SIMCom. It allows microcontrollers like ESP32...
π§ What is a Push Button?A push button is a simple mechanical switch that connects two points in a c...
π€ What is a Tilt Sensor?A tilt sensor (also called a ball switch or mercury switch) is a digital sw...
π¨ What is the TCS34725?The TCS34725 is a color sensor made by AMS (now part of Renesas).It detects...
π What is an I2C LCD?An I2C LCD is a Liquid Crystal Display that uses the I2C communication protoco...
π§ What is MPU6050?The MPU6050 is a 6-axis motion tracking device made by InvenSense. It combines:β ...
π‘οΈ What is DS18B20?The DS18B20 is a digital temperature sensor from Maxim Integrated (now Analog Dev...
β° What is DS1307 RTC?The DS1307Β is a real-time clock IC by Maxim Integrated that keeps track of:Sec...
π΅ What is DFPlayer Mini?The DFPlayer Mini is a tiny, standalone MP3 audio player module. It can pla...
π‘ What is an IR Receiver?An IR (Infrared) Receiver module receives signals from an IR remote contro...
π What is a Rotary Encoder?A rotary encoder is an electro-mechanical sensor that converts the angul...
π What is the Dot Matrix Display with MAX7219?A Dot Matrix Display is an arrangement of LEDs in a g...
π What is ESP-NOW?ESP-NOW is a wireless communication protocol developed by Espressif, allowing ESP...
π€ ESP32 Joystick Controlled Robot Using ESP-NOW Protocol & L298N Motor DriverWireless bot control w...
β€οΈ Heart Rate & SpOβ Sensor (MAX30100/MAX30102)π¬ Pulse Sensor | SpOβ Monitor | Wearable Health Tech...