To apply any config changes make, sure to safely unmount the device and reboot the the device by sending a reset command, or powering the device off and on again


Encoders is setup by default, but can be disabled or modified to different solutions

Encoder board

# 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
  • encoder.enable Enables encoder module, must be enabled to read any encoders
  • encoder.spi_channel Dedicated SPI channel for encoders on LPC1769 default 2
  • encoder.spi_frequency The bus speed of the SPI channel in Hz
  • encoder.[AXIS].enable Enables encoder for [AXIS] position correction
  • encoder.[AXIS].spi_cs SPI chip select for [AXIS] this is the IO mapping for LPC1769 see base example for defaults
  • encoder.[AXIS].bit_resolution Encoder resolution in bits, the only current supported value is 13 for AS5047P
  • encoder.[AXIS].zero Zero is the encoder value for 0 degrees position of a joint/axis
  • encoder.[AXIS].step Step is the size of a encoder step in degrees, if encoder step is calculated as 360 / 2^13, step should be negative if encoder is mounted on rear end of axis


It is only necessary to do a zero-calibration if encoder board, or encoder magnet has been removed/replaced or if the original config file has been lost, or if config has been created before april 2016

The zero calibration requires the robot to be moved to an accurate known position. This is done as a part of the factory calibration, but can be done with with a calibration tool.

The zero-calibration procedure is as follows:

  • Move the robot platform to the known position
  • Run gcode from web terminal "M710 X0 Y0 Z-300 S2000" where [XYZ] is the position and S is number of samples to average the values over
  • Change zero values in the config file, save, safe eject and reset board by typing in "reset" in the web terminal

The response for an M710 g-code should look similar to the following, depending on the encoder module settings

Set Encoder Zero:
 [0](zero: 7996.520)
 [1](zero: 1490.237)
 [2](zero: 1630.247)
 [3](zero: 6156.456)