Optionally, move_axes should release motors at the end of movements
In my build, I've got the move_axes function releasing the motors at the end of movements. By setting all the outputs to low and de-energizing all of the coils, the voltage regulator I'm using, as well as the motors themselves, dissipate much less heat. This means I can drive the system much longer using external batteries out in the field.
The 28BYJ-48 motors have such a high gearing that even if there were reverse torque on the system, it would be hard to move the motor, so it's completely fine to de-energize the coils. We don't need to work to hold position.
This behavior might not be acceptable with lower geared steppers, so maybe it should be made optional via an eeprom value or #define.
int move_axes(long displ[n_motors]){
// ...
EACH_MOTOR{
releaseMotor(i); // de-energize the motors when we're not moving.
}
EEPROM.put(0, current_pos);
return ret;
}
Edited by Bill Schaller