L298N: Functional features, methods of controlling motor speed and direction

By STMicroelectronics 1873

L298N: Functional features, methods of controlling motor speed and direction

The L298N is a dual H-bridge driver chip used to control DC motors or stepper motors. It controls the steering and speed of the motor and provides protection against overloading or short circuiting of the motor and drive.

L298N is the vertical package of L298. It is a dual-channel full-bridge motor driver that can withstand high voltage and large current. The operating voltage can reach 46 V and the output current can reach 4 A. It uses a Multiwatt 15-pin package and can receive A standard TTL logic level signal, it has two start control terminals, which can dynamically adjust the circuit operating mode by inserting a jump cover on the board without being interfered by the input signal.

The L298N chip can drive two two-phase motors, or drive one four-phase motor, with an output voltage up to 50V. Due to its powerful driving capability and flexible control method, L298N is widely used in motor control systems in robots, smart cars, medical equipment, industrial automation and other fields. It is an important part of realizing motor forward and reverse rotation, speed control and other functions.


Ⅰ.Specifications of L298N


•Number of channels:2
•Number of pins:15
•Length:19.6 mm
•Width:5 mm
•Height:10.7 mm
•Package:Tube
•Number of output interfaces:4
•Output current:2 A
•Output voltage:46 V
•Technology:Bipolar
•Output configuration:half bridge
•Output current:4 A
•Type:Full Bridge
•Operating power supply current:13 mA
•Number of output terminals:4 Output
•Minimum operating temperature:-25℃
•Maximum operating temperature:+130℃
•Installation style:Through Hole
•Fault protection:current limiting, over-temperature
•Power supply voltage (Max):7 V
•Power supply voltage (Min):4.5 V
•Power dissipation:25000 mW
•Operating power supply voltage:4.8 V to 46 V
•Trademark:STMicroelectronics
•Package/Case:Multiwatt-15V
•Product:Brushed DC Motor Drivers
•Subcategory:PMIC-Power Management ICs
•Product Category:Motor/Motion/Ignition Controllers and Drivers
•Product type:Motor/Motion/Ignition Controllers&Drivers

 

Ⅱ.Functional features of L298N


1.High power output: L298N can handle larger currents and voltages, making it suitable for driving various types of motors, including high-power DC motors.

2.Dual H-bridge driver: L298N contains two H-bridge circuits, each H-bridge circuit can control the steering and speed of a DC motor or stepper motor.

3.Wide input voltage range: L298N is able to accept a wide range of input voltage and can usually operate between 5V and 35V.

4.Simple interface: L298N provides a simple wiring method, usually only requiring a few pin connections to achieve motor control.

5.Strong output current capability: The total DC current of L298N can reach 4A, which can drive high current motors.

6.Overheating protection function: L298N has an overheating protection function, which can protect the chip and motor from overheating damage and improve the stability of the system.

7.Wide operating voltage range: The operating voltage of L298N can reach up to 46V, which is suitable for driving motors in various voltage ranges.

8.Powerful driving capability: L298N realizes the forward and reverse rotation and speed control of the motor through the internal H-bridge circuit, and has strong driving capability and good response speed.

9.Logic power input: L298N has a built-in logic power input, which can provide 5V logic power through the built-in voltage regulator chip 78MO5 to facilitate connection with external circuits.

10.Logic control: L298N can control the steering and speed of the motor through a microcontroller (such as Arduino) or other logic signals, making it easy to integrate into various electronic projects.

11.Wide range of application scenarios: Because L298N has strong driving capabilities and flexible control methods, it is widely used in motor control systems in robots, smart cars, medical equipment, industrial automation and other fields.


Ⅲ.Pin configuration of L298N

•Pin1(CURRENT SENSING A):Current sensor A, a small resistance resistor is connected between this pin and ground to detect the current.
•Pin2(OUTPUT 1):Output terminal 1 of built-in driver A. Connect to motor A+
•Pin3(OUTPUT 2):Output terminal 2 of built-in driver A, connected to motor A-
•Pin4(SUPPLY VOLTAGE Vs):Power supply interface, external input power supply, voltage up to 46V
•Pin5(INPUT 1):Logic input terminal 1 of built-in driver A
•Pin6(ENABLE A):The enable end of the built-in driver A, unplug it to enable PWM speed regulation
•Pin7(INPUT 2):Logic input terminal 2 of built-in driver A
•Pin8(GND):Ground (ground) negative pole of external power supply
•Pin9 (LOGIC SUPPLY VOLTAGE Vss):5V power input terminal of the logic control circuit
•Pin10(INPUT 3):Logic input terminal 1 of built-in driver B
•Pin11(ENABLE B):The enable end of built-in driver B, unplug it to enable PWM speed regulation
•Pin12(INPUT 4):Logic input terminal 2 of built-in driver B
•Pin13 (OUTPUT 3):Output terminal 1 of built-in driver B, connected to motor B+
•Pin14 (OUTPUT 4):Output terminal 2 of built-in driver B, connected to motor B-
•Pin15 (CURRENT SENSING B):Current sensor B, a small resistance resistor is connected between this pin and ground to detect current.

 

Ⅳ.Block Diagram of L298N

 

Ⅴ.Absolute Maximum Ratings of L298N

 

Ⅵ.How L298N controls motor speed and direction


1.Control the motor direction:
L298N controls the forward and reverse rotation of the motor by controlling the signals of the two input ports IN1 and IN2. When IN1 is high level and IN2 is low level, the motor rotates forward; when IN1 is low level and IN2 is high level, the motor rotates reversely. If IN1 and IN2 input high level or low level at the same time, the motor will stop rotating.

2.Control motor speed:
The L298N uses a pulse width modulation (PWM) signal to control the speed of the motor. The PWM signal is a digital signal that controls the output voltage by adjusting the cycle time occupied by the high level. In L298N, the larger the duty cycle of the PWM signal, the faster the motor rotates. By changing the duty cycle of the PWM signal, precise control of the motor speed can be achieved.


Ⅶ.Application fields of L298N


1.Industrial automation: In the field of industrial automation, L298N can be used to control motors in various industrial equipment, such as conveyor belts, elevators, fans, etc., to achieve automated production and operations. In the field of industrial automation, the high voltage and high current driving capabilities of L298N make it particularly suitable for driving various industrial motors. These motors may need to start, stop, or change direction frequently, or they may need to run at different speeds. The L298N can precisely control the speed and direction of these motors by receiving PWM signals or logic level signals from a microcontroller or other control device.

2.DIY projects: L298N can be used by DIY enthusiasts for various personal projects, such as homemade robotic arms, automatic irrigation systems, smart home equipment, etc., providing them with basic components for motor control.

•Homemade robotic arm: DIY enthusiasts can use L298N to drive each joint of the robotic arm and control the movement of the robotic arm through programming to achieve functions such as grabbing, carrying, and manipulating objects. This is a great hands-on project for robotics enthusiasts, educators, and students.

•Smart home devices: L298N can also be used for motor control of smart home devices. For example, it can drive curtain motors to realize automatic opening and closing of curtains; or it can drive door and window motors to realize automatic opening and closing of doors and windows. By connecting these devices to smart home systems, users can remotely control home devices through mobile phones, voice assistants, etc.

•Automatic irrigation system: In gardens or farmland, DIY enthusiasts can use L298N to design automatic irrigation systems. For example, by installing a soil moisture sensor, when the soil moisture is below the threshold, the L298N can drive the water pump motor to start automatically to water the plants. This saves water while ensuring plant growth.

•Teaching projects: In the field of education, L298N is also often used as a basic component of teaching projects. By building a motor control experimental platform based on L298N, students can personally practice the basic principles and technologies of motor control and deepen their understanding of motor drive and automation technology.

•Model Making: For model making enthusiasts, the L298N is an ideal choice. It can provide powerful power support for models, such as driving model cars, model ships, model airplanes, etc. By precisely controlling the speed and direction of the motor, precise movement and stable performance of the model can be achieved.

3.Robotics: In robots, L298N can be used to drive the robot's wheels, arms, joints and other moving parts to control the movement and operation of the robot.

•Arm and joint drive: For humanoid robots or other robots that require multi-joint motion, L298N can be used to drive servo motors or stepper motors to control the robot's arms, joints and other moving parts. Through reasonable programming and circuit design, complex motion postures and operations of the robot can be realized.

•Wheel drive: For mobile robots, such as wheeled robots or tracked robots, L298N can be used to drive wheel or track motors to control the movement of the robot. By adjusting the duty cycle of the PWM signal, the speed of the motor can be controlled, thereby achieving precise control of the robot, such as forward, backward, turning, etc.

•Expandability and flexibility: L298N can be easily connected with various microcontrollers (such as Arduino, Raspberry Pi, etc.) to realize the intelligence and automation of robots. In addition, the L298N’s interface is simple and clear, making it convenient for DIY enthusiasts and robot enthusiasts to design and expand circuits.

•Precise control: The L298N’s high current drive capability allows it to control high-power motors, thereby achieving fast response and precise control of the robot. At the same time, L298N's built-in protection functions, such as over-current protection, over-heat protection, etc., can also ensure the safety and stability of the robot during work.

4.Model making: L298N is often used to control the motors in model making such as model cars, model airplanes and model ships to provide power and control.

5.Transportation: L298N can be used for motor drive of small electric vehicles, unmanned vehicles, model cars, etc. to control the driving direction and speed of the vehicle. The L298N is capable of high current output, which allows it to drive larger power motors and thus heavier vehicles. For small electric vehicles and autonomous vehicles, this powerful driving force is very critical.

6.Stepper motor drive: L298N is also suitable for driving stepper motors. It can control the rotation angle and speed of stepper motors. It is often used in printers, medical equipment, precision instruments and other fields. A stepper motor is a special motor whose rotation angle is controlled by the input step pulse signal. Every time a pulse signal is input, the stepper motor will rotate according to a fixed step angle. L298N can accurately control the rotation angle and speed of the stepper motor by receiving pulse signals from the controller.

7.Household appliances: In household appliances, L298N can be used to control the motors of vacuum cleaners, fans, washing machines and other equipment to realize functions such as starting, stopping, and speed regulation of the motors. For equipment such as vacuum cleaners, fans, and washing machines, the L298N motor drive module can control the start, stop, speed adjustment and other functions of the motor. By adjusting the duty cycle of the PWM signal, the motor speed can be precisely controlled to achieve various wind speeds or washing speeds required by the user.

8.Teaching projects: In the teaching of electronic engineering and automation majors, L298N is often used as a motor drive module in experiments and teaching projects to help students understand the basic principles and practical applications of motor control. The L298N motor drive module also has good scalability and customizability. Students can expand and transform the modules according to their own needs and creativity to achieve more interesting and practical functions.

9.Automation and machinery control: In industrial automation systems, L298N is often used to control various mechanical equipment, such as conveyor belts, pumps, valves, etc., to achieve precise speed and direction control. L298N also has complete protection functions, including overcurrent protection and overheating protection. In industrial automation systems, mechanical equipment often needs to run continuously for a long time, which may cause damage to motors and drive modules.

 

Ⅷ.Basic steps for connecting L298N and microcontroller


1.Correctly connect the L298N drive circuit to the motor. The motor should be connected to the OUT1, OUT2 and OUT3, OUT4 pins. Depending on the type and needs of the motor, you can choose a series or parallel connection. The positive and negative poles of the motor must be connected correctly, otherwise the motor will not work properly.

2.Connect the input signal pins IN1 and IN2 to the microcontroller or other signal source. The IN1 and IN2 pins are used to control the rotation of the motor. By changing the level status of IN1 and IN2, the forward, reverse and stop of the motor can be controlled. If you need to control a second motor, repeat the above steps and connect the motor to the OUT3 and OUT4 pins, and connect the IN3 and IN4 pins to the corresponding signal sources.

3.Control the working status of the motor. By controlling the level of the input signal pin, different working states of the motor can be achieved. For example, to control the motor to rotate forward, you can set the IN1 pin to high level (5V) and the IN2 pin to low level (0V). As needed, the motor speed can be controlled through PWM adjustment.


Ⅸ.L298N replacement model


L298HN
LM18298T
TPIC0298KV
CS-298MV15
XZ298N
MAX14872ETC+


X.The difference between L298N and L293D


1.Current and voltage
•L298N: Usually capable of supporting higher currents and voltages, generally in the range of several amps to tens of amps, and tens of volts to hundreds of volts.
•L293D: Usually supports lower current and voltage, generally in the range of hundreds of milliamps to several amps, and several volts to tens of volts.

2.Internal structure
•L298N: Consists of two complete H-bridges, each H-bridge can independently control a motor.
•L293D: Composed of four half-bridges, each half-bridge can control the speed and direction of a motor.

3.Driving ability
•L298N: Has higher drive capability to support higher power motors and is typically used in applications requiring higher current and voltage.
•L293D: Lower drive capacity, suitable for smaller power motors, usually used in low power applications or small motors.

4.Pin number and function
•L298N: It has 15 pins and supports dual H-bridge configuration, which can independently control the speed and direction of two motors.
•L293D: It has 16 pins and supports four half-bridge configurations, which can control the speed and direction of two motors, but the control is simpler.


Frequently Asked Questions


1.How to adjust the output current of L298N?
L298N does not directly provide the function of adjusting the output current, but it can indirectly control the output current of the motor by controlling the PWM input signal of L298N. Adjusting the duty cycle of the PWM signal can control the average voltage of the motor, thereby affecting the output current of the motor.


2.What types of motor control is L298N suitable for?
Stepper motors, linear motors, DC motors and brushed DC motors.


3.Does the L298N driver module have overheating protection function?
The L298N driver module has overheating protection function. This protection function is to ensure the safe operation of the motor and driver. During startup or operation, if an overheating fault occurs, the module will automatically cut off the motor and may display the cause of the fault through the digital tube on the control board. After the fault is eliminated, normal operation can usually be restored by pressing the reset button.

类别

Top