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.
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.