How to use Step Stick Steppers in MPF¶
|Related Config File Sections|
MPF can drive steppers on a StepStick (or DRV8825) connected via a digital output. Depending on the jitter of the output the speed might be limited to a few steps per second (like 50-200).
Configuring your stepper¶
A step stick stepper needs two or three outputs which define the hardware
In case you omit
enable_output make sure it is pulled high permanently.
In addition, you need a
homing_switch so MPF can find the
of your stepper at startup.
This is an example:
#config_version=5 hardware: stepper_controllers: step_stick digital_outputs: c_direction: number: 1 type: driver c_step: number: 2 type: driver c_enable: number: 3 type: driver switches: s_home: number: 1 steppers: stepper1: number: c_direction:c_step:c_enable # enable is optional homing_mode: switch homing_switch: s_home named_positions: 10: test_00 20: test_01 50: test_10 platform_settings: # optional speed settings low_time: 20ms high_time: 20ms
You might want to change the speed in the
1000 / (low_time + high_time) will be your number of steps per second.
Connecting your stepper driver¶
DIR pin to your
STP to your
step_output and``GND`` to your ground.
If use an
enable_output connect it to
(not all driver have all of them).
Otherwise, pull them to VDD or the driver will not work.
In addition, you need to pull
M2 to VDD or GND
to configure the step resolution.
Your stepper will connect to
Connect power to
VMOT (do not forget to also connect ground of your stepper
power supply; see Voltages and Power).
See the datasheet for details about your driver.