Replacing RB board with MKS 1.3 and ByeBye board

From RigidWiki
Jump to: navigation, search


Eventually the RigidBot controller board will show its limits. If you have made a short it's almost impossible to repair or change the parts.

The MKS v1.3 (and 1.4) have all the features of the RAMPS v1.4 + Arduino Mega 2560. The main difference is that the board is usable for both 12V and 24V. Whereas the RAMP v1.4 must be modified and the power for the Arduino Mega must be delivered separately. (RAMPs usually down-steps 12v to 5v to power the Mega but when you make it 24v you eliminate that feature.

The MKS v1.3 has the same size as MKS v1.2 More about the MKS 1.1+ can be found here:

The Case

The case will fit on the original place of the Rigidbot case. The case has been design to be used together with the ByeBye Board that makes the solution more compatible with the original RigidBot board. More about the ByeBye board at:

case files Thingiverse

The design and the use of cable-channels will swap the place of Extruder One and two. The text on ByeBye Board will not be correct. The reason for the swap is that the cable routing will look nicer.

Cables inside the case are "hidden" inside cable-channels. This will increase airflow and make the installation looks nicer


Heated-bed and thermistor can be installed on the ByeBye board or directly to The MKS board. If the heated-bed is connected directly to the MKS board the strain release/first link can be joint to a cable-chain to the heated-bed. (like this one

In the absence of a bye bye board the Heat bed wire is a rainbow colored cable where black and white are the thermister and the other colors paired to the heaters. it is possible to determine this with a multimeter and polarity is not a concern given that the heaters are just resisters. My machine was as follows. Purple, Green, Orange, Brown are one side and grey, blue, yellow red are the other side.


The X-Gantry can add a cable-chain with channel for X- stepper motor and X-min-Endstop. (like this one

Stepper Drivers

There are two kinds of commonly used stepper drivers.

Note that the trim-pot should be oriented the opposite direction on DRV8825 vs A4988.
Be sure to insert the driver with the correct orientation, or you'll need a new driver.

A compare between the stepper drivers can be found at:

A4988 DRV8825
Availability very widely available widely available
Approx. price $6.80 / 5 pieces $10 / 5 pieces
Max. theoretical current 2A 2.5A
Max. microsteps 16 32
PCB color Green / Red Purple
Stepper current adjust. trimpot Yes, near Dir pin Yes, near En pin
Typical Rs value 0.05 Ohm or

0.1 Ohm or 0.2 Ohm

0.1 Ohm
Vref formula (*) I_TripMax= Vref/(8*Rs) I_TripMax= Vref/(5*Rs)
Thermal Overload Protection Yes Yes
PCB layers 2 4
Small heatsink included Almost always Sometimes not
Active cooling required Recommended Recommended
IC packaging 5x5mm 28-lead QFN 9.7x6.4mm 28HTSSOP

Note that some important technical characteristics from the respective datasheets of the ICs are not directly comparable. For example, the DRV8825 is fully specified in terms of thermal characteristics, the A4988 is not. Another important characteristic that unfortunately is not directly comparable is RDSon, which is specified at different current levels in the respective IC datasheets.

Adjusting the stepper driver current

See these instructions: Pololu_stepper_driver_board#Tuning_motor_current.

Use the USB case as ground. Solder a small pin on the case to have a solid Ground to securely connect the voltmeter. Temperature Overload Protection It is very important to keep the stepper driver ICs below a certain temperature during printing, since both ICs feature thermal overload protection that when triggered (typically when the die reaches a temperature of around 150~160 C), shuts down the output stages i.e. halts all commands to the affected stepper and in doing so, ruins the part being printed. Heatsinks The MKS v1.3 has not a good solution for heat dissipation from the stepperdriver. The main heat dissipation is on the side that is encapsulated with the sockets and jumpers. It is not yet determined how much of a real impact the small aluminum heatsinks shown in the pictures above have on cooling the ICs, as both stepper driver ICs depend much more on proper PCB layout and solder pad contact (as well as proper airflow, remember!) for heat dissipation, rather than on dissipation through the top of the IC package. This is because both stepper driver ICs have an exposed metal pad under the chip that contacts the PCB and this is the "path of least resistance" for heat dissipation. The secondary path for heat dissipation is through the package leads and in this aspect the DRV8825 provides for possibly slightly better power dissipation compared to the leadless A4988. It is my understanding that dissipation through the top of the ICs is almost irrelevant here.

Stepper driver jumpers

Pololu released the DRV8825 Stepper Motor Driver Carrier ( ) a while ago. It has high current and a resolution of 1/32th step. The finer stepping produces significantly less noise than when using A4988. ( shows an example of how much more silent it is. MKS v1.3 has support for this board and you can use it by simply setting a jumper. Under each stepper driver there are 3 jumpers that can be set.

Now we concern with micro stepping settings for our chosen driver.

A4988 Jumper 1 Jumper 2 Jumper 3
Single Step
1/2 Step Inserted
1/4 Step Inserted
1/8 Step Inserted Inserted
1/16 Step Inserted Inserted Inserted

DRV8825 Jumper1 Jumper2 Jumper3
Single Step
1/2 Step Inserted
1/4 Step Inserted
1/8 Step Inserted Inserted
1/16 Step Inserted
1/32 Step Inserted Inserted
1/32 Step Inserted Inserted
1/32 Step Inserted Inserted Inserted

The usual setting of 1/16 step for A4988 is highlighted with yellow. The same jumpersettings on DRV8825 with setup for 1/32 microstepping. The easy setup is to install all jumpers and adjust the firmware to the driver used.   The X/Y/Z actually dont need a "hold torque". Actually the Z is "self holding" because of the threads.

The Extruder(s) can create a backpressure that is greater then the stepper motor hold torque. This creates a "thomp" sound and you can feel the stepper motor going a step backwards/backlash. Using 1/16 microstep on the extruders increase the hold torque and reduces the backlash.

The Lid

Still under construction The case as ducts in the lid that creates a flow over the stepper drivers.

There is 2 different kind of lids • Axial fan inside and duct over the stepperdrivers heatsinks for the outgoing airflow. • Radial fan on the lid and 6 “fingers” pointing the airflow to the heatsinks and the MOS fet/regulator.


The Termistor connectors

The extruder termistor cables are routed from the ByeBye board in the cablechannes and betwwen the sockets for the LCD. The heatbed thermistorcable is routed under the board and between the sockets for the LCD.

The endstop connectors

MKS GEN 14-4.jpg

Here you need to pay attention. the end stops MUST be connected to the bottom most 2 connectors (if drivers are away from you). If you connect these backwards to the two upper most, you will trigger your board to power cycle, this is due to the upper most pin supplying 5v, the middle pin supplies ground and the lower is the actual signal for the end stops.

You can also do as follows and make it into a 3 connector:

(PICTURE of ENDSTOP CABLE to RB microswitch ===========================================================)
(PICTURE of ENDSTOP CABLE to Zprobe with +5V GND Sense ================================================)

Change all endstop connectors to 3 pin version even if you use only 2 wires = microswitch. I made all enstrop cables 3 wire and adjust at the endstop connector. This makes it possible to change the type of endstop without changing the cablepath/cablefastener/cablechain. By adding a endstop cable with 3 wires to the extruder cables it is possible to change the Z endstop for a Z probe on the extruder. Z probe on the extruder can be used with or without Auto Bed level (ABL).  

The part fan connection of ByeByeBoad

(HELP!!!! =========== How to get 2 fans from the MKS 1.3 board??)

The Firmware

The firmware used is the latest Marlin Firmware. The firmware can be downloaded here:

Start by reading the dokumentation for Marlin.

Download the Arduino IDE from here:

Install the USB cable ONLY!! No 24V power

Start by testing to upload the blink.ino using this build-in example guide: If you get "Upload finished" without any errors the Arduino IDE and the MKS v1.3 board are communicating. Under Tools-> Board -> Arduino 2560 Mega or 2560 Mega (This may differ depending on version of Arduino IDE)

Upload all the required Add-On that is found in the Marlin ArduinoAddons directory.

Install the USB cable ONLY!! No 24V power

Open the Marlin.ino

You will get alot of tabs in the Arduino IDE



Start by installing the adjusting the baudrate

The baudrate is default 250000 Baud. The original RB is 115200 Baud.

There is 2 possible ways to do this

  • Adjust the Firmware
  • Configure the Software

This example is how tho adjust the Firmware.

Search for this in configuration.h (row 37-40)

// This determines the communication speed of the printer
#define BAUDRATE 115200


Current Marlin supports MKS 1.3/1.4 directly. In Configuration.h replace the #define MOTHERBOARD XXX line with


Otherwise, the available boards can be found in the tab boards.h and you will need to modify the cloest available configuration. The boards are defined by a "name". The interesting part in boards.h is

#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)

Find a "name" that may fit like BOARD_RAMPS_13_EEB.

Change the row in configuration.h (row 44-49)

// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup


The LCD is choosen from this rows in the configuration.h tab (row 539 - 708).

Picture of a Full Graphic Smart Controller

// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder:

Be sure that there is ONLY one LCD defined. Defining the LCD is simply by removing the // before the #define and convert a comment to a preprocessor command.

If the cables are correct installed you should get a picture similar to this.

LCD version 1.0.0

It is very common for the two 10 way LCD shrouded pin headers to be soldered in backwards. If this is the case you will need to modify them in order to rotate the ribbon cable 180 degrees. (Still true as of 4/2018)
demonstrated here

Test to gently warm the thermistor. You should se a temperature that is changing.

This video may be helpful:

Temperature sensors

In the configuration.h (row 69-110) you find how to setup the temperature sensors. (=====================HELP!!! I do not remember the original RB sensor value) The rigidbot original used a sensor of type XXX for the extruder(s) and sensor of type YYY for the Heatbed. I have changed thermistors to:

  • Extruder 100K thermistor - ATC Semitec 104GT-2

- this is sensortype 5

  • Heatbed 100k thermistor - best choice for EPCOS 100k

- this is sensortype 1

It is not important to change the thermistor to make the MKS board work. You have to find the type of sensor that you use in the list

//=============================Thermal Settings ============================
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is Mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
// 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 110 is Pt100 with 1k pullup (non standard)

#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 5 (single extruder make this 0)
#define TEMP_SENSOR_2 0

Translated to human text this configuration is

  • Extruder 0 uses a sensor of type 5 (100K thermistor - ATC Semitec 104GT-2)
  • Extruder 1 uses a sensor of type 5
  • There is no redundant tempsensor.
  • The heated bed uses tempsensor of type 1 (100k thermistor - best choice for EPCOS 100k)

Thermal Runaway Protection

This is a good thing to have. Thermistors are fragile and this protects the 3D printer from starting a fire.

In the configuration.h (row 225 - 261) you can enable the thermal runaway protection.

/*================== Thermal Runaway Protection ==============================
This is a feature to protect your printer from burn up in flames if it has
a thermistor coming off place (this happened to a friend of mine recently and
motivated me writing this feature).

The issue: If a thermistor come off, it will read a lower temperature than actual.
The system will turn the heater on forever, burning up the filament and anything
else around.

After the temperature reaches the target for the first time, this feature will
start measuring for how long the current temperature stays below the target

If it stays longer than _PERIOD, it means the thermistor temperature
cannot catch up with the target, so something *may be* wrong. Then, to be on the
safe side, the system will he halt.

Bear in mind the count down will just start AFTER the first time the
thermistor temperature is over the target, so you will have no problem if
your extruder heater takes 2 minutes to hit the target on heating.

// If you want to enable this feature for all your extruder heaters,
// uncomment the 2 defines below:

// Parameters for all extruder heaters

// If you want to enable this feature for your bed heater,
// uncomment the 2 defines below:

// Parameters for the bed heater

I have changed the THERMAL_RUNAWAY_PROTECTION_HYSTERESIS to 6C and the THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS to 4C. This must be tested. If the value(s) are to low and the heatercartridge in the extruder is effective even 6C is a bit low. If you have a well isolated heatbed, 4C is a bit low. Start with setting the values to low and heatup the 3D printer. If you get the warning you got a to low value, increase with 1C and test again. Using a enclosure of the 3D printer will effect this. Heating inside an enclosure will be faster = adjust the values.


Connect the endstop cables.

Be sure that the microswitch dont short 5V to ground when activated. Test this before connecting using a voltmeter and the connectiontest ("buzzer"). Activation of microswitch should connect sense to GND. It is possible to test the endstops even if the MKS board is only connected to the USB.

The EndStop Tester You can send the M119 command to the printer using a simple RS-232 terminal. (like old hyperterminal)

Many printercontrol softwares have a send command option.

When the command is entered the status shows up. It reports all 6 EndStops and Open is an untriggered Endstop an The activated is reported as TRIGGERED.

Using a program and send a command to get the report only shows the status when the command was received. A new command must be sent after each report.

I have made a small program for Windows that shows the EndStop status almost in real-time.

The file is available as a Zip. Simply unzip into a folder and run. The program can be found at 3D Printer EndStop Tester

Connect the 24V power

Disconnect the USB. Connect the PSU 24V with the mains not connected to the PSU. Be careful taht 24V+ and 24V Gnd is connected. Power on the PSU and the LCD should be blue and then show the marlin welcome picture.

Connect Stepper motors

Connect just one stepper motor and start with X then Y. Position the X and Y in the middle. Use a program that are able to send manually movements to X and Y. This can be done from the Marlin Firmware if you LCD screen is already working.

In configuration.h it is possible to change direction of the stepper motor(s). (row 319-326)

The stepper motors may rotate in the wrong direction

#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false

Test until the X and Y moves in the right direction. This is much easier than shifting the cables to the stepper motor(s)

When the direction is right, try to use X Home and Y Home

Move the Z Endstop to a position that makes contact when nozzle is at least a couple of mm above bed.

Move the Z axis up a couple of mm and back again Do a Z Home and check that the nozzle is a couple of mm above heatbed.

Connect the extruder without filament. Test both direction of the extruder stepper motor.

Changing heatbed limits

It is not possible to move to the maximum perimeter of the Heatbed with the default values in Marlin The limits for the heatbed is found in configuration.h (row 335-343)

// Travel limits after homing
#define X_MAX_POS 406
#define X_MIN_POS 0
#define Y_MAX_POS 304
#define Y_MIN_POS 0
#define Z_MAX_POS 254
#define Z_MIN_POS 0

This is the values for a Rigidbot Big.
The Standard Rigidbot was 10in x 10in x 10in. 10 inches is 254mm.

// Travel limits after homing
#define X_MAX_POS 254
#define X_MIN_POS 0
#define Y_MAX_POS 254
#define Y_MIN_POS 0
#define Z_MAX_POS 254
#define Z_MIN_POS 0

Default axis steps per unit

The Firmware must match the stepper motor drivers setting In this guide I have installed all three jumpers. Depending on the stepper motor driver the values is different The values is for DRV8825. The values for A4925 are exactly 50% of the shown values.

This can be found in configuration.h (row 480-500)

// default settings

#define DEFAULT_AXIS_STEPS_PER_UNIT {200,200,3200,195} // default steps per unit for DRV8825
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {800,600,100,10000} // X, Y, Z, E maximum start speed for accelerated moves.

#define DEFAULT_ACCELERATION 600 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for retracts

The X , Y and Z steps per mm is fixed. (X = 200 Y = 200 Z = 3200) Never change them to calibrate against an item. They are matematical.

Default Values for the original Rigidbot (10x10x10) with 1/16 micro stepping are X = 44.44, Y = 44.44, Z = 1600. The X and Y calculations are as follows. The Belt is 2 mm per notch. The pulley is 32 steps so one revolution of the motor moves the belt 72mm. The stock X and Y motors have 200 steps per revolution (1.8 degree per step) thus one revolution (72mm) divided by 200 steps is 2.777777 mm per step. with 1/16 micro stepping turned on we mulitply that number by 16 and get a step revolution of 44.4444444 steps/mm

For the Z-axis the rod has a pitch of 2mm. This means that one revolution moves the gantry 2mm. The motor is also 200 steps per revolution. 200 steps per revolution divided by 2mm equals 100 steps per mm. With 1/16 microstepping we multiply by 16 giving a value of 1600 steps per mm.

Here is one online-calculator that shows how the values are calculated.

The Extruder steps per mm has to be calibrated. Here is one guide how to do this.

Use the same calculator for extruderstep and update the Firmware and upload.

The Max feedrate, Max acceleration, default acceleration and default retraction acceleration is values that worked for me.

I have some testing with Jerk values

#define DEFAULT_XYJERK 5.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)

Tom Sanlander have a video that explains how this works.


MKS Gen V1.1 works with 24V, so no soldering required!

Please follow wiring information given in this WIKI:



Marlin Configuration.h FIRMWARE

If you are using the Marlin based firmware be sure to go through the Rigidbot configuration.h and copy all the required parameters.

Any changes you have made will have to be remade again (steps, PID, etc etc)

Set or leave the motherboard assignment as RAMPS_13_EEB in configuration.h

This tells it it's going to be Extruder Extruder and Heated Bed but we're going to trick it to include fan and correct the heaters pins as labeled, the rest is already correct for the board assignement:

in pins_RAMPS_13.h change the following:

#if MB(RAMPS_13_EFF) to #if MB(RAMPS_13_EEB) <--- EBB has 90% of the values we need, but we rename it EFF to EEB so that it keeps the fan assignment from EFF then change the pins on the following lines to correspond.

#define FAN_PIN 9
#define HEATER_1_PIN 7

Check to confirm the above values are not reset further down in the file in a #else section. In my pins_RAMPS_14.h file HEATER_1_PIN was! Either comment out the offending lines in the #else section or enter your #define statements below the #else section.

Leave all others alone, the rest is correct.

or a link for the lazy pre-compiled, self-extracting RAR, just change your own values in configuration.h:

Marlin v1.1.0 RC3 for MKS v1.3 or higher

Original Discussion here:

Google+ Community Post

Quick Note to clear some confusion:

The extruder fans run off the + of the heater cartridge and the negative leg of the thermistor at all times.

That's how they stay running. There are no other leads for extruder fans. The heater cartridge is always on on the +Positive side, so you use the negative of the thermistor to return it and complete the circuit for the fan to always run. The parts fan is the one that is controllable by you or any interface you are running, you can set percentage/speed, when to turn it on/off by the interface of your choice (pronterface, octoprint, directly from cura, etc etc). The pins referenced above or the firmware for that matter, turn the correct interface into the controllable interface of the fan. So yes it is controllable using those assignments on the correct point on the board.

The Fan output on the board in the front next to the ET0, ET1 and BED connection is for a PARTS FAN for when you print with PLA or other materials.

If the fan on your extruder is not running while the machine is plugged in and idle, you have the fan - on the wrong side of the thermistor. If it doesn't : Your + heater will feed +24v then, when you tell it to heat up, the fan will finally turn on, but at that point you got +24v coming in and force feeding it backwards through a +5v line (thermistor) and your fan will run basically on 19v, but the excess will backfeed through your board and eventually kill your board.