Upgrading Firmware

Firmware [May 2016+]

DO NOT update firmware unless your system has a rotary encoder for each joint.

Alot of internal changes have been made to planner, encoder and actuator feedback loop. Updates from this data forth requires encoder feedback.

Make sure to backup sd card before starting Download and flash new firmware add config snippets after upgrading firmware, and take a look at the config example on github

Setting up planner

Make sure planner_queue_size is set to 32, this is very important for the feedback loop to work properly

planner_queue_size                        32       # DO NOT CHANGE THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING

Setting up encoders

Add the following snippet to config, and make sure to update the zero values

# base encoder settings for AMS AS5047P magnetic absolute encoder 
encoder.enable                          true       # enable encoder feedback
encoder.spi_channel                        2       # spi channel default is 2 for encoder
encoder.spi_frequency                1000000       # encoder spi bus speed in hz

encoder.alpha.enable                    true       # enable encoder for joint 1
encoder.alpha.spi_cs                    0.16       # encoder chip select
encoder.alpha.bit_resolution              13       # encoder bit resolution
encoder.alpha.zero                  7996.520       # encoder value for zero degrees
encoder.alpha.step               0.043945313       # angle step [deg] per encoder interval

encoder.beta.enable                     true       # enable encoder for joint 2
encoder.beta.spi_cs                     1.22       # encoder chip select
encoder.beta.bit_resolution               13       # encoder bit resolution
encoder.beta.zero                   1490.237       # encoder value for zero degrees
encoder.beta.step                0.043945313       # angle step [deg] per encoder interval

encoder.gamma.enable                    true       # enable encoder for joint 3
encoder.gamma.spi_cs                    1.23       # encoder chip select
encoder.gamma.bit_resolution              13       # encoder bit resolution
encoder.gamma.zero                  1630.247       # encoder value for zero degrees
encoder.gamma.step               0.043945313       # angle step [deg] per encoder interval

encoder.delta.enable                    true       # enable encoder for joint 4
encoder.delta.spi_cs                    1.31       # encoder chip select
encoder.delta.bit_resolution              13       # encoder bit resolution
encoder.delta.zero                  6156.456       # encoder value for zero degrees
encoder.delta.step               0.043945313       # angle step [deg] per encoder interval

encoder.epsilon.enable                 false       # enable encoder for extruder/axis 5
encoder.epsilon.spi_cs                  1.30       # encoder chip select
encoder.epsilon.bit_resolution            13       # encoder bit resolution
encoder.epsilon.zero                    4096       # encoder value for zero degrees
encoder.epsilon.step             0.043945313       # angle step [deg] per encoder interval

Update encoder zero values using encoder zero-calibration

Setting up actuator feedback

Add the following snippet to config

# actuator feedback
actuator_feedback_on_idle                    true             # enable actuator feedback on idle
actuator_feedback_idle_max                   0.1              # the maximum allowed correction for idle process
actuator_feedback_on_block                   true             # enable actuator feedback on block finished
actuator_feedback_block_max                  0.02             # the maximum allowed correction for planner
actuator_feedback_linear                     0.001            # linear feedback
actuator_feedback_exponential                0.01             # exponential feedback

Adding rotational axis [Optional]

Add the following snippet to config

# Axis module configuration
axis.rotation.enable                          true          # Whether to activate the extruder module at all. All configuration is ignored if false
axis.rotation.name                            A             # Gcode for axis
axis.rotation.steps_per_unit                  8.888888889   # Steps per axis unit 
axis.rotation.acceleration                    300           # Acceleration for the stepper motor
axis.rotation.max_speed                       250           # units/s
axis.rotation.step_pin                        2.8           # Pin for motor step signal
axis.rotation.dir_pin                         2.13          # Pin for motor dir signal
axis.rotation.en_pin                          4.29          # Pin for motor enable signal

also the platform solution must be "actuated" to use motor based rotation

ragnar_platform_solution                    actuated        # options: fixed, x, hash or actuated