# Micro Metal Gearmotors gets very Hot with Baby Orangutan

Hello,

i have two NEW Micro Metal Gear motors HP 50:1 connected to a baby orangutan B-328 and i´m using it with the arduino IDE and the Orangutan Motors Library. the problem is that the two motors gets VERY hot when i set the speed at 100, i can’t touch it for more than five seconds because it burn my fingers, but if i set the speed to 255. the motors gets hot but is bearable. and i don´t understand why. the tests has been did with no load and powered with a Lipo 2S (7,4v). can somebody help me? i think that the PWM frecuency of 1.25Khz can cause this but i´m not sure…

pd: my english isn´t very well.

``````#include <OrangutanMotors.h>

OrangutanMotors motors;

void setup()               // run once, when the sketch starts
{
motors.setSpeeds(100, 100); //0 to 255
}

void loop()                // run over and over again
{

}``````

A 7.4V LiPo will be at 8.2V when fully charged. The motor is rated at 6V, so you may be driving it somewhat hard. That being said, I do the same thing
Any motor running will get warm. This is because of inefficiencies in converting electric energy to movement energy. Most motors have pretty terrible efficiency – say, 10-30 percent, where the rest goes out in heat.
The fact that you can only hold the motor for a few seconds is not in itself bad. The motor is probably rated to over 100 degrees centigrade (or at least 80) which would make you say “burn” pretty much instantly.

The question is: Why does a PWM value of 100, which is less than maximum, make the motor warmer than 255?

My guess would be either cooling – the motor may be able to interact with more air when spinning faster – or inductance/impedance effects. The motor and windings may simply be more efficient when running at full current than when running with PWM at the frequency your’e using. Try a higher PWM frequency – 8 kHz, perhaps? Or try a lower frequency, like 490 Hz. If that changes the heat dissipation, it’s likely it’s a winding/impedance effect. If it doesn’t change the heat, it’s more likely it’s a cooling/efficiency thing.

Or it could be something totally different – I am not a mechanical engineer, and am picking this stuff up as I go, so if anyone wants to add to the above (or correct anything mistaken) that’d be great!

hello jwatte,

thanks for your answer, Previously i had worked with other two used micrometal gearmotor 50:1 HP, and the TB6612FNG driver, but the diference is that i used a Pic18f4550, and i set the pwm frecuency around 20 khz, and the motors work very fine with the same battery and the same conditions. the problem in this case is that programing the Baby Orangutan with the Arduino ide, the PWM frecuency it can´t be change, [quote]Because the Arduino environment relies on Timer0 for timing functions like millis() and delay(), this library cannot reconfigure the timers; consequently, the PWM outputs are limited to a frequency of 1.25 kHz in the Arduino environment. In many cases, this will result in an audible motor whine. To avoid this problem, you can instead program in C or C++ with the Pololu AVR Library, which allows you to use the motor drivers at higher PWM frequencies.[/quote]

the only way is program with AVR Studio but i never programed with it

Hi.

It seems strange that your motor is getting hotter when run at a slower speed. How well does the motor turn when it is at a speed of 100 vs 255? Could you post a picture of your setup?

-Claire

Hi Claire,

yes is very strange, but i think that i understood why. i think that is the frecuency of the pwm … i just tried to run the motors using the Oranguntan Motors library with the Arduino IDE, and the AVR Studio. this is the program for the Arduino IDE

``````#include <OrangutanMotors.h>

OrangutanMotors motors;

void setup()               // run once, when the sketch starts
{
motors.setSpeeds(200, 200);
}

void loop()                // run over and over again
{

}``````

and this is the code for the AVR STUDIO 6

``````#include <pololu/orangutan.h>

int main()
{
set_motors(200, 200);
while(1)
{

}
}``````

Programing the Baby Orangutan B-328 Powered with a 2S Lipo Battery (7.4V) with the Arduino IDE, the micrometal Gearmotors HP without load after 5 minutes running, it gets very hot!! it burns my fingers after touching it for more than 5 seconds aproximately, but if i program the Baby Orangutan with the AVR Studio the motor gets warm, but not very hot, the only diference that i have found is the pwm Frecuency, in the arduino code the frecuency is 1.25 Khz, and in the AVR Studio Code is around 9.7 Khz. the problem in this case is that the PWM frecuency in the Arduino it can´t be changed. therefore using the metal gearmotors with arduino it will be damaged in a short time. because if the motors reaches this high temperatures without load, with load will be worse.

The frequency can be changed when using the Arduino library, but you will have to live with the millis() and delay() and similar timing functions returning bogus values (time running too fast.)
You can change the timing prescaler register for each timer after you’ve set up the PWM/timer, and it will run at the new speed. Check the Atmega328p data sheet PDF file from Atmel, it’s pretty easy to read in the Timer0 section.

Also, you can use avr-gcc and avr-libc and avrdude to program, rather than AVR Studio. The benefit is that a) you can get the source code to the compiler and library if you run into trouble, and b) avr-gcc and avrdude is what Arduino uses under the hood, so it’s a very similar environment, minus the code mangling that the IDE does for you to “help.”

Hi jawtte, thanks for your suggestions, i will try to change the pwm frecuency at arduino, and i’ll create a new function for delay times with the new frecuency.