1
\$\begingroup\$

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);
}
\$\endgroup\$
2

1 Answer 1

5
\$\begingroup\$

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?

\$\endgroup\$
13
  • \$\begingroup\$ @antony.trupe: I am quite sure that both VMOT and Vcc need to be powered. VMOT does not power the chip. I explained this a little further above. This is required by the architecture of the driver chip (pololu.com/file/download/TB6612FNG.pdf?file_id=0J86) . It is a pretty typical architecture used by most of these driver chips. \$\endgroup\$ Commented Dec 8, 2011 at 1:01
  • \$\begingroup\$ @antony.trupe: The circuitry on your breakout board is a couple of decoupling caps and and a mostfet for polarity protection. i.e. the breakout board works almost identically to the chip it breaks out. You need to try what I am saying to verify, I have a valid point here based on the other datasheet. \$\endgroup\$ Commented Dec 8, 2011 at 4:31
  • 1
    \$\begingroup\$ Well... all the documentation contradicts what you are saying. Explain these specs: Recommended motor voltage (VMOT): 4.5 – 13.5 V, Logic voltage (VCC): 2.7 – 5.5 V. Why would there be different voltage ranges if you didn't need to power VCC and VMOT separately? Anyway, if you've answered your own question then post the answer. \$\endgroup\$ Commented Dec 8, 2011 at 22:00
  • 1
    \$\begingroup\$ @antony.trupe, you have not posted an answer that seems valid yet. I think that dave has valid points, but as a moderator, I am only here to settle a seeming dispute. The reason your "answers" have been removed because they read like nothing more then comments on the question which should be edits updating what you know. YOu need to explain how it is an answer. You never told us in the question how you had connected them very clearly, how did you expect anyone to get that answer. This answer actually looks at a datasheet and explains what is missing. \$\endgroup\$
    – Kortuk
    Commented Dec 9, 2011 at 0:03
  • 1
    \$\begingroup\$ Sigh, and now I see how I was interpreting the diagram wrong. I somehow failed to see that it's connecting pins on the IC to pins on the carrier board. It now doesn't make sense to me that it works. \$\endgroup\$ Commented Dec 9, 2011 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.