Skip to content

Registers

The memory table inside each device. Use the names with m.read_register(name) and m.write_register(name, value) (or imu. for the IMU). Values are raw integers; the unit column says what one step means. EEPROM values are kept after power-off only when written with save=True (see Modes & units).

STS3215 (and STS3250)

Addr Name Bytes Access Unit Description
0 firmware_major 1 read, EEPROM Firmware version, main number.
1 firmware_minor 1 read, EEPROM Firmware version, sub number.
3 model_number 2 read, EEPROM Model number. 777 = STS3215.
5 id 1 read/write, EEPROM Address of the motor on the bus (0...253). Every motor on one bus needs its own ID.
6 baud_rate 1 read/write, EEPROM Bus speed. 0 = 1 Mbit/s (default, used by servolab). Other values: see Feetech manual.
7 return_delay_time 1 read/write, EEPROM 2 us How long the motor waits before it answers.
8 response_status_level 1 read/write, EEPROM 0 = answer only read and ping, 1 = answer every instruction.
9 min_position_limit 2 read/write, EEPROM steps Smallest allowed goal position in position mode. Both limits 0 = no limits (multi-turn).
11 max_position_limit 2 read/write, EEPROM steps Largest allowed goal position in position mode.
13 max_temperature_limit 1 read/write, EEPROM degC Above this temperature the motor protects itself.
14 max_voltage_limit 1 read/write, EEPROM 0.1 V Above this supply voltage the motor reports an error.
15 min_voltage_limit 1 read/write, EEPROM 0.1 V Below this supply voltage the motor reports an error.
16 max_torque_limit 2 read/write, EEPROM 0.1 % Maximum torque, 1000 = 100 %. Copied to torque_limit when the motor powers up.
18 phase 1 read/write, EEPROM Special function bits. Do not change unless you know exactly why.
19 unloading_condition 1 read/write, EEPROM bits Which problems switch the torque off (one bit per problem, see errors.py).
20 led_alarm_condition 1 read/write, EEPROM bits Which problems make the LED blink (one bit per problem, see errors.py).
28 protection_current 2 read/write, EEPROM 6.5 mA Current limit of the over-current protection.
34 protective_torque 1 read/write, EEPROM % Torque that is left after the overload protection kicked in.
35 protection_time 1 read/write, EEPROM 10 ms How long an overload may last before the protection kicks in.
36 overload_torque 1 read/write, EEPROM % Torque above which the motor counts as overloaded.
38 over_current_protection_time 1 read/write, EEPROM 10 ms How long too much current may flow before the protection kicks in.
21 p_coefficient 1 read/write, EEPROM P gain of the internal position controller.
22 d_coefficient 1 read/write, EEPROM D gain of the internal position controller.
23 i_coefficient 1 read/write, EEPROM I gain of the internal position controller.
24 minimum_startup_force 2 read/write, EEPROM 0.1 % Smallest output the motor uses, to overcome static friction.
26 cw_dead_zone 1 read/write, EEPROM steps Position error (clockwise) that still counts as 'arrived'.
27 ccw_dead_zone 1 read/write, EEPROM steps Position error (counter-clockwise) that still counts as 'arrived'.
30 angular_resolution 1 read/write, EEPROM Resolution factor for multi-turn mode. Leave at 1.
31 homing_offset 2 read/write, EEPROM steps Shifts the zero point: present_position = encoder - homing_offset (the motor does this only in position mode, servolab in the other modes).
33 operating_mode 1 read/write, EEPROM 0 = position, 1 = velocity, 2 = PWM (open loop).
37 velocity_p_coefficient 1 read/write, EEPROM P gain of the internal velocity controller (velocity mode).
39 velocity_i_coefficient 1 read/write, EEPROM I gain of the internal velocity controller (velocity mode).
40 torque_enable 1 read/write, RAM 1 = motor is powered and holds/moves, 0 = motor is free (turn it by hand).
41 acceleration 1 read/write, RAM 100 steps/s^2 Acceleration for movements. 0 = as fast as possible.
42 goal_position 2 read/write, RAM steps Position mode: where the motor should go.
44 goal_time 2 read/write, RAM ms Position mode: duration of a move (0 = use goal_velocity). PWM mode: the PWM output -1000...1000 (bit 10 = direction).
46 goal_velocity 2 read/write, RAM steps/s Velocity mode: speed to turn at. Position mode: maximum speed of a move.
48 torque_limit 2 read/write, RAM 0.1 % Current torque limit, 1000 = 100 %.
55 lock 1 read/write, RAM 0 = EEPROM writes are kept after power-off, 1 = they are lost (default).
56 present_position 2 read, RAM steps Where the motor is right now.
58 present_velocity 2 read, RAM steps/s How fast the motor turns right now.
60 present_load 2 read, RAM 0.1 % How hard the motor is working, 1000 = 100 %.
62 present_voltage 1 read, RAM 0.1 V Supply voltage.
63 present_temperature 1 read, RAM degC Temperature inside the motor.
65 status 1 read, RAM bits Active problems, one bit per problem (see errors.py).
66 moving 1 read, RAM 1 while the motor is moving, 0 when it stands still.
69 present_current 2 read, RAM 6.5 mA Motor current.
80 moving_velocity_threshold 1 read/write, EEPROM Speed below which the motor counts as standing still.
84 maximum_velocity_limit 1 read/write, EEPROM Factory speed limit.
85 maximum_acceleration 1 read/write, EEPROM Factory acceleration limit.

XIAO IMU

Addr Name Bytes Access Unit Description
0 firmware_major 1 read, EEPROM Firmware version, main number.
1 firmware_minor 1 read, EEPROM Firmware version, sub number.
3 model_number 2 read, EEPROM Model number. 2026 = XIAO IMU.
5 id 1 read/write, EEPROM Address of the IMU on the bus (0...253). New IMUs have ID 100.
6 baud_rate 1 read/write, EEPROM Bus speed. 0 = 1 Mbit/s (default, used by servolab), same codes as the motors.
11 gyro_range 1 read/write, EEPROM Measuring range of the gyro: 0 = 250, 1 = 500, 2 = 1000, 3 = 2000 deg/s (default).
12 acc_range 1 read/write, EEPROM Measuring range of the accelerometer: 0 = 2, 1 = 4, 2 = 8 (default), 3 = 16 g.
13 sample_rate 1 read/write, EEPROM Measurements per second: 0 = 26, 1 = 52, 2 = 104, 3 = 208, 4 = 416 (default), 5 = 833 Hz.
55 lock 1 read/write, RAM 0 = EEPROM writes are kept after power-off, 1 = they are lost (default).
56 quaternion_x 2 read, RAM half float Orientation, x part of the quaternion (w is not sent: w = sqrt(1 - x^2 - y^2 - z^2)).
58 quaternion_y 2 read, RAM half float Orientation, y part of the quaternion.
60 quaternion_z 2 read, RAM half float Orientation, z part of the quaternion.
62 angular_velocity_x 2 read, RAM mrad/s Gyro: turning speed around the x axis.
65 angular_velocity_y 2 read, RAM mrad/s Gyro: turning speed around the y axis.
68 angular_velocity_z 2 read, RAM mrad/s Gyro: turning speed around the z axis.
71 acceleration_x 2 read, RAM mg Accelerometer, x axis (1 mg = 1/1000 of gravity).
74 acceleration_y 2 read, RAM mg Accelerometer, y axis.
77 acceleration_z 2 read, RAM mg Accelerometer, z axis.