RSS

IC-Based H-Bridge Tutorial

04 Apr

 

An alternative to using a transistorized H-Bridge circuit is the L298 Dual Full-Bridge Driver. It is very easy to control and it doesn’t require any calculation. Simply knowing your motor’s required current and the IC’s current capacity is enough. For a price though.

 

L298 DUAL FULL-BRIDGE DRIVER


 

In order to learn this, you need to first download the IC’s datasheet file. Simply google “L298 Datasheet” or click the link —> L298 Datasheet.

H-bridge circuits are used to control the direction of the rotation of the motor. The L298 is a dual H-Bridge circuit. It is composed of 2 H-Bridges, therefore a maximum of 2 motors can be controlled simultaneously.


The amazing part of this component is that the control voltage reads logic level voltages, no need to compute for series resistors – you will have to simply connect the pin of the microcontroller (or any logic level devices) to the corresponding control pin of the L298 directly.


Given Example:

In this tutorial, we will use the L298 for driving and controlling a 1A DC Motor, with Vcc of 12V applied, and controlled by a PIC Microcontroller which I will be using for my steering wheels on my line follower robot.


Step 1: Begin with knowing the IC’s maximum ratings.


From the L298 datasheet shows the absolute max ratings.


The maximum voltage applied to the motor to be used (as well as the IC) is 50V. And the logic high input on the control voltage is 7V.

The Io or Output Current is one of the important factors that need to be considered. It is stated when you use a DC Motor, the maximum allowed current is 2 amps. If your motor requires a much larger current (for example 2.5Amps) then you might want to find other h-bridge devices.

In this case, the motor that we are using is rated 1A DC, Vs = 12V, and logic high supply from a microcontroller is 5V.


Below is a block diagram of the circuit. (You need to have a background on logic ICs to start.)


The numbers encircled in red represent the respective pins for the IC.


The picture below represents the pin configuration of the IC in TOP view.

 


Now, coming back to the L298’s block diagram, we will only use one H-Bridge since we are only controlling one DC Motor. In this case, we will use H-Bridge (B) on the right.

 


 

 

Step 2: Connecting and Biasing.

From the values we are using:

Icollector = 1 Ampere

Vcc = Vs = 12V

Pin 4 or +Vs is connected to 12V (our DC motor’s supply).

Pin 8 is connected to the ground.

Pin 15 is also connected to the ground, not unless you want to control the current flowing from the motor. In this case, we will not use it.

Pin 12 and Pin 10 is where you connect the microcontroller pins (the logic voltages).

Pin 11 is called the enable pin. It’s also logic based. Supplying logic 1 enables control, while supplying logic 0 deactivates the control. In some cases, this pin is also connected to your microcontroller (or any logic level devices) and in my case is supplied steady at logic 1.


The Pin 13 and Pin 14 is where you connect your DC motor. The connection is shown below. Never forget the flywheel diodes because it protects your IC from reverse currents produced by the motor.


Since we are not using H-Bridge (A), we can let them hang in the mean time.


Also, if you notice capacitors with values 100nF, provide them. Those are capacitors are used for protection and stable operation.


 

There you have it. You can order this component in E-Gizmo. If you don’t know how to order yet, visit How to Order at E-Gizmo page.

Advertisements
 
5 Comments

Posted by on April 4, 2011 in Tutorials

 

Tags: , , , , , , , ,

5 responses to “IC-Based H-Bridge Tutorial

  1. dale

    August 13, 2013 at 5:52 pm

    by steady logic 1 I take it you mean a steady 5 volts or is it 3.3 volts does this mean l can connect this pin to the arduino 5v out or 3.3 volt out or I could do this with any other pin as long as I enable high. hope I got this right.

     
    • k3ndro

      August 13, 2013 at 10:12 pm

      Hi there, the logic 1 refers to 5v which is common logic high.

      Yes. You could directly connect it to Arduino 5v out or any Arduino pin set to digital HIGH. Not 3.3V, as it will cause irregular outputs.

       
      • dale

        August 14, 2013 at 2:14 am

        cheers thank you.

         
  2. sridevi velpula

    July 4, 2014 at 2:46 pm

    where we are going to connect the pin 8 of L298 Ic for 12v ground or 5v ground????

     
  3. Kaylee

    June 3, 2015 at 5:17 pm

    i have same question as @sridevi velpula
    connect pin 8 to analog ground or digital ground , which is better?

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: