@TobiAsis said in Driver Error and MCU overheating:
You mentioned that always full current is drawn when a motor is running.
Is there any relationship between current draw, load, speed or microstepping? What could be the explanation to this?
Sorry, that's not entirely accurate, particularly as microstepping is generally used. It is accurate if you were using full stepping; at each full step, one (of the two) motor phases is at full current. However, with microstepping, between one full step of the stepper motor and the next, the voltage for a single phase varies in a sine wave from 100% to -100% and back to 100% (a transistor switches the voltage direction to reverse the polarity of the coil for the 'negative' part of the sine wave, switching magnetic direction of the coil). The voltage required for each step is set by V=I x R, where R is the coil resistance. So the current is varied to achieve the voltage required for that step, up to the maximum current limit. The stepper drivers are called 'constant current chopper drivers' because the input voltage (ie 24V) is 'chopped' (ie turned on and off very fast) to produce an averaged output voltage (for the motor coil, usually only a couple of volts), using the current as a reference, so the current remains 'constant' at that particular microstep.
Because of this, while the (maximum) current may be set to 1100mA, most of the time the stepper driver won't be drawing that much current, and averaged out over time will be drawing considerably less. Which is why the 10A fuse on V_FUSED is capable of supplying sufficient current for the 12V Regulator, 5V regulator, Stepper drivers (including external driver header), OUT 1 and OUT 2 headers, V_OUTLC1 and V_OUTLC2 selection jumpers.
Load generally doesn't matter; either the motor has the torque to overcome the load, or it doesn't and will skip steps. Speed is different, as torque reduces with speed, and there are various other complications such as back EMF, but that would require a much more complex answer, and I'm not an electrical engineer!
(Note: the above is my understanding of how a stepper driver works. I'm happy to be corrected.)
I had some previous issues with a motor stalling, and when I measured, I realized that the current draw was only about half of the current I specified in config. I experimented with increasing the current, and I only reached a full current draw when I set it to 2x the rated peak current of the motor.
I think the problem is how you're measuring the current. How are you doing that? If you're using an oscilloscope, you could see the current changing, depending on where you are measuring. If you're using a multimeter, you're probably seeing the average current over time, ie half the current. If the motor is stationary, it will depend on where in the step it is stopped.
Setting the current to double the recommended motor current is going to overheat the stepper motor and burn out the wiring, and cause a phase short error message. It may also damage the stepper driver. Don't do it!
Ian