Phipps Electronics

Order within the next 

FREE SHIPPING OVER $199

50,000+ ORDERS

WORLDWIDE SHIPPING

SSL SECURED

Skip to main content
← Back
You are here:
Print

WeMos D1 Mini I²C Dual Motor Driver Shield (TB6612FNG) User’s guide


WeMos D1 Mini I²C Dual Motor Driver Shield (TB6612FNG)

1. Overview

  • Driver IC: TB6612FNG (modern replacement for L293D, more efficient).
  • Motors Supported: 2 DC motors (independent) or 1 stepper motor.
  • Control Interface: I²C (address configurable via jumpers).
  • Stackable Shield: Fits directly on WeMos D1 Mini.
  • Voltage: Logic at 3.3 V (ESP8266 native), motor supply up to 15 V.
  • Current Capacity: ~1.2 A continuous per channel, 3.2 A peak.

2. Pinout & Connections

The shield uses I²C pins of the D1 Mini:

Function D1 Mini Pin Notes
SDA D2 I²C data line
SCL D1 I²C clock line
VM External motor supply (up to 15 V)
GND Ground
A+/A– Motor A terminals
B+/B– Motor B terminals

The shield draws logic power from the D1 Mini (3.3 V). Motors require a separate supply connected to VM + GND.


3. How It Works

  • The TB6612FNG has two H‑bridge channels.
  • Via I²C commands, you set motor direction (forward/reverse), speed (PWM duty cycle), and braking.
  • The shield firmware/library handles I²C communication, so you don’t need to manually toggle GPIO pins.

4. Arduino/ESP8266 Code Example

Install the WEMOS_Motor_Shield library (available via Arduino Library Manager).

#include <WEMOS_Motor.h>

// Motor shield at I2C address 0x30
Motor M1(0x30, _MOTOR_A, 1000); // freq = 1kHz
Motor M2(0x30, _MOTOR_B, 1000);

void setup() {
  M1.begin();
  M2.begin();
}

void loop() {
  M1.speed(100);   // Motor A forward, speed 100/255
  M2.speed(-100);  // Motor B reverse, speed 100/255
  delay(2000);

  M1.stop();
  M2.stop();
  delay(1000);
}

5. Applications

  • Robotics: drive two DC motors for wheels.
  • DIY controllers: motorized sliders or knobs.
  • Educational kits: demonstrate I²C motor control.
  • Stepper motor projects: use both channels together.

6. Best Practices

  • Always use a separate motor power supply (VM) — don’t power motors from the D1 Mini’s 5 V pin.
  • Keep motor wiring short to reduce noise.
  • If stacking multiple shields, configure unique I²C addresses via jumpers.
  • Use PWM frequencies around 1 kHz for smooth motor control.

 

Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents
Scroll to Top