PWM Frequency

I am planning my first Robot and I have run into a bit of a head scratcher. I am planning to use an Arduino Pro Mini just because I have used them before. to drive a #713. The problem is to my surprise the Arduino PWM is only 490 Hz. It seems this is way too slow for a motor and the result will be very inefficient. I see that the 713 can be driven by an analog signal and maybe it can set the actual motor frequency but can the 490 Hz signal be used as an analog input for the H bridge?
pololu.com/docs/0J15/4 talks about configuring timers and registry values and 20MHz but I dont understand how this is done as the 713 does not have a programing input.
Can anyone help me understand how this is normally handled? Would I be better off with different HW like maybe a Orangutan?
Thanks

Hello.

In what sense do you think that 490 Hz will be “inefficient”? The TB6612FNG motor driver (product #713) does not accept an analog voltage input; what makes you think that it does? You can supply it with a PWM signal and it will PWM the motor outputs in response, but a PWM is not the same as an analog voltage (do not let Arduino’s very poorly named analogWrite() function fool you). It will work with a 490 Hz PWM.

The document you linked to talks about configuring an AVR microcontroller (the same microcontroller as is on the Arduino Uno), to generate a 20 kHz PWM for the TB6612, not about programming the TB6612 motor driver IC. Specifically, it refers to our Orangutan robot controllers, which are like Arduinos with integrated motor drivers. Several of our Orangutans actually use the TB6612 motor driver, and we have libraries for the Orangutan that make it easy to use them if you’re comfortable with C.

- Ben

Well let start with this fundamental question. My thinking is that the current rise and fall times in the motor will be a only a fraction of the cycle time. I guess I need to measure the inductance of the motors. I’ve just never heard on PMW lower then the kHz or even MHz range for commercial motor controls. So I’m assuming the motor inductance would be low enough that at 490Hz the I^2R losses would be high in the motor.

I know that a PMW in not “the same as” analog. In some cases it can be used “as” one, as in “as a replacement for”. Driving a motor is surly an example of this. My question would have been better stated as: Does the TB6612 have the ability to generate its own 20kHZ driver frequency and follow the duty cycle of the slower 490Hz signal from the Aduino. I’m not sure where I thought I read that it would take an analog input as I cant find it now. So it sounds like the answer to the question is no.

Thanks for breaking down the AVR programing bit. I had never really looked at the Orangutans but I see that they have a lot going for them. Will they drive the motor at 20 kHz? I may give one a try.

Thanks for your help Ben I’ll report back what I find with the motor inductance.

Good Reading on how to up the PWM frequency on the Arduino:
arduino.cc/en/Tutorial/SecretsOfArduinoPWM
arduino.cc/cgi-bin/yabb2/YaB … 1152547089

I think you are misusing the term “efficiency”. Motor controllers commonly use 20 kHz PWM frequencies because they are above the range of human hearing and hence lead to quieter operation. However, in general, efficiency goes down as the frequency goes up because of switching losses (for this reason, PWM frequencies in the MHz range are impractical; can you link me to something that operates in this domain?). The main reason for staying away from low frequencies is that at some point, the PWM frequency will show up as a torque ripple in your motor.

In general, there are two types of filters at work: an LR filter arising from the motor inductance and a mechanical filter arising from the inertia of the motor. The inertial smoothing of the PWM output is typically the dominant effect, and both are specific to the particular motor being used. For the kind of motor I expect you are using, 490 Hz will probably work just fine. By the way, the microcontroller on the Arduino is capable of outputting higher-frequency PWMs if you know how to work with the low-level timer registers.

Yes, one can filter a PWM signal to create an analog voltage, but that doesn’t mean you can use the terms “PWM” and “analog” interchangeably without creating confusion and potentially getting into trouble. For example, you cannot supply the TB6612’s PWM input with 2.5 V (i.e. an analog voltage) and expect it to drive the motor at 50% duty cycle (or output 50% of the motor supply voltage). The PWM input must be a digital signal.

Definitely not. It is basically just an H-bridge, with the output state directly controlled by the state of the logical inputs. It is not programmable or configurable. You can find out all about it from the datasheet, which is linked from the resources tab of the TB6612 product page.

They are capable of it. The library functions we provide for driving the motors use as 10 kHz PWM, however.

- Ben