Sensorless homing что это

от admin

Sensorless Homing on an SKR Pro v1.1 and v1.2

Sensorless homing and stall detection is functional for all TMC2209’s, TMC2226’s and TMC5160’s and is supported on the SKR Pro v1.1 or v1.2.

Getting stall detection working can be tricky and sensorless homing will almost certainly require some tuning.

As always the Duet wiki pages provide a lot of information that may also be of help.

board.txt Changes

To use sensorless homing/stall detection with TMC2209 or TMC2226 the following line must be added to the board.txt file. It is not needed with TMC5160.

Please only include the diag pin numbers where you intend to use sensorless homing on that axis.
For example, if you only intend to use sensorless homing/stall detection on driver 0 and driver 1, only include stepper.TmcDiagPins = < PB_10, PE_12 >in your board.txt file.
If you only want to enable sensorless homing/stall detection on driver 1, only include stepper.TmcDiagPins =

Config.g Changes

TMC2209 and TMC2226

The only modification required in config.g is to add the following to each M569 command where sensorless homing is to be used. D3 V40
D3 sets the driver into stealthchop mode. V40 sets the speed at which the driver switches over to spreadcycle. A different V value can be set to reduce or increase the switchover speed. Send M569 Px (where x is the driver number to be queried) and the tpwmthrs value reported is the switchover speed. In the case of V40, the switchover speed from stealthchop to spreadcycle would be 187.5mm/s.

TMC5160

The only modification required in config.g is to add the following to each M569 command where sensorless homing is to be used. D2
D2 sets the driver into spreadcycle mode.

Driver checks

At this point it is a good time to check whether your drivers are functioning correctly.
Send M122 and check that each driver is being recognised correctly.

Example 2209/2226 detection — Driver 0: standstill, SG min 0, mspos 8, reads 10937, writes 14 timeouts 0
Example 5160 detection — Driver 0: standstill 5160, SG min n/a, mspos 8, reads 14652, writes 15

If M122 reports Driver Not Present where a driver is expected, then you need to revisit the driver jumpers and settings.

Also, if you have made board.txt changes, send M122 P200 and make sure the changes are reflected in the output.

Homing file changes

This is where the main setup of sensorless homing takes place.

Before using the examples below to config the sensorless homing, it is suggested to test each axis with the following homing code. Ensure that you comment out your current homing code using ;
The code would go in the homex.g or homey.g (adjusting any X moves to Y)

Once you have confirmed that your motors are stalling, adapt the example cartesian homing files below. Copies are also included at the below google drive links. Examples of corexy sensorless homing files can also be found below.

The S, H and R values will probably need tweaking for your system.
H is typically 200 for 1.8 degree motors and 400 for 0.9 degree motors. S is the stall detection threshold which should be between -127 and +127.

R is the action to take on detecting a stall. 0 = no action (default), 1 = just report it, 2 = pause print, 3 = pause print, execute /sys/rehome/.g, and resume print

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Marlin 2.0 Sensorless homing experiment using ANET A8 Kit, SKR PRO V1.1. TMC2209, and Titan Extruder.

License

cameronsocialhardware/Marlin-2.0-Sensorless-Homing

Name already in use

  • Local
  • Codespaces

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more about the CLI.

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

  • SKR PRO v1.1 motherboard
  • 4x TMC2209 stepper motor drivers (X, Y, Z1, Z2)
  • Standard Titan Extruder
  • V6 all-metal hotend

I have started this repository to help me enable sensorless homing for the X, Y, and Z axis.

  • X axis sensorless homing is working
  • Y axis sensorless homing is working
  • Z axis switch probe is working

Currently experimenting with reducing the current to the Z steppers to reduce torque to make StallGuard viable on the Z axis.

This project is for fun and learning!

About

Marlin 2.0 Sensorless homing experiment using ANET A8 Kit, SKR PRO V1.1. TMC2209, and Titan Extruder.

Trinamic drivers

Stepper motors in a 3D printer are controlled by a variety of driver chips such as the common A4988 and DRV8825. These provide signals to the stepper motors to control the magnets and move them by micro-steps. Typically the motor is divided into 3200 steps per revolution, with 80 steps per millimeter of motion. At the movement rates of 3D printers, and due to the ringing produced by stepper motors, the vibrations from these steps can be very loud to the human ear.

Читать:
Как переделать бесперебойник в инвертор

Trinamic stepper drivers control stepper motors with greater finesse and interpolate the micro-steps to produce extremely quiet motion. Through SPI or serial control, you can change how the drivers manage motor current as well as the manner of current delivery. These drivers can even detect when a motor hits an obstruction, so they can act as endstops for simplified wiring. You can also set the driver current with Marlin G-code commands, removing the need to adjust physical trimpots.

Supported TMC drivers and features

Driver Control StealthChop Sensorless
homing/probing
Driver monitoring Hybrid threshold Notes
TMC2100 none yes no no no Standalone mode only
TMC2130 SPI yes yes yes yes
TMC2160 SPI . . . .
TMC5130 SPI . . . .
TMC5160 SPI yes yes yes yes
TMC2208
TMC2225
UART yes no yes yes UART RX line requires an interrupt capable pin.
Software UART not support on all platforms, such as DUE based boards.
TMC2209
TMC2226
UART yes yes yes yes
TMC2660 SPI no not implemented yes no

All configurable Trinamic stepper drivers can also be operated in standalone mode if they are pre-configured in hardware, either by hard connections or jumpers.

Installing the library

The TMC stepper drivers require an external library that allows Marlin to communicate with each driver.

For PlatformIO

PlatformIO will automatically download all libraries it requires, so skip directly to Wiring below.

Installing from Arduino IDE library manager

  • Open up the Arduino IDE
  • Go to Sketch -> Include Library -> Manage Libraries…
  • Marlin 1.1.9 and up:
    • Search for TMCStepper
    • Search for TMC2130Stepper or TMC2208Stepper

    Installing from a zip file

    • Marlin 1.1.9 and up:
      • Go to TMC library homepage
      • Go to the TMC2130 library page
      • Go to the TMC2208 library page

      Wiring

      TMC drivers (except in standalone mode) require some extra wiring (Serial or SPI) to communicate with and configure the drivers. Boards like the SKR from BigTreeTech actually integrate this wiring directly into the motherboard.

      SPI Control

      The SPI bus requires 4 wires for communication. The SCK , MOSI , and MISO wires can be shared across all the drivers, while CK must be wired to a separate pin for each driver. These pins are labeled differently on the motherboard versus the driver:

      Motherboard Driver
      SCK SCK
      MOSI SDI
      MISO SDO
      CS CS
      Software SPI

      You can use pins other than the HW SPI pins by enabling TMC_USE_SW_SPI and defining the required pins:

      UART (Serial) CONTROL

      A 1K resistor is required between TX and PD_UART .

      Motherboard Driver
      RX PD_UART
      TX (1kohm) PD_UART

      The serial port on master is selected in the pins file for your board. Alternatively you can use the slower software serial by not selecting any of the hardware serial ports. Typically one port per one driver is needed.

      Software UART

      You can use free pins for UART by disabling all of the hardware serial options in your board’s pins file and by defining the _SERIAL_TX_PIN and _SERIAL_RX_PIN pins.

      Note: The receive (RX) pins must be interrupt-capable pins. Transmit (TX) pins don’t have this limitation.

      FYSETC drivers

      As of this writing, we recommend getting the original Watterott drivers or the revised FYSETC v1.1 drivers to avoid additional headaches.

      The FYSETC v1.0 drivers come pre-configured in standalone mode. So the drivers should work for moving the axes but you won’t be able to configure them or take advantage of their extra features. For full-featured drivers you’ll need to modify three solder bridges on the driver PCB.

      Some versions of the FYSETC v1.0 drivers come with a solder bridge left of the chip, some come with a bridging resistor. This connection needs to be opened for SPI connection to work. The two smaller bridges need to be configured as shown.

      Sensorless Homing на tmc2209. Как настроить.

      В общем пришла плата BTT GTR. Не получается заставить работать Sensorless Homing. Уже 3 дня потратил на эксперименты, поднадоело, решил спросить у тех кто сталкивался. Тем более что в компиляторе она компилируется как SKR PRO? так что думаю там такие же заморочки есть.

      Подключал и по UART и SPI. Драйвера работают. Концевики, если их подключать, тоже отрабатывают(с отключенным пином DIAG). Пробовал и с отключенными перемычками DIAG и с ними, все равно не отрабатывает Sensorless. Если кто в курсе в каком направлении покопаться, просьба подказать. Что в марлине у меня связанное с этим всем:

      #define USE_XMIN_PLUG#define USE_YMIN_PLUG

      #define X_DRIVER_TYPE TMC2209#define Y_DRIVER_TYPE TMC2209

      #define X_HOME_DIR -1#define Y_HOME_DIR -1

      #define X_HOME_BUMP_MM 0#define Y_HOME_BUMP_MM 0

      #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #if AXIS_IS_TMC(X) #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_MICROSTEPS 64 // 0..256 #define X_RSENSE 0.11 #define X_CHAIN_POS -1 //

      #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_CURRENT_HOME Y_CURRENT #define Y_MICROSTEPS 64 #define Y_RSENSE 0.11 #define Y_CHAIN_POS -1 #endif

      #define CHOPPER_TIMING CHOPPER_DEFAULT_24V

      #define SENSORLESS_HOMING // StallGuard capable drivers only #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0. 255. TMC2130: -64. 63 #define X_STALL_SENSITIVITY 240 //#define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 240 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only //#define IMPROVE_HOMING_RELIABILITY #endif

Похожие публикации