smoothieware-website-v1

Advanced Driver Chip Module

This module is used to control SPI based stepper motor driver chips, like the Panucatt Bigfoot series.

[!WARNING] This does not work on Smoothieboards or Azteeg X5 Mini as is, as they do not use the required driver chips. If you really know what you are doing, you can hook the drivers to the SPI bus of those old boards. Make sure your drivers have sufficient power filtering.

[!WARNING] Note that most of these drivers derive their power from Vbb (12v), not from the 3.3v, so in order to be set up correctly, they need to be powered up before Smoothie boots. This means the Vbb must be on before the 5v power comes on. Alternatively, the Smoothieboard must be hard reset after power is on.

Config settings

This module is enabled in config with:

motor_driver_control.motor1.enable true  # where motor1 is any name you wish

The chip this controls is set with:

motor_driver_control.motor1.chip DRV8711    # this can be one of DRV8711 or TMC2660. The latter can control any TMC26x derivative

The SPI channel to use must be set with:

motor_driver_control.motor1.spi_channel  0       # or 1
motor_driver_control.motor1.spi_cs_pin   0.10    # any pin
motor_driver_control.motor1.spi_frequency 100000 # the SPI frequency to use

Other config settings:

motor_driver_control.motor1.axis  X       # for display purposes and for setting in Mxxx commands and telling the system which axis it controls
motor_driver_control.motor1.alarm         true  # enable alarm checking of chip, and report with a console message
motor_driver_control.motor1.halt_on_alarm true  # set to true to force a halt on any alarm condition
motor_driver_control.motor1.current       3000  # set the motor current in milliamps
motor_driver_control.motor1.max_current   4000  # the maximum current the chip allows
motor_driver_control.motor1.microsteps    128   # the microsteps for this driver

Some chip-specific configs are…

motor_driver_control.motor1.sense_resistor  xxx  # set the sense resistor used, this value is chip specific, set to the default for commonly used drivers
motor_driver_control.motor1.gain  xxx  # set the gain for a DRV8711, leave at default if you do not know what this is
# direct register setting... order and codes are chip dependent, values are in 32-bit Hex
motor_driver_control.motor1.reg 00002,981C0,A0000,C000E,E0060

An example of config entries is as follows, this sets two advanced drivers, one is a DRV8711 and the other is a TMC2660.

motor_driver_control.alpha.enable           true              # alpha (X) is a TMC26X
motor_driver_control.alpha.axis             X                 # A to set the settings
motor_driver_control.alpha.chip             TMC2660           # chip name
motor_driver_control.alpha.current          1500              # current in milliamps
motor_driver_control.alpha.max_current      2800              # max current in milliamps
motor_driver_control.alpha.microsteps       64                # microsteps
motor_driver_control.alpha.alarm            true              # set to true means the error bits are checked
motor_driver_control.alpha.halt_on_alarm    false             # if set to true means ON_HALT is entered on any error bits being set

motor_driver_control.alpha.spi_channel       1                # SPI channel 1 is sdcard channel
motor_driver_control.alpha.spi_cs_pin        0.10             # SPI CS pin
#motor_driver_control.alpha.spi_frequency     100000          # SPI frequency

motor_driver_control.beta.enable           true              # beta (Y) is a DRV8711
motor_driver_control.beta.axis             Y                 # Y to set the settings
motor_driver_control.beta.chip             DRV8711           # chip name
motor_driver_control.beta.current          4000              # current in milliamps
motor_driver_control.beta.max_current      4000              # max current in milliamps
motor_driver_control.beta.microsteps       64                # microsteps
motor_driver_control.beta.alarm            true              # set to true means the error bits are checked
motor_driver_control.beta.halt_on_alarm    false             # if set to true means ON_HALT is entered on any error bits being set
motor_driver_control.beta.spi_channel       1                # SPI channel 1 is sdcard channel
motor_driver_control.beta.spi_cs_pin        0.19!            # SPI CS pin DRV8711 requires inverted CS
#motor_driver_control.beta.spi_frequency     100000          # SPI frequency

NOTE: The step and dir must be driven via the step and dir pins and cannot be driven over the SPI interface. They are configured as normal, for example…

alpha_step_pin                               2.0              # Pin for alpha stepper step signal
alpha_dir_pin                                0.5              # Pin for alpha stepper direction

M code settings

Many settings can be made on the fly with M codes, many of these are specific to certain chips:

These are saved with M500 and override anything set in config.