Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
L298N H-Bridge Motor Driver IC - 2 Pack

Building an L298 H-Bridge Circuit: Diodes, Current Sensing and First Tests

A bare H-bridge IC gives you control over the motor-driver circuit, but also gives you responsibility for the components normally hidden on a module. Diodes, supply capacitors, current-sense connections and a safe enable signal all need deliberate choices. A motor turning on the bench is only the first test.

This guide uses the L298N dual H-bridge IC as an example of planning and commissioning a discrete driver board. It belongs to PMD Way's H-bridge IC collection. The product is a bare IC; do not assume it includes the heatsink, protection components or regulator found on some assembled boards.

Start with a circuit responsibility list

Before drawing the schematic, divide the project into five jobs: command generation, power switching, inductive-current circulation, current measurement and thermal management. Give each job an identifiable component or circuit block. This makes missing functions easier to spot than working outward from a familiar module photograph.

ST describes the L298 as two full bridges with separate enable controls, a logic supply and accessible current-sense connections. Its L298 product information provides the architecture overview. The exact package drawing and electrical tables must still be checked for the device you purchase.

Questions to answer before connecting a motor
Circuit block Design question
Controller What output state exists during reset and disconnection?
Bridge Can its voltage drop and heating suit this motor?
Diodes and supply Where does winding current flow when switching changes?
Measurement What detects a jam, and what actually stops the drive?
Mechanical assembly Can the motor move safely during testing?

Copy a verified application circuit, not a module pin label

The ST L298 datasheet is the wiring authority. It specifies local decoupling for both supplies, external fast recovery paths for inductive loads and a low-inductance current-sense arrangement. It also calls for the enable input to be low during power-on and power-off. Those requirements apply even when the firmware normally behaves correctly.

Mark the physical orientation directly on your schematic printout. Check the package view before numbering pads, and check the finished board against that view with power disconnected. A symbol that looks correct can still be paired with a reversed footprint. Verify the continuity of each supply, ground, enable and output connection individually.

Keep the manufacturer's diode selection and placement requirements together with the schematic. Selecting a diode from its current rating alone misses recovery behaviour and reverse-voltage requirements. Likewise, adding a large capacitor somewhere on the workbench does not replace the local capacitors around the IC.

Understand what the sense terminals do

A sense terminal makes current information available; it does not automatically impose a safe motor-current limit. You need a defined measurement path and, if required, a control circuit that acts on that measurement. Software logging that notices a problem after several seconds is a different function from a fast hardware shutdown.

For a hypothetical shunt of 0.2 ohms carrying 0.5 A, Ohm's law gives 0.1 V across the resistor. Its dissipation is 0.05 W because power equals current squared times resistance. At twice the current, the dissipation becomes four times larger. These are example calculations, not recommended component values for every L298 design.

Select resistance with the permitted sense voltage, measurement resolution and power loss all in view. Then choose a resistor construction and rating appropriate to the waveform, ambient temperature and fault duration. A resistance value on its own is not a complete specification.

Run the measurement connections from the resistor terminals, rather than including an arbitrary length of motor-current track in the reading. TI's current-sensing layout guidance explains how unwanted track resistance creates measurement error and why Kelvin connections help. Keep the small measurement signal away from the noisy power loop.

A stepper motor needs more than a bridge

A dual bridge can energise two windings, but it does not by itself interpret step-and-direction commands or decide the correct winding sequence. A complete stepper system also needs sequencing and an appropriate current-control strategy. ST's L297 application note illustrates how an external controller works with an L298 power stage.

For a teaching project, writing a slow sequence can make the relationship between winding polarity and motion visible. For a machine that needs predictable acceleration, quiet operation or controlled winding current, compare a purpose-designed stepper driver before committing to the older bridge architecture. Match the driver to the required behaviour, rather than the number of motor wires alone.

Commission the circuit in stages

  1. Inspect without power. Check orientation, solder bridges, supply polarity, diode direction and the intended disabled state.
  2. Check the logic section. With the power stage disabled, verify the controller's reset behaviour and control signals against the schematic.
  3. Check the power supply. Use an appropriately current-limited bench supply and verify the rails at the IC, not only at the supply terminals.
  4. Connect a restrained, unloaded motor. Secure its body while leaving the shaft free. Keep loose leads and fingers clear.
  5. Apply a short command. Record supply current, motor voltage and whether the intended direction occurs.
  6. Increase the test gradually. Introduce the real mechanical load only after the basic electrical behaviour is understood.

Write down the initial conditions for every test. Supply voltage, PWM setting, load and duration matter when comparing temperature or current. “It worked yesterday” is difficult to investigate; a short table of repeatable operating conditions is useful evidence.

Diagnose symptoms by separating the stages

If the motor does not move, first confirm that the enable signal is active and the supplies remain present under load. Next compare the two motor terminals using a suitable measurement method. A single output measured relative to ground does not describe the voltage across the winding.

If the bridge becomes hot quickly, stop and investigate the actual current, voltage drop, wiring and cooling. Do not treat thermal shutdown as a normal operating control. If the controller resets when the motor starts, inspect the supply and return paths before changing the program's delays.

For intermittent faults, test reset, cable disconnection and supply removal deliberately. The desired result is a predictable disabled motor, followed by an intentional restart. Document that behaviour as part of the project, alongside the schematic and normal running measurements.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat