Last edited
·
21 revisions
Generic Step/Dir Interface Driver Configuration
These are typically industrial/CNC stepper motor drivers (or servo motor drivers for that matter) you can obtain from Amazon, eBay, omc-stepperonline, Leadshine, Teknic, etc. They are suitable for running large/powerful stepper motors NEMA23 size and up (or similar servo motors.)
Usually the interface to control these, in addition to the required Step and Dir signals, also have Enable and Alarm (fault) signals. Each of these signals have a (-) and an (+) connection, this is referred to as differential signaling. I used the DM540T datasheet in these examples, others might be different...
- Option1 - Use an StepStick footprint external stepper driver board:
- These plug in like a typical StepStick stepper driver but instead provide level shifted signals and work in one of two ways typically:
- By connecting the EN-, PUL-, DIR- terminals (common cathode) to Ground and providing signals that connect on each corresponding (+) terminal.
- By connecting the EN+, PUL+, DIR+ terminals (common anode) to +5V (typically) and providing signals that connect on each corresponding (-) terminal.
- The normal operating voltage for signaling is often +5V but higher voltages (12V or 24V) can sometimes be used by adding a resistor to each signal line that limits the current.
- In all cases also check the datasheet of the Step/Dir driver for guidance.
- By connecting the EN-, PUL-, DIR- terminals (common cathode) to Ground and providing signals that connect on each corresponding (+) terminal.
- There are several options but we prefer the ones that connect the stepper driver via what would otherwise be the (4) stepper motor connections, typically on an RJ45 jack but sometimes on screw terminals, or a pin header.
- FYSETC makes what looks like nice option (untested) that incorporates its own switching voltage regulator to obtain the +5V usually needed for sending EN, PUL, DIR signals to these drivers.
- There is also this custom board (basic testing done on MaxESP3) which includes the connections required for EN, PUL, DIR and optionally ALM. Additionally, it has a M2 output for mode switching if the driver has the capability. Finally, it has the pull up/down states required for a MaxESP3 to function properly.
- These designs use the common cathode wiring scheme described above.
- The FYSETC design might not be compatible with the MaxESP3 and similar designs (ESP32 based.)
- If you want fault detection the ALM+ pin gets connected to the AXISn_FAULT_PIN but also gets a 2k pullup resistor connected 3.3V (or Vcc.) So the normally logic HIGH signal goes LOW when a fault occurs.
- It is not necessary to level-shift this connection (but you can do so if you like.)
- Note: for noise immunity it is best to use separate power supplies for the stepper drivers and the OnStepX controller.
- These plug in like a typical StepStick stepper driver but instead provide level shifted signals and work in one of two ways typically:
- Option2 - Direct connection (not recommended):
- Issues:
- The typical driver spec. calls for 5V minimum voltage levels but we are using 3.3V and it might be unreliable or not work at all.
- Lower voltage signals over longer distances (since this is an external driver) can lead to RFI/EMI noise and signaling problems.
- You can bypass this differential signaling feature by connecting all (-) terminals to Ground (this Ground must be shared with the controller running OnStepX.)
- You can then connect the AXISn_STEP_PIN to PUL+ and the AXISn_DIR_PIN to DIR+.
- Usually you will also want to connect the AXISn_ENABLE_PIN to ENA+.
- Note that OnStepX normally expects drivers to be enabled with a LOW signal where in this case its enabled HIGH adding the following line to Config.h corrects that:
- #define AXISn_ENABLE_STATE HIGH
- Note that OnStepX normally expects drivers to be enabled with a LOW signal where in this case its enabled HIGH adding the following line to Config.h corrects that:
- If you want fault detection the ALM+ pin gets connected to the AXISn_FAULT_PIN but also gets a 2k pullup resistor connected 3.3V (or Vcc.) So the normally logic HIGH signal goes LOW when a fault occurs.
- Note: for noise immunity it is best to use separate power supplies for the stepper drivers and the OnStepX controller.
- Issues:
Other considerations:
- Even when using an stand-alone driver it is best to configure the AXISn_MICROSTEPS to match the driver microstep setting, even if OnStepX is not actually controlling the microstep mode. This provides information about the full-step position to prevent cogging when parked. In the case of a servo where there is no microstep mode you can set this to 1 (or another value as needed, see below.)
- For some stand-alone drivers it is also possible to configure two microstep (or servo "digital gearing") modes and switch between them with a logic signal. This allows precision low vibration tracking and potentially higher motor RPMs (for a given step rate) for slewing.
- The AXISn_M2_PIN is used to signal the mode switch.
- In Config.h you would set both AXISn_MICROSTEPS and AXISn_MICROSTEPS_GOTO to match the modes you configure on the driver.
- For example a servo might be able to switch to take 8x larger movements for each step when "digital gearing" is engaged so you could use the following settings (this example is for Axis2) to match that:
- #define AXIS2_MICROSTEPS 8
- #define AXIS2_MICROSTEPS_GOTO 1
- For example a servo might be able to switch to take 8x larger movements for each step when "digital gearing" is engaged so you could use the following settings (this example is for Axis2) to match that: