Ben's Blog

No description yet.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Archives
    Archives Contains a list of blog posts that were created previously.
  • Login
    Login Login form

DC Motor Controllers (2) - The L298N Dual Full-Bridge Driver

Posted by on in DC Motor Controllers
  • Font size: Larger Smaller

The L298N is a dual full-bridge motor driver available in a 15-lead multi-watt package that is popularly used in Arduino motor shields. The multi-watt packaging is required,  since this device can supply a DC current of up to 4A and has a total power dissipation of 25W. When run to it's limits and given the amount of heat this device is required to dissipate, it is not unsurprising during operation to see it tethered to a heat sink. This all sounded so interesting that I decided to check out the L298N. So an overview of this devices' characteristics and functionality forms the basis of this blog post.

 Having recently acquired a 12V DC Motor (blog post link) the L298N seems to be a great motor driver to partner it with, as I quite quickly found out by studying the datasheet. When the pinout connections of the device are considered it seems to me, from an analysis perspective, that the device can be dissected into three functional sections. These  are a power supply section and two identical motor drive sections.a1sx2_Original1_0000640.png

The Power Supply Section

By viewing the datasheet it can be determined that the device has a common ground, which supplies the return path to a logic supply voltage, Vss and a motor supply voltage, Vs. The motor supply voltage can support a minimum supply voltage of 4.6V and a maximum supply voltage of up to 46V.  

During operation the device's quiescent supply current, that is the current supplied to the device under no-load conditions, is between 50mA and 70mA. When the external supply voltage is also passed through a voltage regulator, it can be used to provide a suitable logic supply voltage, Vss. Alternatively, the logic supply voltage can be provided independently from the motor supply voltage.

Given a logic supply voltage, Vss, the device can be driven to a logic level of '1' when a microcontroller or FPGA, for example, has a voltage of between 2.3V and Vss, as can be seen in the Figure below. Likewise, the logic of the  L298N can be driven low when the driving device has an output logic level of between 1.5V and ground, also seen in the Figure below.


The Motor Drive Channels

The L298N is capable of driving two brushed DC motors or one stepper motor. Each motor drive unit consists of the set of pins shown in the topmost figure.

Two input pins are used to set the mode of an attached motor as either  forward motion, reverse motion or (fast motion) stop. Also, each channel has  two output pins which are used to power a DC motor. The power presented to each of the two motors is regulated individually through the use of a Pulse Width Modulated (PWM) signal, which is supplied on the voltage enable pin, Ven, as can be seen in the top most Figure.

Voltage Enable and Current Lag

One intriguing thing that is discovered by reading the datasheet is that when the voltage enable pin is toggled from off to on, there is a corresponding current lag, typically of about two and a half microsecond, before current actually flows through the motor.

Likewise, when the voltage enable is set from on to off there is a delay before the current is switched off of about four microseconds. Could this have consequences with the back emf still flowing into a motor. Dead band. WIP






Last modified on
Tagged in: arduino DC Motor