After some time stepper motor is hot I have three stepper motors.
One Nema 17 - 2.4 ohm, the second smaller noname from color printer - 9.5 ohm and third the smallest noname from cdrom - 10.5 ohm.

I have connected them to arduino mega 2560 with ramps 1.4(set to 1/32 micro stepping) and drivers drv8825. See my previous question.

After some time (less than one minute) the first is cold. The second motor is hot. And the third is very hot. I can not even touch it.

What can I do to fix it.
The second motor is hot. And the third is very hot. I can not even touch it.


This is to some degree, completely normal and expected. From the datasheet for a typical NEMA 17 stepper, the rated temperature rise is 80 °C above ambient and the maximum operating temperature is 130 °C (implying an ambient temperature of 50 °C). It is normal that stepper motors (in general) get a bit hot.

"Too hot to touch" is still relatively cold. 60 °C is already too hot to touch, and that's only a 40 °C rise above a 20 °C ambient temperature.

You can reduce the temperature rise of the motors by reducing the current they receive. The stepper driver has a small potentiometer that can be turned to adjust the current, but keep in mind that doing so will also reduce the torque of the motors and thus they might skip steps if you reduce the current too much.

Technical details: Note that stepper motor drivers used in 3D printers are constant current drivers, and the little potentiometer controls the current. If you had not paid much attention to this potentiometer, the drivers might all have been set for the same constant current of $1.0\ \text A$. The stepper driver would (to achieve the same constant current) send a higher voltage to the higher resistance motors. This would imply a power dissipation of $2.4\ \text W$ in the Nema 17, and a power dissipation of $10.5\ \text W$ in the small stepper. $2.4\ \text W$ in the Nema 17 would only heat it up by about $20\ °\text C$ above ambient. A dissipation of $10\ \text W$ in the small stepper, which also has much less surface area to dissipate the power, would heat it up by a lot (and probably, given that you didn't fry it, the current was set lower -- or a technical peculiarity limited the current given that the motor likely also has very low inductance).