# EP3 — DRV8833 Two-Motor Drive

Drives two DC motors forward, reverse, and turning with PWM speed control.

## Wiring
| DRV8833 | Connects to |
|---------|-------------|
| VM      | Battery + |
| GND     | Battery − **and** ESP32 GND (common ground!) |
| AIN1/AIN2 | ESP32 GPIO 5 / 6 |
| BIN1/BIN2 | ESP32 GPIO 7 / 10 |
| AOUT1/AOUT2 | Left motor |
| BOUT1/BOUT2 | Right motor |

## Gotchas
- **Tie the grounds together** — battery, driver, ESP32. Skip this and the motors do
  random nonsense.
- The DRV8833 is for **small motors** (mini-robot scale). Big motors → bigger driver.
- Solder a **ceramic cap** across each motor's terminals to kill electrical noise.
- Motor spins the wrong way? **Swap its two wires**, or flip the pin in code.
- Whole bot resets when motors start? That's a **brownout** — healthier battery, and ideally
  a clean separate feed to the ESP32.

More: https://minirobo.io/episodes/drv8833.html
