Electronic – arduino – How to wire a motor driver power supply

arduinodc motor

I'm trying to wire and control TB6612FNG Dual Motor Driver Carrier, but am doing something wrong. Why is the motor not running?

I have the vcc and gnd connected to a 5v power source, and ao1 and ao2 connected to my motor.

When connecting the power source directly to the motor, the motor runs.

pwma, ain1, ain2, and stby pins are connected the pins as expected from the sketch. I also have the gnd pin on the logic side of the board connected to a gnd pin on the arduino(uno v2). PWMA is connected to pin 5, which is a digital pin.

const int stby=2;
const int in1=3;
const int in2=4;
const int pwm=5;

void setup() {
  // put your setup code here, to run once:
  pinMode(stby, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(pwm, OUTPUT);
  forward(255);
}

void loop() {
}

void forward(int speed)
{
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  digitalWrite(stby, HIGH);
  analogWrite(pwm, speed);
}

Best Answer

Vcc is the logic supply, i.e it powers the chip. VMOT is the motor voltage. the chip has two H-bridge drivers that basically attach VMOT across the motor in either reverse or forward polarity. Both of these need to be powered. They give you two so you can use a higher voltage on VMOT which may be required by the motors.

Make sure you don't exceed the voltage specs:

Recommended motor voltage (VMOT): 4.5 – 13.5 V Logic voltage (VCC): 2.7 – 5.5 V

If you put 5V on both Vcc and Vmot, they should be powered adequately.

There may be additional issues with your other wiring and code, but, I won't address them until you fix your power problem is resolved and we can be sure there are other issues.

ADDED:

Here is the schematic of the breakout board, this seems to show that you still need to attempt powering both.

sch

Vcc and Vmot are NOT connected on this board, have you tried using a multimeter to measure if they are on yours?

Related Topic