Electronic – arduino – L298N heating up when driving a Nema 17 with Arduino

arduinol298stepper motorstepper-driver

I've just bought a Nema 17 (Motor NEMA 17 40mm 1,2A 2,6kg/cm 1,8ยบ 42STH40 1204A CNC) to build a pet feeder, and to control it I'm using a L298N driver I've also bought. I've wired everything together as shown in the following photo. I attach a 12V, 1.5A power adapter to the female jack over to the right. The Arduino gets powered up from the 5V + GND from the L298N

Picture

I'm using Arduino's Stepper library and it works ok. However the L298N board quickly heats up and gets very hot, I cannot even touch the heat sink. I'm pretty sure I'm doing something wrong. Why does it get so hot?

Edit 1: Here are the specs of the motor.

  • 4-wire bipolar operation
  • Compatible with NEMA17 standard
  • Dimensions: 42 x 42 x 40mm
  • Motor shaft diameter: 5mm
  • Step angle: 1.8 degrees
  • Step Count per revolution: 200
  • Standard Voltage: 2V
  • Phase current: 1.2A
  • Phase resistance: 1.7 ohm
  • Holding torque: 4N.m (minimum)
  • Weight: 290g

Best Answer

The cheap L298 modules don't have a chopper or current setting so you have to add a big power resistor in series with each winding if you want relatively high performance. You could also lower the supply voltage to about 5V from 12V which would work, but the motor would not be able to accelerate as fast.

To get 2V with a 12V supply, you would need to throw away 10V in the resistors and chip which is really wasteful. If you want to try it, you could try 1A or 1.1A, with something like a 6.8\$\Omega\$ or 7.5\$\Omega\$resistor on each winding, rated for 10W or so.

Or buy a stepper driver that has a current setting and chopper circuit. You can probably source one of those for not much more than the two power resistors. Some of them will allow you to increase the supply voltage to 24 or 36V which will give you better performance. You need to set the current (see the instruction for how to do that) to something like 1A or 1.1A) and the driver will automatically PWM the power to the motor to keep the current at close to the correct level from idle to maximum speed. Some also have an idle current reduction feature that reduces the current through the coils to a lower level so the motors won't easily turn (as they would if you completely turned the current off), but they run cooler.

Edit: The series resistor (or PWM but I'm not discussing that here) means that the time constant L/R is reduced significantly (L being the coil inductance). In the case of a 6.8 ohm resistor in series with a 1.7 ohm coil, it's reduced by a factor of 5.

Related Topic