Hi, i'm a newb... Please forgive me
I'm trying to control a stepper motor (4A) through dm556 driver and arduino that uses 3.3v signals.
I'm powering everything with a 24V/5A psu, cooling the case with 12v fan and use usb device to send commands. Diagram below.
Overall it seems to work ok, but I have to set initial motor position by hand and sometimes the shaft can move when device is disconnected from the psu. I've noticed that this can cause the pwr diode on the arduino to light up, and can spin a fan a little. After a few cycles the fan burned and I think I've broken a LLC. Maybe even broke the EN signal line on the driver but haven't checked that exactly.
I believed that's due to the back EMF that can be caused by the motor. I've tried to measure the voltage with multimeter on the motor coil alone when backdriven and no driver, but noticed only about 0.06V.
The driver has built-in overvoltage and short-circuit protection, however, the datasheet doesn't specify anything about built-in protection against back EMF specifically when the motor is moved manually.
It's also possible that it burned due to the psu being disconnected when the motor was still and powered on, as it happened once or twice by accident.
I've tried searching the web and asking gpts, but i got lost
How should I protect the circuits? Flyback diodes? TVS? Schottkey? Optoisolators? Where should they be connected? Could you help me with proper setup, or point where (or how) to look?
I'm interested mostly in cheap and 'good enough' solutions