
This circuit uses an ESP32 microcontroller to control two DC motors via a SparkFun Motor Driver TB6612FNG. The motor driver is powered by a 12V battery and receives control signals from the ESP32 to manage the speed and direction of the motors.

The SparkFun Motor Driver TB6612FNG (v11) is a versatile and efficient dual H-bridge motor driver capable of controlling two DC motors independently or one bipolar stepper motor. Its compact form factor and ease of use make it an excellent choice for small robotics projects, educational purposes, and hobbyist applications.

This circuit uses an ESP32 microcontroller to control two DC motors via a SparkFun Motor Driver TB6612FNG. The motor driver is powered by a 12V battery and receives control signals from the ESP32 to manage the speed and direction of the motors.

This circuit features an Arduino Nano microcontroller interfaced with a TB6612FNG motor driver to control two DC Mini Metal Gear Motors. It also includes an HC-SR04 Ultrasonic Sensor for distance measurement, a 5 channel IR sensor for line tracking, and a Servomotor SG90 for positioning tasks. The system is powered by a 12V battery, with the Arduino Nano managing sensor inputs and motor outputs to perform tasks such as navigation or automation.

This circuit uses an Arduino UNO to control a motor driver (SparkFun TB6612FNG) and a four-pin LED. The Arduino provides power and control signals to the motor driver, which in turn drives two motors, while the LED is connected through resistors to various digital pins on the Arduino for color control.

This circuit controls two DC motors using a TB6612FNG motor driver, which is interfaced with an Arduino Mega 2560 microcontroller. The Arduino provides PWM signals to control the speed and direction of the motors. Multiple IR sensors are connected to the Arduino's analog inputs, likely for sensing the environment or for line-following capabilities in a robot.
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VM | Motor voltage supply, connects to the motor power source |
| 2 | VCC | Logic voltage supply, connects to the control board (e.g., Arduino) |
| 3 | GND | Ground pin |
| 4 | A01 | Motor A output 1 |
| 5 | A02 | Motor A output 2 |
| 6 | B01 | Motor B output 1 |
| 7 | B02 | Motor B output 2 |
| 8 | PWMA | PWM input for motor A speed control |
| 9 | AIN1 | Direction control for motor A |
| 10 | AIN2 | Direction control for motor A |
| 11 | STBY | Standby pin (active low) |
| 12 | BIN1 | Direction control for motor B |
| 13 | BIN2 | Direction control for motor B |
| 14 | PWMB | PWM input for motor B speed control |
Power Connections:
Motor Connections:
Control Connections:
// Define the connections to the TB6612FNG
const int PWMA = 3; // PWM control for motor A
const int AIN1 = 4; // Direction control for motor A
const int AIN2 = 5; // Direction control for motor A
const int STBY = 6; // Standby
void setup() {
// Set all the motor control pins to outputs
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(STBY, OUTPUT);
// Take the motor driver out of standby
digitalWrite(STBY, HIGH);
}
void loop() {
// Set motor A to spin in one direction
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 128); // Set speed (0 to 255)
delay(1000); // Run for 1 second
// Set motor A to spin in the opposite direction
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, HIGH);
analogWrite(PWMA, 128); // Set speed (0 to 255)
delay(1000); // Run for 1 second
// Stop the motor
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 0); // Set speed to zero (motor off)
delay(1000); // Wait for 1 second
}
This example demonstrates basic forward and reverse control of a motor connected to motor driver A. Adjust the analogWrite value between 0 and 255 to control the speed of the motor.