Support » Application Note: Using the Motor Driver on the 3pi Robot and Orangutan Robot Controllers »
Everything mentioned so far in this application note applies to both the Orangutan LV-168 and the TB6612FNG-based controllers, but there are some key motor control differences that need to be noted:
The Orangutan LV-168’s performance degrades for PWM frequencies above 10 kHz, which is why the examples in this document use 10 kHz PWMs. However, the TB6612FNG motor driver can handle PWM frequencies as high as 80 kHz. To achieve a PWM frequency of 80 kHz on the ATmega48/168/328P, you need to set:
TCCR0B = TCCR2B = 0x01;
in the motors_init() function (rather than TCCR0B = TCCR2B = 0x02). This clocks the timers off of the 20 MHz system clock directly. Increasing the PWM frequency from 10 kHz to 80 kHz has the benefit of pushing it outside the range of human hearing, thereby eliminating PWM-induced motor whining, but it also increases power losses due to switching, which can cause the motor drivers to heat up faster and potentially trigger thermal shutdown sooner.
Note that you can safely decrease the PWM frequency below 10 kHz on both the Orangutan LV-168 and Baby Orangutan B by using larger timer clock prescalers (e.g. a prescaler of 64 produces a PWM frequency of 1.25 kHz). This decreases switching power losses and can produce a more linear relationship between PWM duty cycle and motor speed, but it could lead to choppier motor motion.
Another difference is the TB6612FNG-based controllers can set the motor driver outputs to a high-impedance state that lets the motor coast instead of brake. The Orangutan LV-168 does not support high-impedance driver outputs.