Pages: [1]   Go Down
Author Topic: controlling motors with TB6612FNG driver and TLC5940 PWM  (Read 886 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Hope this doesn't seem too naive, but I am having a lot of trouble driving a TB6612FNG based shield with a  TLC5940 PWM expander:

I've had this project going where I have been driving a series of dc motors with fishing line. if you are interested here is the project: www.vorticose.ocular-witness.com

Up until this point, I have been using an arduino mega with about 4 motor driver sheilds:

http://www.robotshop.com/ca/productinfo.aspx?pc=RB-Dfr-58&lang=en-US

http://www.robotshop.com/ca/content/PDF/manual-dri0009.pdf


this worked fine using the PWM pins from the arduino but was limiting. (I was limited to 8 motors with this)


I am now expanding this scenario to 30 motors using:

this motor driver: http://www.sparkfun.com/products/9457 that is based on the TB6612FNG chip.

and to expand the number of PWM pins using this shield: http://www.practicalmaker.com/tutorials/pwm-shield-documentation

that is based on the TLC5940 16-channel LED Driver

The motor driver works fine when hooked up to an arduino with PWM and digital outs for High / low directional instructions.

But things get messy when I use the LED driver for PWM.

To begin with, the PWM jumpers have BOTH a ground and a power. Which for the PWM for arduino there is only one PWM signal.

So I send the signals to the motor driver from the arduino using digital outs for the motor state to the motor driver. And a PWM signal through the PWM sheild. The negative I hook up to the common ground. This overheats the motor driver chip and simply doesn't work. I am not sure what to do with the ground from the PWM sheild jumper.

My first thought is that the arduino and the TLC5940 have different kinds of PWM.

Really stuck with an impending deadline: any advice would be really appreciated.
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What frequency PWM does that shield give?  What frequency do the motors / controller chip want?  Could explain the overheating if too high.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good question: the TLC5940 (PWM shield) lists both the Data Shift Clock and the Greyscale frequencies as being 30 MHZ. The Motor driver lists the switching frequency at a maximum of 100mhz.
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are confusing logic switching speed with the PWM frequency.  kHz values are most likely for the latter.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's entirely possible, I am a bit out of my element here. The pololu site lists the same motor driver as having a maximum PWM frequency of 100 khz. And the TB6612FNG having a greyscale clock frequency of 30MHZ (I am assuming that's the pwm frequency for that chip). The arduino PWM frequency is at 500hz. That explains a lot (I think). Is it possible at all to change the frequency of the PWM driver? 
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know (but the datasheet should know).  several kHz is probably enough - unless the motor driver can switch fast you don't want to push it to high frequencies unnecessarily, that means more switching losses.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: