I've tried to connect an L298N to a 2-phase stepper motor (STEPPER MOTOR NEMA17 12V 1.2A JK42HS40-1204D to be exact). Everything works fine (the motor spins), except that within a few seconds, the driver is becoming really hot, and is producing smoke. Since the driver suppose to support 35V/2A, I thought this should not have happened.
I've connected the circuit according to: "https://tronixlabs.com.au/news/tutorial-l298n-dual-motor-controller-module-2a-and-arduino". It was pretty straightforward
Does anybody have a clue what could be the problem?
Normal, because the ancient L298 is not really a stepper motor driver.
At least not for steppers with a 2ohm coil resistance.
Read Robin2's threads.
Stepper Motor Basics
Simple Stepper Code
A 2 ohm stepper motor is a low impedance stepper - use current control for these, basically any
stepper chopper-driver that can handle 1.2A, such as DRV8825 module.
Most steppers these days are low impedance, and are completely unsuitable for any constant voltage driver
like standard DC motor drivers.
Years ago high-impedance steppers were more common and hence why many dual DC motor drivers
claim to drive a stepper - these days that's misleading.