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).
Overview video about steppers:
Configuring your stepper
A step stick stepper needs two or three outputs which define the
direction_output:step_output:enable_output. In addition, you need a
homing_switch so MPF can find the
0 position of your stepper at
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
GND to your ground. If use an
connect it to
EN. Otherwise, pull it to
GND or the driver will not
VDD (not all driver have all of
them). In addition, you need to pull
M2 to VDD or GND
to configure the step resolution. Your stepper will connect to
2B. 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.
What if it did not work?
Have a look at our hardware troubleshooting guide.
Something missing or wrong? You can fix it!
This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?
Please help us! You can fix it yourself and be an official "open source" contributor!
It's easy! See our Beginner's guide to editing the docs.
Page navigation via the keyboard: < >
You can navigate this site via the keyboard. There are two modes:
General navigation, when search is not focused:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
While using the search function:
- Down , Up : select next / previous result
- Esc , Tab : close search
- Enter : go to highlighted page in the results