Installing the MKS Gen L with TMC2208 Silent Stepper Motor Driver

Introduction

NOTE: This setup is severely outdated. I highly recommend looking for an updated setup. Since I do not own the Ender 3 anymore, I will not be making an updated guide.

After watching Teaching Techs video about the MKS Gen L replacement board for the Creality Ender 3 or Ender 3 Pro, I was instantly hooked. This board provides many upgrades over the stock MELZI Mainboard.

Source: Michael from Teaching Tech. https://youtu.be/LNdMYgwez8Y?t=80

Without getting to far in to the specifics, the MKS Gen L has a better microcontroller that allows us to change the firmware without having to compromise on features, a bootloader already installed so that you don’t have to flash one, changable stepper motor boards, and multiple servo outputs so you can easily add multiple upgrades like the the BL Touch or filament runout. The one drawback is that you will be losing the built in SD Card support but there is a way to add it back.

Source: Michael from Teaching Tech. https://youtu.be/LNdMYgwez8Y?t=113

If you are planning on adding on upgrading your printer or would like it to be nearly silent while printing, I HIGHLY recommend making the upgrade to the MKS Gen L. This isn’t a step by step guide per say, as most of it is covered in Teaching Techs video, but a few of us over at the Sudomod Discord have found a few things that are different between the Creality Ender 3 and Ender 3 Pro.

[amazonDisclaimer]

Materials, Tools, and Downloads

Materials

For my setup, I chose the MKS Gen L mainboard and TMC2208 Silent Stepper Motor Drivers. You are able to choose any stepper motor drivers you wish for though. For instance you can keep to the stock A4988 Stepper Motor Drivers if you would like to save a little bit of money.

You also have the option to change out the case fan if you would like. Noctuas are the most popular and are generally much quieter than the stock fan. We have options for this. We can have the options of 40x40x10mm or 40x40x20mm and 5v or 12v for each. The 40x40x20mm 12v would move the most air through the case and you can plug it in to the mainboard fan slot so it is not running all the time like the 5v would. But here are the links for each option:

Tools

There are a few tools needed for this project:

  • Phillips screwdriver
  • Craft/Utility knife
  • Multimeter
  • Small flathead screwdriver is helpful (like the one that came with the Ender 3)

Parts to Print

Downloads

Arduino IDE
This is the program that I use to make the necessary edits and to be able to flash the firmware to the MKS Gen L. The version at the time of writing is 1.8.8
Marlin Firmware
Think of this as the operating system for the printer. This is what we flash to the MKS Gen L to process and execute the GCODE we send it. The current version at the time of writing is 1.1.9.

Guide

Printing Parts

Before you can do anything, you need to print a case for the new mainboard. These prints will vary based on what printer you have:

Original Ender 3

I printed the original case made by Michael at Teaching Tech and found that the screws for the top and bottom were about 8mm off. I modified the case to account for this defference. The stock fan for the enclosure is set for a 40x40x10mm fan. I have also made an option for a 40x40x20mm fan. Both of these options can be found on Thingiverse.

Ender 3 Pro

The case that Michael made was designed for the Ender 3 Pro and can be found on Thingiverse. The case allows for a 40x40x10mm fan but I have also modified that case for a 40x40x20mm fan and can be found in the comments section.

Other Parts

I highly recommend printing some sort of cable protector for your printer. The extrusion railing can be very sharp and easily slice through the outer coating of wires and possibly causing a short. I printed this cable protector by Supavitax and it works like a charm.

Choice Time

I present you with two choices:
1. Continue on as normal.
2. Edit and flash the firmware and jump back here later. This is the better option if your printer is not close to your computer.

Powering Down and Labeling

The next thing you should do is power down the printer. You should do this by having the printer on and then unplugging it from the wall or printer. You should not just turn the switch off because that would allow residual power to be left in the components.

The next step is to start disconnecting and labeling wires. But before you start pulling wires, you need to take off the hot glue that is holding them in place. This is where that small flathead screwdriver comes handy. If there is a connection to the board and it isn’t in a green block, there is most likely glue there. It should be relatively easy to peel away once you get under it.

Once you have all the gue off from the connectors, you can start pulling wires off the mainboard. I would start with the stepper motor wires because they are already labled and simply pull out. When you start getting to the unlabled wires, the easiest thing to do is to take a piece of masking tape or painters tape and label each wire as you undo them. You can use the following image as a guide to label the wires.

Source: Michael from Teaching Tech. https://youtu.be/LNdMYgwez8Y?t=265

I personally just used the lettering over the picture and marked that on the tape as they match up with putting them in the the MKS Gen L.

Changing over to the MKS Gen L

This is where we will be putting our TMC2208 Silent Stepper Motor Drivers on to the MKS Gen L. On the bottom of both the MKS and the stepper boards, you will see some small writing. Basically, you want to match up the lettering. Most importanyly, you need to match “GND” and “DIR” pins on the 2208 driver and match those pins up with the “GND” and “DIR” pins on the MKS Gen L. The lettering may vary a little. If you are using the stepper boards I linked, you will see a black spacer and a blue spacer on the pins. The MKS board has a black spacer and a green spacer. You can probably guess: match the black and black spacers.

For the both versions of the Ender 3, we only need to install 4 stepper motors since we are running 3 stepper motors and a single extruder. You would leave the “E1” (the one the farthest away from the green wire block connectors) slot empty.

Now, make sure that the printer has no power to it. Make sure that the screws are all the way open. You can see an example of what to look for in the image below.

Source: Michael from Teaching Tech. https://youtu.be/LNdMYgwez8Y?t=358

You basically want to put the wire in the little hole in the middle. Look at the bottom of the board to see which one is positive (+) and which is negative (-). Once the wire is in, tighten the screw on the top until it is tight. It is a good idea to give a little tug on each wire after tightening them to make sure they will not come out.

Now, you need to tune the new stepper boards to match or have a similar V-ref of the previous board. Now the process is basically the same process except that you will need a screwdriver to adjust the voltage. One thing that I like to do is to take a set of alligator clips, clip one end to the red lead on the multimeter and hook the other end to the metal part of the screwdriver. This way, you can use one hand to hold the ground lead on the ground screw and use the screwdriver to make adjustments without having to stop multiple times to test the voltage. Just be very careful to touch only the screw for the potentiometer and non of the other components or you might short something. Ask me how I know.

Now we are going to set the VREFs for each stepper motor. These VREFs are assuming you are replacing all of the stepper motors with 2208s. Turn the screw slightly to set the voltages to the following:
X, Y, Z: 0.76V
Extruder: 0.90V

Once you have the stepper drivers dialed in, unplug the printer while leaving the power on to drain any of the power left in the components. Once all the power is drained (the LED turns off), we can continue to plug the rest of the components back in to the printer.

At this point, I put the case on the Ender 3. I loosely attached the 2 screws in the front of the machine and then screwed in the top of the case before tightening the two front screws. If you printed the cable protector, now is a good time to put it in. Then I attached the remaining wires in for the bed heater, hot end, hot end fan, and part cooling fan before placing the board in the case. If you put it in the case before connecting those wires… Well good luck! And this is the point that I attached the board to the case making sure that the wires were in a position that they wont get pinched. Use the screws that were holding the MELZI board to the metal housing to attach the new MKS board to the printed housing. And finally, start attaching the rest of the connections according to the image below. Just don’t attach the endstops (K-X, K-Y, and K-Z) just yet because we need to modify them.

Source: Michael from Teaching tech. https://youtu.be/LNdMYgwez8Y?t=443

Before you go and try to put the endstops back in to the MKS, you need to modify them just a little. Teaching Tech does a good job explaining it in his video at the 6:20 mark. When you shave off that key, you can plug them in to the MKS.

Now, If you are forgoing the micro SD card slot like me and using the stock LCD screen, we need to make another easy modification to the ribbon cable. Basically we need to remove the key on the screen side of the ribbon cable. This is because we need to flip the cable on the screen side so that it works (at least for the original Ender 3. I will post any differences that we find). The easiest way I found to do this is by using a pair of flush cutters rather than a craft/utility knife. After you have the key cut off, insert it in to EXP3 on the back of the screen backwards of how it was previously plugged in. The other end on the MKS goes in to the EXP1 slot.

Firmware Configuration

Now you need to make a few firmware edits to get everything working as it should. In Michael’s video, there is a step for the screen that I had to reverse to get the screen working. The following edits are the barebone ones I made to get my printer working. I do not have a BL Touch or the screen with the SD card. Stock screen and that’s it.

If you already have a customized firmware, you can skip over this next paragraph as I assume you already have the correct setup for the Ender 3.

If you do not have the Arduino IDE installed already, do that first. After that is complete, unzip the Marlin Firmware folder to some place you know where it is. I placed mine on the desktop. Navagate to the \Marlin-1.1.x\Marlin\example_configurations\Creality\Ender-3 folder. Copy all the files in there and paste them in the \Marlin-1.1.x\Marlin folder overwriting any files it needs to. While in the same folder, double click the Marlin.ino file to open it with the Arduino IDE.

The first thing we are going to do is to to Tools > Board and select Arduino/Genuino Mega or Mega 2560. Next, go to Tools > Manage Libraries. Let the library update and the search for U8glib by oliver. Install that. When that is done, close out of the library manager.

The following edits we going to be making is in the Configuration.h tab. Hit Ctrl + F so open the search box.


Search for: MOTHERBOARD

Replace: BOARD_MELZI_CREALITY with BOARD_MKS_GEN_L

Should look like: // The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_MKS_GEN_L
#endif


Search for: INVERT_X_DIR

Invert the true and falses for INVERT_X_DIR, INVERT_Y_DIR, INVERT_Z_DIR, and INVERT_E0_DIR.

Should look like: // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true

// @section extruder

// For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false

Save the file by hitting Ctrl + S and then switch to the Configurations_adv.h file.

Search for: E0_AUTO_FAN_PIN

Replace -1 with 7

Should look like: #define E0_AUTO_FAN_PIN 7

Save that file.

Flashing the firmware

Now that you have your firmware edits completed, you need to flash the firmware to your printer. This is pretty straight forward. First go to Tools and hover over the Port line. Make a mental note of the objects in the list. They should look like “COM#” where # is an actual number. Now plug in the board to the computer you are using using the USB cable. Open the Tools > Port menu again and you should see a new entry. Click on the new entry. It is also worth double checking that the board is selected as Arduino/Genuino Mega or Mega 2560. We do not need to have the board powered as the USB power is enough to be able to flash the firmware without it having to be connected to the printer.

Now to push the firmware to the MKS. You can hit Ctrl + U, or go to Sketch > Upload to push your firmware. This will check for any errors before building and pushing the firmware to your printer.

If you skipped to flashing the firmware before installing the board, you can now jump back up to Powering Down and Labeling.


Extra Steps

With the main swap out complete, you are able to start printing again! But there are a few extra things you should do to make sure your printer is printing optimally.

18 Comments

  1. Nick Wilson on February 21, 2019 at 10:54 pm

    So, if I already have the MKS Gen L board installed and running with the A4988 drivers (based on Teaching Tech’s video), is there any changes I need to make to the firmware to make it work properly with the new TMC2208 drivers? Is it just a matter of switching out the drivers and adjusting the voltages to match the A4988 driver voltages?

    • LTM on February 22, 2019 at 2:05 pm

      You would need to define that you are using the TMC2208 in Configuration.h. I use the standalone version.

      #define X_DRIVER_TYPE TMC2208_STANDALONE
      #define Y_DRIVER_TYPE TMC2208_STANDALONE
      #define Z_DRIVER_TYPE TMC2208_STANDALONE
      #define E0_DRIVER_TYPE TMC2208_STANDALONE

      • Nick on February 22, 2019 at 5:31 pm

        Got it, thanks for getting back to me.

  2. Nick Wilson on February 21, 2019 at 10:55 pm

    Thanks for putting this article together by the way.

  3. Kasper Nielsen on March 10, 2019 at 6:31 am

    Great article. Gonna use it alongside TT video when i receive my MKS Gen L board and TMC2208 steppers. Thank you very much

  4. Tony Riek on March 20, 2019 at 11:57 am

    Besides the price difference, what are the pros/cons of 2208 vs the 4988

    • LTM on March 21, 2019 at 9:06 pm

      The 2208s are MUCH quieter (nearly silent) and give you much finer control over how you can use them (ie: if used in UART mode, 1/256 microstepping over 1/16 and selecting between stealthchop and spreadcycle mode).
      Teaching tech made a video about them that explains most of what you are looking for. (https://www.youtube.com/watch?v=7VHwcEroHPk)
      There is also a series of videos by “Da Hai Zhu” that explains the multiple ways that you can set them up. (Part one: https://www.youtube.com/watch?v=TubpTMFkbVs)

      You really only need 2 for the X and Y axis and stick with the 4498 for the Z and extruder since they really don’t make too much noise to begin with but I have mine in a living area and like it to be as quiet as possible.

  5. Robert H on April 2, 2019 at 7:51 pm

    This is an awesome write up and I will definitely be using this alongside TeachingTechs video on the matter. I do have one question though, since the Ender 3 PSU is 24volt, how well would the 12V noctua fans work from the MKS Gen L board? Are any modifications required, or just plug n’ play?

    • LTM on April 3, 2019 at 12:27 pm

      You will need a buck converter to step the voltage from 24v down to 12v. I printed one of my buck converter cases and then I took a short length of wire and went from the hotend fan connection on the Gen L to the outside of the Gen L case where I have my buck converter just sitting next to the 2020 extrusion. From the output of the buck, i Have it going back in to the Gen L case and then up to the hot end fan. It looks a little ghetto but it works.

      If you are wanting a fan for the Gen L case, I would just get a 5v one and plug it directly in to the Gen L.
      MKS Gen L Pinout
      In the bottom right corner, there is a set of 4 pins. Those are 5v connectors. Red wire would be in the bottom row and black on the top.

  6. Scoozy on April 27, 2019 at 12:37 am

    Can someone tell me what i need to do for making a swap with the CR-20 Pro or can i use the same steps as discribed in this tutorial ?

    • LTM on April 29, 2019 at 7:17 am

      It should be generally the same idea since Creality does like consistency. Just make sure to label everything while taking wires off so you can put them in the right places on the new board. I would also suggest a quick Google search to see if someone has done it before and made a guide about it.

  7. Jason on May 1, 2019 at 7:22 am

    Hey LTM! I really love your videos and have followed them step by step ~ however, sadly, I seem to be getting some “clicking” on my extruder leaving my prints with some underextrusion.. is this a known issue you have come across already? I already have checked whether my hot end is clogged or one of my cupplers faulty, but neither is the case.

    Ones a print is about half way through I am getting these “clicking sounds”. Might this be due to some stepper settings I have not set correctly? (Using MKS GEN L and TMC2208)

    Thank you very much for your time – I would appreciate a reply ( :

    Kind Regards

    • LTM on May 12, 2019 at 7:20 am

      I have not experienced this and I have not heard of anyone that has experienced this. Have your tried swapping out stepper drivers to a different position to see if it might be the driver itself? Just be sure to set the voltages before you start printing.

  8. Geoff on May 14, 2019 at 7:03 am

    My TMC2208’s arrived today, I already have the MKS Gen L board so updating my Edner 5 ‘any day now’. Good info, well presented.

  9. serdar okay on June 2, 2019 at 3:07 am

    Hi LTM i have issue with the x and y motors, i use MKS GEN L with TMC2130 V1.1 standalone for x and y stepper motors on ender 3, they make whine sound. i wonder what i did wrong?
    Thank you in advance for your reply….

    • serdar okay on June 18, 2019 at 3:38 pm

      Hi again i solve the problem, my tmc2130 drivers brand bigtreetech and they make the spi pins on double side, i cut the pins on looking the down side and right now working perfect.

  10. Alois Rohbogner on April 3, 2020 at 6:31 pm

    Hi, can I use the TMC 2208 V3.0 as well? I have them here already, therefore I would like to know….

    • LTM on April 17, 2020 at 8:35 pm

      Not entirely sure. Haven’t had my Ender in a few months so I have not been keeping up on all that.

Leave a Comment