12. Firmware

MKS Servo42C / BigTreeTech S42C initialization

The adoption of these closed-loop control steppers is not only to prevent step-losing, but they also benefit from lower temperature, higher torque, and run near silently for indoor scenario.

It is a combo of a control board attached to a normal NEMA17 stepper. A magnet located under the PCB is pasted on the stepper shaft. An encoder on the PCB senses the magnetic field changes as feedback for the driver to command the stepper.

To make these closed-loop controllers work, they needs to be calibrated before the first time use or the attached stepper is changed.

Compared to normal driver modules like TMC or A4988, the acceleration, micro steps are stored in the Servo42C / S42C board, but not in the firmware config file. The driving current is automatically adjusted by the Servo42C / S42C board.

Note that with Servo42C layers will still shift if the nozzle crashes or belt teeth skips. The major benefits are cooler and quiet operations.


Actions

Here are the simplified steps that initialize the Servo42C boards. Please check the detailed reasons below.

  1. Remove or at least loosen the XY belts. Move the extruder to the center of XY plane.

  2. In the Servo42C LCD menu, set the acc value to 538.

  3. In the Servo42C LCD menu, enable the protection function.

  4. In the Servo42C LCD menu, run the calibration procedure.

  5. Set the belts tensions to the medium or lower side.


Servo42C acc value and system friction

According to MKS tech support, the acc value in S42C relates to the Kp value in PID control. The Servo42C acc should be set to a value which can deal with the friction (mostly due to belt tensions) in the motion system. But setting a high Servo42C acc value with high belt tension burns the Servo42C easily. The 10mm-wide belts used in a small build area like SK-Cube won't stretch that easily, so medium or lower belt tension will be enough.

If you want a higher belt tension, carefully test movements in multiple directions with the highest speed you'll use. Movement by a single G-code command should be a single line segment, but not a curve or a bent line which means one or both of the XY stepper outputs are laggy and then compensate immediately. If the lag-and-compensate happens, increase the Servo42C acc value to the next higher level.

On the contrary, at the initialization stage if you set the acc 538 and still find curvy or laggy movements, your belt tensions are too high or uneven. Please lower and even your belt tensions. Don't risk on burnt Servo42C's until you're more familiar with them.


The protection function

Enabling the protection function stops powering the stepper and gives you a LED hint when the extruder is stalling or crashed in an unexpected condition.

According to MKS tech support, the protection function triggers if within T microseconds, the moving distance is lower value A, and driving current is higher than value B.


Calibration

A magnet is pasted on the stepper shaft under the Servo42C board. The calibration is a procedure for the Servo42C to memorize the magnetic field intensities and directions at all angles. According to the MKS Servo42C manual, calibration should be done with no load carried. The calibration might receive shifted values if high friction exists in the motion system.

  • Manually move the extruder near the center of XY plane so it has some space to move around.

  • Find the calibration job by pressing the buttons on the small display panel. Use a non-conductive stick if the buttons are deep in the frame.

  • Once the calibration procedure starts, the stepper will turn clockwise and counterclockwise for one round.

  • The higher Servo42C acc value you set, the louder the calibration procedure will be.


Save and use new values

  • In MKS Servo42C, turn off the power and then turn on again.

  • In BigTreeTech S42C, there is a "Save Settings" item in the menu.


Recommended default values for MKS Servo42C

  • MotType: 1.8 (stepper type)

  • Mode: CR_vFOC (vFOC is the closed-loop control mode which uses the EN/STEP/DIR interface, with encoder ON, and adaptive current)

  • Mstep: 16 (micro steps)

  • En: L (enable pin low active)

  • Mplayer: Enable (enable internal 256 subdivision)

  • Acc: 538 (Not the acc value used in the firmware, but relates to the Kp value in PID control)

  • mA: Leave it untouched. The current value is auto adjusted in the CR_vFOC mode.


Reference


High belt tensions + Acc disabled laggy movement



High belt tensions + Acc 538 still laggy movement



Medium belt tensions + Acc 538 normal movement

Both Klipper and RepRapFirmware are popular firmware choices and here is a simple comparison.


Klipper

  • Run on a host computer, usually a Raspberry Pi, or a Linux-based computer.

  • More precise motion control thank to the high computing power from the host computer.

  • Intuitive website interface

  • Steeper learning curve.


RepRapFirmware

  • Run on the control board.

  • Intuitive website interface.

  • The control board should have wireless connectivity from an on-board WIFI module or an inserted WIFI module.

Klipper

Here are the overall steps to install Klipper firmware:

  1. Prepare a 16~32GB microSD card and a Raspberry Pi 3B (or newer).

  2. Follow those steps and install Raspberry Pi OS to your Raspberry Pi.

  3. Login your Raspberry Pi and install the software Klipper Installation And Update Helper (kiauh). This helper will guide you to install Klipper and a web interface Mainsail or Fluidd.

  4. Connect to the web interface in your local network.

  5. Download the Klipper config file for SK-Cube and put it into Klipper directory using the web page.

  6. Start tuning and use your printer.


Since the structure of SK-Cube and SK-Tank are similar, more Klipper config files for other boards can be found in SK-Tank's repository:
https://github.com/SecKit/SK-Tank/tree/master/firmware/Klipper


Klipper official document
https://www.klipper3d.org/Installation.html

RepRapFirmware

RepRapFirmware doesn't require a Raspberry Pi, but the control board should have wireless connectivity.

Either there is an onboard WIFI module like Mellow Fly CDY V2/V3 board, or an extra WIFI module can be inserted to BigTreeTech GTR (here) or BigTreeTech Octopus Pro (here or here).


The overall steps to control your printer with RepRapFirmware:

  1. Prepare a 16~32GB microSD card. Extract the firmware package files to the card.

  2. Put the microSD card to the control board. Power it up to flash the firmware.

  3. Setup your wireless network info in the board using a serial software tool and a USB cable.

  4. Connect to the web interface in your local network.

  5. Start tuning and use your printer.


Please find the detail steps in the firmware chapter in SK-Tank manual.