When you search for l2 motor driver pins, you are almost always looking at the ubiquitous L298N or L293D dual H-bridge modules. These boards use Bipolar Junction Transistor (BJT) logic to control the direction and speed of DC motors. While they are a staple in robotics and DIY automation, their pinout is only half the battle; the real challenge is matching the driver to the correct motor type and managing the significant thermal losses inherent to BJT-based H-bridges.
The direct answer for standard L298N modules is that logic pins (IN1-IN4) accept 5V digital signals for direction, Enable pins (ENA/ENB) accept PWM for speed, and the power terminals (VS, GND) handle the high-current motor supply up to 35V. However, blindly wiring these pins without understanding the load profile will lead to thermal shutdown or stalled motors. Below is the complete bench-level guide to wiring, sizing, and troubleshooting L2-series drivers.
Matching Motor Types to L2-Series H-Bridges
The L298N and L293D are not universal motor controllers. They are designed specifically for inductive loads that require simple polarity reversal. Treating different motor architectures as interchangeable is the most common cause of project failure. For instance, while a stepper and a servo both offer precise position control, their internal commutation and drive requirements are entirely different.
| Motor Type | Torque Curve | Control Needs | Avg Cost (2026) | L2 Compatibility |
|---|---|---|---|---|
| Brushed DC | High starting torque, drops as RPM increases | Simple polarity (H-bridge) + PWM speed | $2 - $10 | Native / Ideal |
| Bipolar Stepper | High holding torque at zero RPM, drops at high speed | Sequential coil pulsing (4-step or 8-step) | $10 - $25 | Native (but inefficient) |
| RC Servo | High positional torque within a limited arc | Internal H-bridge; needs 50Hz PWM pulse width | $5 - $15 | Incompatible |
| BLDC (Brushless) | High efficiency, flat torque curve across RPM | 3-phase electronic commutation + Hall sensors | $20 - $50+ | Incompatible |
If your load profile requires continuous holding torque at zero speed (like a CNC Z-axis), a bipolar stepper driven by an L298N will work, but it will run hot. If you need high-speed efficiency or 3-phase commutation, you must abandon the L2 family entirely and look at modern MOSFET-based drivers like the DRV8825 (for steppers) or an ESC (for BLDC).
L298N Pinout and Terminal Identification
The physical layout of the L298N module can be confusing because it mixes high-current screw terminals with low-voltage logic headers. Here is the exact terminal identification you need for the workbench.
| Pin / Terminal | Function | Voltage / Signal Spec |
|---|---|---|
| VS (12V) | Motor Power Supply Input | 5V to 35V DC (High Current) |
| GND | Common Ground | Must share ground with microcontroller |
| VSS (5V) | Logic Power Supply | 5V (Can be sourced from onboard regulator) |
| IN1, IN2 | Channel A Direction Control | 5V Digital Logic (HIGH/LOW) |
| IN3, IN4 | Channel B Direction Control | 5V Digital Logic (HIGH/LOW) |
| ENA | Channel A Speed Control | PWM (typically 1kHz - 5kHz) |
| ENB | Channel B Speed Control | PWM (typically 1kHz - 5kHz) |
| OUT1 - OUT4 | Motor Outputs | Switched VS voltage (up to 2A per channel) |
Most L298N modules have a jumper cap next to the VSS pin. If your motor supply (VS) is 12V or less, leave the jumper ON; the onboard 7805 regulator will step it down to power the logic. If your motor supply is greater than 12V, you MUST remove the jumper and supply a separate 5V to the VSS pin, or you will destroy the onboard voltage regulator.
Sizing Rules, Load Examples, and Failure Signatures
The STMicroelectronics datasheet for the L298N claims a peak current of 2A per channel and 3A total. Do not design your system around these peak numbers. Because the L298N uses older BJT technology rather than modern MOSFETs, it suffers from a high saturation voltage drop—typically 2.0V to 2.5V across the internal transistors.
The Sizing Rule of Thumb
Derate the continuous current limit by 40% unless you have active forced-air cooling. For a standard passively cooled module with the stock heatsink, limit your continuous draw to 1.0A to 1.2A per channel.
Worked Load Example: 12V TT Gearmotor
Let us size an L298N for a standard yellow TT brushed DC gearmotor (50:1 ratio) pulling a small rover chassis.
- Motor Rated Voltage: 6V nominal (safely overdriven to 12V for speed)
- Stall Current: 1.2A
- Source Voltage (VS): 12V
When the motor is under heavy load and draws 1.2A, the L298N will drop approximately 2.5V internally. The motor will only see 9.5V (12V - 2.5V). More critically, that 2.5V drop is dissipated as heat inside the silicon.
Power Dissipation = Voltage Drop × Current = 2.5V × 1.2A = 3.0 Watts.
Dissipating 3W of heat on a small aluminum extrusion without a fan will cause the IC junction temperature to rise rapidly. This leads directly to the failure signatures you need to monitor.
Identifying Failure Signatures
- Hum / Whine: If the motor hums but does not turn, your PWM frequency on the ENA pin may be too low (audible range) or the voltage drop across the H-bridge has reduced the effective voltage below the motor's starting threshold. Increase VS or check for voltage sag.
- Overheat / Thermal Shutdown: The L298N has internal thermal shutdown at roughly 150°C. If the module gets too hot to touch and the motor suddenly stops, then starts again after cooling, you have exceeded the continuous current limit. Switch to a MOSFET driver like the TB6612FNG, which drops only ~0.5V and runs cool at 1.2A.
- Stall / Brownout: If a mechanical jam causes a sudden current spike exceeding 2.5A, the voltage drop across the driver will spike, potentially pulling your logic voltage (VSS) down with it. This causes the microcontroller to brownout and reset. Always power your microcontroller from a separate buck converter, not the L298N's onboard 5V rail, when driving high-inertia loads.
Frequently Asked Questions
Can I use L2 motor driver pins to control a standard RC servo?
No. Standard RC servos contain their own internal H-bridge and control circuitry. They require a 50Hz PWM signal with a specific pulse width (typically 1ms to 2ms) directly from a microcontroller GPIO pin to dictate position. Wiring a servo to the high-current OUT1/OUT2 terminals of an L298N will likely destroy the servo's internal potentiometer and control board. Connect servos directly to your microcontroller's 5V and PWM pins, ensuring you have a dedicated power supply for the servo's motor current.
Why does my L298N driver overheat and shut down under load?
This is caused by the inherent voltage drop of the Bipolar Junction Transistors (BJTs) inside the L298 IC. Unlike modern MOSFET-based drivers (which act like simple resistors with very low on-resistance), BJTs drop a fixed 2V to 3V regardless of the supply voltage. That dropped voltage is converted directly into heat. If you are pulling 1.5A, you are generating up to 4.5W of heat inside a small plastic package. The fix is either to add a cooling fan, reduce the load, or upgrade to a TB6612FNG module which uses MOSFETs and generates a fraction of the heat.
How do I map L2 motor driver pins for a bipolar stepper motor?
To drive a 4-wire bipolar stepper, you will use both channels of the L298N. Wire Stepper Coil A to OUT1 and OUT2. Wire Stepper Coil B to OUT3 and OUT4. Connect IN1, IN2, IN3, and IN4 to four sequential digital pins on your microcontroller. You do not need to use the ENA and ENB PWM pins for basic stepping; you can simply jumper ENA and ENB to 5V to keep both channels permanently enabled. Your microcontroller code must then sequence the IN1-IN4 pins in a specific 4-step or 8-step wave pattern to rotate the magnetic field. For detailed wiring diagrams, refer to module-specific guides like those on Components101.
What happens if I swap the ENA and IN1 pins on my microcontroller?
If you accidentally send a digital HIGH/LOW direction signal to the ENA pin, and a PWM speed signal to the IN1 pin, the motor will behave erratically. The ENA pin acts as a master gate for the channel; pulsing it with PWM will rapidly enable and disable the entire H-bridge, which can cause severe current spikes and erratic motor stuttering. Meanwhile, the IN1 pin will receive a steady digital state, locking the direction. Always ensure your PWM-capable microcontroller pins are mapped strictly to the ENA and ENB headers, while standard digital pins handle the IN1-IN4 logic.






