Skip to content

tillx4/makerbase-motor-controller

Repository files navigation

Introduction

This is a motor controller library for the MakerBase Servo 57D and 42D stepper motors. Communication works via RS485 and MODBUS RTU.

Examples can be seen in main.c but for proper use you need to be familiar with the motor manual.

Requirements

Will only run on Linux with a USB to RS485 converter supported by the kernel. Compiled with gcc 13.2

Helpful links

Motor manual Linux serial port configuration

Limitations

  • Only supports the three necessary modbus functions needed for the makerbase motors
  • motor_controller.c is also specific to the motors mentioned and their built-in functions
  • all motor functions from manual are implimented up to manual version 1.0.4

Functionality

  • All of the motor functions are non-blocking except calibrate_motor()
    • this is because calibrating requires a restart which can't be caught by any status functions
  • To wait for the motor to finish executing a function you can use the utility function wait_for_stop() or any of the built-in status functions the motor provides

Known Bugs

  • The motors I tested (57D, 42D) return false data on the read_error_angle() function (same problem reported by other users) Link: makerbase-motor/MKS-SERVO42D-57D#18 (comment)
  • This might even cause problems with other move functions, but I haven't had time to test this

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages