Introduction
Unlike a servo motor, which comes with a dedicated control board within its housing, a stepper motor or a simple DC motor does not come with a control board that can control the speed or direction of rotation.
To help sort this problem, the L298 H-Bridge motor driver can control almost any type of DC motor as long as it can provide the motor with the driving voltage. It can control the direction of rotation, as well as the speed.

In this article, we will discuss how the L298 H-Bridge motor driver works and what its applications are in the world of electronics.
Design of L298 H-Bridge Motor Driver
The H-Bridge motor driver features an L298 15-lead multiwatt package. The L298 package is a high-voltage, high-current dual Full-bridge driver that is designed to accept TTL logic levels and is able to drive inductive loads such as relays, solenoids, Stepper motors, and DC motors.
Inputs
This H-bridge motor driver features 9 input pins that include:
- Enable-pins: There are 2 Enable pins, ENA & ENB. Each enable pin is designed to control two output pins in order to control which output pin remains HIGH to control the motor.
- Input-pins: There are 4 input pins, IN1, IN2, IN3, and IN4. Each input pin is programmed to its corresponding output pin and is responsible for controlling the flow of current, which can be used to control the direction of the output, especially if it’s a motor.
- Power inputs: This driver requires a 12-volt nominal power input to operate this module; however, if you require higher current, then this module supports up to 46 volts DC input with 2 Amperes of current per output channel.
Outputs
The module offers 5 outputs, which include:
- Output channels: These channels can be paired up to control one single motor; hence, this module can control 2 motors at a time.
- 5 volts output: The module offers a 5 volts regulated output that can be used to control a microcontroller or an external sensor.
Operation Principle
For the sake of simplicity, we will take a DC motor as an example to explain the operation of the module.

To control a motor connected at OUT1 and OUT2, we will need an input at pin IN1 and IN2, along with an enable pin ENA that allows input signals to take effect at the output. We will discuss some of the scenarios to explain the working of the module.
- ENA=HIGH, IN1=HIGH, IN2=LOW
The enable pin is being controlled by a PWM signal, which, when HIGH, allows the signals at IN1 and IN2 to generate an output. In this scenario, IN1 is HIGH, and this will allow the connected DC motor to rotate in a clockwise direction.
- ENA=HIGH,IN1=LOW,IN2=HIGH
The enable pin is HIGH again, but this time IN2 is HIGH and IN1 is low. This change will cause the motor to rotate in counter counterclockwise direction since the flow of current within the H bridge changes direction.
- ENA=HIGH,IN1=IN2
This case has the Enable pin set as HIGH, but the IN1 and IN2 can either be HIGH together or can be LOW together. This scenario will cause the motor to come to a stop and can act as a braking signal to stop a moving motor from rotating.
- ENA=LOW, IN1=HIGH, IN2=LOW
In this scenario, since the Enable pin is low, it does not matter what the input is at the IN1 and IN2 pins, since the enable pin will not activate the circuit. You can also control the speed of the motor by adjusting the duty cycle of the Enable pin PWM input.
Applications
- Robotics: Can be used in mobile robotics systems in industries to control the movement of the motors and also their speed. These are perfect for robots that use the line following mechanism.
- CNC Machines: Perfect for controlling the stepper motors to move the spindle head of a CNC machine along the X, Y & Z axes.
- Solenoid Valve control: Can be used to operate solenoid valves to control a process system.
Conclusion
The H-bridge motor module offers a brilliant design that is capable of turning a basic motor into a controllable one, so that you can enhance your projects. With this article, you will be able to precisely control a motor using the L298 H-Bridge motor driver, and to source an L298 package, check out Flywing-Tech for more information.