About L298N Motor Drive Module

Module parameters

This module uses ST's L298N as the main drive chip. It has the characteristics of strong driving ability, low heat generation and strong anti-interference ability. The main features are high working voltage, up to 46V, and the output current is also large, and the instantaneous peak current can reach 3A, continuous working current is 2A, it can be used to drive DC motors and stepping motors. It contains two H-bridge high-voltage and high-current full-bridge drivers, which can be used to drive DC motors, stepping motors, relay coils, etc. Load; standard logic level signal control module uses large-capacity filter capacitors and freewheeling protection diodes to improve reliability.Insert picture description here

Logic function of L298

Insert picture description here

About the power supply of the module

Many users will use the module because the power supply introduced is not very clear, and then use it with a lot of questions, of course, sometimes it may succeed; in addition to the L298N on the board, there is also a 7805 5V voltage regulator. Chip, when the power supply is between 5 V and 7V, the built-in 7805 chip of the module cannot work normally. The external power supply is only responsible for supplying power to the motor. At this time, you need to disconnect the onboard enable jumper cap and connect the external logic power supply of 5V to the relay terminal. , The specific wiring is shown in the figure below;
Insert picture description here
when the power supply voltage is 7-12V, you can plug in the on-board enable jumper cap at this time. At this time, the logic terminal not only does not need an external 5V power supply, but also can output 5V as a single-chip microcomputer. Supply power. At this time, the wiring can be done like this:
Insert picture description here
when the power supply is greater than 12V, the onboard enable jumper must be disconnected, and then 5V power supply is connected to the logic terminal to supply power to the chip. If you do not disconnect the onboard enable jumper cap, the built-in 7805 voltage regulator chip may be damaged.

About the drive motor:

Directly drive the DC motor. At this time, you can enable INA and INB to write the corresponding level signal to the IO port of the single-chip microcomputer to the drive board to drive the forward and reverse rotation, start and stop of the motor.
The following shows some codes.
Insert picture description here
L298N can also use PWM to adjust the speed of the motor. At this time, the enable pin is connected to the PWM signal, and the voltage of the motor is controlled by pulse modulation PWM to realize the control of the motor speed.
Part of the code is shown in the figure below.
Insert picture description here

Precautions

When driving a high-power motor with a voltage exceeding 12V, you must disconnect the onboard 5V jumper cap, and then connect a 5V voltage to the 5V port to power the internal logic of the L298N (this is an unconventional application of high-voltage drives)

to sum up

Long-term release of such articles to solve the basic knowledge of some modules, welcome to pay attention to welcome to leave a message, you can leave a message below if you need a program

Guess you like

Origin blog.csdn.net/qq_42250136/article/details/109518886