In this guide
Somewhere between the robot that worked on the bench and the robot that died on demo day, there is usually a motor driver that was chosen by price and vibes. The failure modes are depressingly consistent: a driver rated "2A" that overheats at 1A, a robot that cannot climb the ramp it climbed yesterday because the driver is dropping 2 volts as heat, or the magic smoke released in front of the evaluators when a stalled motor drew five times its running current.
This guide is the selection procedure: how to read a motor's actual current needs (running vs stall — the distinction that kills drivers), what the L293D, L298N, TB6612FNG, and BTS7960 genuinely deliver (datasheet numbers, plus where cheap modules fall short of them), the heat math that predicts failure before it happens, PWM wiring for each, and the wiring mistakes that destroy drivers regardless of ratings. The examples are robot-shaped — fire-fighting robots, pick-and-place arms, gesture-controlled arms — but the method applies to any DC motor load.
The one number that matters: stall current
A DC motor draws current proportional to load. Two numbers describe it:
- Running (rated) current: what it draws moving your robot on flat ground — often a few hundred milliamps for small gear motors.
- Stall current: what it draws when the shaft cannot turn — starting up, pushing against a wall, lifting at the arm's limit. This is typically 3–8× the running current, and the driver must survive it, at least briefly.
Measure stall current yourself: lock the shaft (gently — pliers with padding, not your fingers near a powerful motor), apply the rated voltage, and read the current with a multimeter on the 10 A range. Do it quickly (a few seconds) — a stalled motor is a heater. If you cannot measure it, estimate from the motor's datasheet, or assume 5× running current as a planning figure.
The rule: size the driver for the stall current, not the running current. A driver rated exactly at your running current will die the first time the robot pushes against something. This single habit eliminates most demo-day driver failures.
Worked example: a 12 V gear motor draws 0.4 A cruising and 2.2 A stalled (measured). Your driver needs to handle 2.2 A continuously-ish and survive it thermally. An L298N (2 A per channel, bipolar, lossy — see below) is marginal-to-wrong here; a BTS7960 is comfortable. That decision took one measurement.
The contenders: what each driver actually is
| Driver | Technology | Rated per channel | Realistic continuous (cheap module) | Voltage range | The honest summary |
|---|---|---|---|---|---|
| L293D | Bipolar H-bridge | 600 mA (1.2 A peak) | ~500 mA | 4.5–36 V | Only for tiny motors; internal flyback diodes |
| L298N | Bipolar dual H-bridge | 2 A (3 A peak) | ~1–1.5 A with the stock heatsink | 5–35 V (module) | Cheap and everywhere; inefficient — burns volts as heat |
| TB6612FNG | MOSFET dual H-bridge | 1.2 A (3.2 A peak) | ~1 A | 2.5–13.5 V | The efficient small-motor choice; no heatsink drama |
| BTS7960 (×2 = full bridge) | MOSFET half-bridge, 43 A rated silicon | 43 A (silicon) | ~10–20 A on the common module with heatsink | 5.5–27.5 V | The heavyweight; current-sense output; needs respect |
A note on "realistic continuous": the headline current on a ₹150 module is the silicon's rating under ideal cooling. The module in your hand has a small heatsink (or none), thin PCB copper, and screw terminals of uncertain quality. Derate aggressively — the "realistic" column above is what experienced builders plan around.
L293D: the small-motor specialist
The L293D's 600 mA per channel suits only small motors — pager-style vibration motors, tiny DC motors in line-followers built light. Its virtue is integration: internal flyback diodes and a dead-simple 16-pin DIP package. If your motor's stall current is under ~500 mA, it is fine. Above that, it is not "a bit stressed" — it will thermal-cycle into failure. Most robot builders outgrow it immediately; that is normal.
L298N: the ubiquitous compromise
The red (or blue) L298N module is in every beginner kit for good reasons: it is cheap, it handles two motors, the screw terminals are convenient, and a thousand tutorials wire it. Understand its costs:
It is bipolar, not MOSFET. The output transistors saturate at roughly 2 V total drop (about 1 V on the high side + 1 V on the low side) at 1 A — worse at higher current. That drop is pure heat: at 1 A per channel, each channel burns ~2 W; two channels at 1 A = ~4 W on a small heatsink. The worked heat math:
- Motor supply 12 V, motor draws 1 A. Voltage reaching the motor ≈ 12 − 2 = 10 V. The motor runs slower than its rating, and 2 W per channel heats the module.
- At 1.5 A the drop approaches ~2.5–3 V and the heat approaches 4 W per channel — the stock heatsink gets painfully hot, thermal protection (if the chip has it — the L298 has thermal shutdown, many clones behave worse) starts cycling, and the robot stutters.
The 5 V regulator jumper trap: the module has an on-board 5 V regulator and a jumper (often labelled "5V EN"). With the jumper ON and motor supply ≤12 V, the module makes its own 5 V logic supply. With motor supply >12 V, you must REMOVE the jumper and feed 5 V logic separately — leaving it on with a 16–24 V motor supply cooks the regulator. This jumper has killed more L298N modules than overcurrent.
Verdict: acceptable for small robots (BO motors, stall under ~1 A per channel) on 6–12 V, with the heatsink on and airflow. Wrong for anything bigger, anything 24 V, or anything where battery life matters (that 2 V drop is energy thrown away).
TB6612FNG: the efficient middle
The TB6612FNG is a MOSFET H-bridge: voltage drop in the tens of millivolts at 1 A instead of volts. Same small robot, dramatically less heat, longer battery life, no heatsink. Rated 1.2 A continuous per channel (3.2 A peak), 2.5–13.5 V. If your motors fit in its envelope, it is simply a better L298N — smaller, cooler, more efficient. Its only real limitation is the 13.5 V ceiling and the 1.2 A continuous rating: 12 V gear motors with stall currents above ~2 A need the next step up.
BTS7960: the heavyweight
The BTS7960 module is actually two half-bridges (each a high-current MOSFET half-bridge rated 43 A in silicon) that you wire as one full H-bridge for a single motor — or buy the dual-module boards for two motors. Realistic continuous current on the common module with its heatsink: plan for ~10 A, more with airflow and good wiring. Key features:
- Very low on-resistance (~16 mΩ per the datasheet): at 5 A, the drop is ~0.08 V and the heat ~0.4 W — essentially negligible. This is why big robots use it.
- Current-sense (IS) pins: each half-bridge reports a current proportional to the motor current — real, usable current feedback for stall detection (worked example below).
- Enable and PWM pins per side (R_EN, L_EN, RPWM, LPWM): direction and speed with two PWM signals, or one PWM + direction logic.
Respect it: 43 A of silicon with a weak battery or thin wires just moves the failure to the wires and connectors. Use thick power leads, a battery that can actually deliver the current, and a fuse. A 20 A fuse on the battery lead is cheap insurance against a shorted H-bridge welding itself on.
The decision procedure
- Measure or estimate stall current per motor (the 10 A-range multimeter test above).
- Note the motor supply voltage (6 V, 12 V, 24 V — the driver must cover it).
- Pick from the table:
| Your situation | Pick |
|---|---|
| Stall < 0.5 A, ≤36 V, simplest wiring | L293D |
| Stall < 1 A, 6–12 V, kit-standard, some heat OK | L298N (heatsink on, jumper checked) |
| Stall < 1.2 A, ≤13.5 V, battery-powered, want efficiency | TB6612FNG |
| Stall 2–15 A, 12–24 V, big wheels/arms/actuators | BTS7960 |
| Stall > 15 A | BTS7960 with serious cooling and wiring — or reconsider the motor |
- Do the heat check (below) for the chosen driver at stall current. If the numbers look scary, go one size up.
- Check the PWM plan: every driver here takes logic-level PWM; confirm your microcontroller's PWM voltage matches the driver's logic input (3.3 V ESP32/STM32 into a 5 V-logic L298N module usually works — the thresholds are TTL-compatible — but verify on the bench).
Heat math: predict the smoke
Heat is what actually kills drivers, and it is calculable before you buy:
Bipolar drivers (L293D, L298N): P ≈ V_drop × I. L298N at 1 A: ~2 V × 1 A = 2 W per channel. Two channels = 4 W. A small clip-on heatsink in still air handles roughly 3–5 W before the chip gets uncomfortably hot (>80 °C). So: two channels at 1 A each is the practical limit of the stock module; beyond that, add a fan, a bigger heatsink, or a bigger driver.
MOSFET drivers (TB6612FNG, BTS7960): P ≈ I² × R_ds(on). BTS7960 at 5 A: 25 × 0.016 = 0.4 W — barely warm. At 15 A: 225 × 0.016 = 3.6 W — needs the heatsink and airflow it ships with. The quadratic scaling is the thing to internalise: doubling the current quadruples the heat.
The touch test (after the math): run the robot under load for two minutes, then touch the heatsink. Warm = fine. Uncomfortably hot = marginal, add cooling. Too hot to touch (>~60 °C) = you are living on thermal shutdown; fix it before demo day. An IR thermometer is better than a finger, but the finger is always available.
Wiring each driver (the pins that matter)
L298N module
| Module pin | Connect to | Notes |
|---|---|---|
| 12V / VCC | Motor battery (6–12 V typical) | Never the Arduino 5 V pin |
| GND | Battery negative and Arduino GND | Common ground — the #1 wiring bug is skipping this |
| 5V | Arduino 5 V (only if the 5V-EN jumper is REMOVED and motor supply >12 V) | With jumper ON and ≤12 V supply, the module makes its own 5 V |
| ENA / ENB | PWM pins (or jumpered HIGH for full speed) | Remove the enable jumpers to use PWM speed control |
| IN1 / IN2 | Digital pins (motor A direction) | IN1=HIGH, IN2=LOW → one way; swapped → reverse; both LOW → coast; both HIGH → brake |
| IN3 / IN4 | Digital pins (motor B direction) | Same logic |
| OUT1 / OUT2 | Motor A leads | Either polarity — swap to flip "forward" |
| OUT3 / OUT4 | Motor B leads |
BTS7960 module (one full bridge = two half-bridge boards wired together, or a dual integrated board)
| Pin | Connect to | Notes |
|---|---|---|
| RPWM / LPWM | Two PWM pins | RPWM duty = forward speed, LPWM duty = reverse speed (never drive both at once) |
| R_EN / L_EN | 5 V (or digital pins for software enable) | Tie HIGH to enable; pull LOW to disable |
| R_IS / L_IS | Analog inputs (optional) | Current sense — see below |
| VCC | 5 V logic supply | Powers the driver logic |
| GND | Battery negative and microcontroller GND | Common ground, again |
| B+ / B− | Motor battery (up to ~24 V) | Thick wires; fused |
| M+ / M− | Motor leads |
Current-sense worked example (BTS7960): the IS pin sources a current proportional to the motor current at roughly 1:8500 (check your module's documentation — the ratio lives in the datasheet). With the module's sense resistor (commonly ~1 kΩ on cheap boards — verify yours), motor current 5 A → IS current ≈ 5/8500 ≈ 0.59 mA → voltage ≈ 0.59 V across 1 kΩ. Read it with the ADC, scale back up, and you have stall detection: if current exceeds your threshold for more than a second, cut the PWM and flag it. Calibrate against your multimeter's 10 A-range reading once, then trust the sensor.
TB6612FNG breakout
| Pin | Connect to |
|---|---|
| VMOT | Motor supply (2.5–13.5 V) |
| VCC | 3.3 V or 5 V logic |
| GND | Common ground (both grounds on the breakout tie together) |
| STBY | Pull HIGH (LOW = standby, outputs off) |
| PWMA / AIN1 / AIN2 | PWM + two direction pins for motor A |
| PWMB / BIN1 / BIN2 | Same for motor B |
| AO1 / AO2, BO1 / BO2 | Motor leads |
The STBY pin catches everyone once: the driver does nothing at all until STBY is HIGH. If your motors are dead silent and the wiring looks right, check STBY first.
PWM frequency: the audible trade-off
- ~490 Hz (Arduino default): works, but the motor audibly whines. Fine for a first test, annoying for a demo.
- 1–5 kHz: quieter whine, efficient switching, the practical default for small robots.
- 20 kHz+ (ultrasonic): silent, but switching losses rise and cheap drivers get less efficient; also demands cleaner wiring.
Set the frequency your microcontroller supports easily (ESP32's LEDC peripheral and STM32 timers both do this well) and move on; frequency is a refinement, not a selection criterion.
The failure table: what dies and why
| Symptom | Cause | Fix |
|---|---|---|
| Driver works 5 minutes, then robot stutters/stops, recovers after rest | Thermal shutdown cycling — driver undersized for the current | Bigger driver, bigger heatsink, fan, or lower the load |
| Magic smoke on first power-up | Shoot-through from wiring error, or motor supply into logic pins | Rewire carefully; check every pin against the tables above before powering |
| Motors run with USB connected, die on battery | Battery cannot deliver stall current (voltage collapses) | Bigger battery / lower internal resistance; measure voltage under load |
| One direction works, the other does not | Direction pin floating or miswired; (BTS7960) both PWMs driven | Check IN pins / RPWM-LPWM logic; never drive both PWMs simultaneously |
| Robot slower than the motor's rating suggests | L298N's ~2 V drop (bipolar loss) | Expected with L298N; raise supply within limits, or switch to a MOSFET driver |
| Arduino resets when motors start | Motors powered from Arduino 5 V pin, or no common ground + back-EMF | Separate motor supply, common ground, bulk capacitors at the driver |
| BTS7960 board gets hot at modest current | Thin power wires / poor battery → the connections heat, not the silicon | Thicker leads, better battery, check screw terminals are tight |
| L298N 5 V regulator smokes | 5V-EN jumper left ON with >12 V motor supply | Remove jumper, feed logic 5 V separately |
Back-EMF honesty: the L293D includes internal flyback diodes; the L298 chip's datasheet shows external fast diodes, and many cheap L298N modules omit them. For small motors at modest currents the body diodes and layout usually suffice; for large inductive loads or long motor leads, add external fast-recovery diodes (e.g. 1N5822 Schottky) across each motor terminal pair. When in doubt, add them — diodes are cheaper than drivers.
Selection checklist
- Stall current measured (or conservatively estimated at 5× running current).
- Driver chosen from the decision table with margin above stall current, covering the motor voltage.
- Heat check done: bipolar P ≈ V_drop × I, MOSFET P ≈ I² × R_ds(on) — numbers sane for the heatsink at hand.
- Common ground between logic and motor power; motor supply separate from the microcontroller's regulator.
- L298N: 5V-EN jumper position correct for the motor voltage. TB6612: STBY pulled HIGH. BTS7960: fused battery lead, thick wires.
- PWM frequency chosen; duty ramped in software (no 0→100% steps on big motors — the current spike is the stall current, every time).
- Stall behaviour defined in firmware: current-sense or timeout cuts drive before the driver cooks.
Pick the driver with a multimeter and a calculator, not with optimism. The thirty minutes this takes is the difference between a robot that survives demo day and a small, fragrant lesson in thermal management. For arm and chassis builds that put these drivers to work, the pick-and-place robotic arm and gesture-controlled arm show the mechanics; this guide makes sure the electronics behind them survive.
A note on servos and steppers (what this guide does not cover)
This guide is about DC motors, which need an H-bridge driver because you control them with raw voltage and PWM. Two motor types you will meet do not work this way:
- Servos (the SG90/MG996R hobby kind) have the driver electronics built in — you feed them power plus a 50 Hz PWM position signal directly. No H-bridge needed; the selection question for servos is torque and whether your supply can deliver their stall current (an MG996R can pull over 1 A stalled — do not power it from the Arduino 5 V pin).
- Steppers need a stepper driver, not an H-bridge: A4988 or DRV8825 for small NEMA-17 motors (set the current limit with the onboard potentiometer before connecting the motor — measure Vref and compute from the driver's formula), TMC2209 when you want silent stealthChop operation. The selection procedure is the same as here — rated current per phase vs driver capability, heat check — but the driver category is different.
Soft-start: the firmware habit that saves drivers
The worst current spike a driver sees is not a stall — it is every startup, when you step the PWM from 0 to full instantly. The motor is momentarily stalled at every start, so it draws stall current for the first instants. Ramping the duty over a few hundred milliseconds costs nothing and removes that spike from normal operation:
for (int duty = 0; duty <= targetDuty; duty += 5) {
analogWrite(pwmPin, duty);
delay(10); // ~200 ms ramp to full — tune to your mechanism
}
Do the same in reverse when stopping heavy mechanisms — instant braking dumps the kinetic energy back into the supply as a voltage spike. On large robots, that spike is what kills the driver's logic supply; a bulk capacitor (470–1000 µF) across the driver's power input absorbs it. Size the capacitor's voltage rating at least 1.5× your supply voltage.
Buying the driver: module quality varies
The schematic of a cheap L298N module and a good one is nearly identical; the difference is in what you cannot see: PCB copper weight, heatsink mounting pressure, screw terminal quality, and whether the "L298N" chip is genuine. Practical buying rules: prefer modules with a properly screwed-down heatsink (not glued), tug-test the screw terminals before wiring (loose terminals arc under load), and for the BTS7960, check that the heatsink is actually flat against the chips — a surprising number of cheap boards ship with a visible gap. Buy one spare of whichever driver you choose; at these prices the spare is cheaper than the week you would lose waiting for a replacement after a wiring mistake.