SlushEngine: Advanced Current Driving of Stepper Motors
The Slushengine has many capabilities beyond a standard Step/Direction stepper motor driver. The SlushEngine stepper motor driver can accurately control the current being used by the stepper motor at any point when during your program. Most stepper motor drivers allow the current to be set once and it must be set manually by adjusting a potentiometer. This older method can cause stepper motors to be used inefficiently and can burn out prematurely.
The SlushEngine library lets you change the current/power being used by the stepper motor at 4 diffrent stages; Run, Acceleration, Decceleration, and Hold. It is important to be able to vary the current at these stages because often different power is required. For example it takes much more current to accelerate a load than it does to keep it moving.
The SlushEngine can adjust the current at Run, Acceleration, Deceleration and Hold separately for all 4 motors connected.
Setting The Current Level During run Stages
Keeping with the simplicity of the SlushEngines capabilities it is very simple to set the current levels at any point during the SlushEngines operation. The following command is the only one required to set the current.
motor1.setCurrent(run, accel, deccel, hold)
The values of each of these can range from 0 to 200. These values do not directly translate into current usage. Experimenting with different values can help you understand the capability of this function and when to use it.
Lets take the example of driving a laser cutter. These devices have a lightweight carriage that moves very fast.
- High acceleration and deceleration require a lot of current (accel = 20, decel = 18)
- Low carriage weight does not required a lot of run current (run = 8)
- When not moving there are no forces on the carriage (hold = 3)
This is just one small example of how this function can be used. The values of current can even be changed while a stepper motor is moving.