Ender 3 – MKS Gen L and BLTouch Upgrade

After breaking my Ender 3 board by acciendent, I decided to switch to a MKS Gen L board. Contained in this article are the steps that I’ve taken to swap boards. I am writing this after the fact, I do apologize if I miss any details.

WARNING: This deals with handling electronics and electricity. Follow at your own risk.

Required Equipment & Software

  • MKS Gen L Board
  • Computer
  • Arduino IDE
  • Screwdrivers (insulated one for adjusting stepper drivers)
  • Multi Meter

Step 1 – Print a Case & (Optional) BLTouch mount

Print a case for the MKS Gen L board and optionally the BLTouch mount beforehand. Following are the models I’ve used:

MKS Gen L Case by TeachingTech: https://www.thingiverse.com/thing:3311643

BLTouch Mount for Ender 3 created by registerdthing https://www.thingiverse.com/thing:3003725 .

Step 2 – Label current connections

IMPORTANT: Turn Power Off and Unplug Power Cord

After opening the case, label the current connections on the Ender 3. Below is an image describing what everything is.

Step 3 – Write down current Ender 3 Firmware settings

Write down/take photos of current Ender 3 Firmware Settings for acceleration, steps, etc.

Step 4 – Measure Stepper Drivers’s Voltage

Measure the stepper drivers’ voltage when it’s powered on. Only connect your multi-meter negative lead to the main negative terminal and positive lead to each stepper driver potentiometer and record the voltage value. These will be used for future reference in tuning the external stepper drivers.

Step 7 – Install Stepper Drivers

Install stepper drivers onto the MKS Gen L board. Keep track of which stepper model you use, they may be needed for preparing the firmware.

Step 5 – Prepare MKS Gen L Firmware

Next we will be preparing Marlin 1.1.9 Firmware to be flashed onto the MKS Gen L board. Obviously, we will be including the configuration for the BLTouch and we are keeping the original Ender 3 display. Note: Since we are keeping our original display, we are going to lose the SD card functionality. To get this functionality back, replacing the Ender 3 original display with one that has a SD card.

  1. Download Marlin 1.1.9 release firmware from github.com. Direct link: https://github.com/MarlinFirmware/Marlin/releases/tag/1.1.9
  2. Extract files from the zip or tar.gz archive
  3. Copy files from Marlin Example Configurations/Creality/Ender-3 to Marlin Folder. Overwrite files that already exist.
  4. Within Configuration.h change the following:
    1. #define MOTHERBOARD BOARD_MELZI_CREALITY to #define MOTHERBOARD BOARD_MKS_GEN_L
    2. #define INVERT_X_DIR true to #define INVERT_X_DIR false
    3. #define INVERT_Y_DIR true to #define INVERT_Y_DIR false
    4. #define INVERT_Z_DIR false to #define INVERT_Z_DIR true
    5. #define INVERT_E0_DIR true to #define INVERT_E0_DIR false
    6. #define E0_AUTO_FAN_PIN -1 to #define E0_AUTO_FAN_PIN 7
  5. (Optional) BLTouch Configuration.h changes:
    1. //#define BLTOUCH to #define BLTOUCH
    2. //#define BLTOUCH_DELAY 375 to #define BLTOUCH_DELAY 375
    3. #define X_PROBE_OFFSET_FROM_EXTRUDER 10 to #define X_Probe_OFFSET_FROM_EXTRUDER -42
    4. #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 to #define Y_PROBE_OFFSET_FROM_EXTRUDER -5
    5. //#define AUTO_BED_LEVELING_BILINEAR to #define AUTO_BED_LEVELING_BILINEAR
    6. //#define Z_SAFE_HOMING to #define Z_SAFE_HOMING
  6. Install U8glib package under Sketch -> Libraries -> Manage Libraries
  7. Configure the stepper driver settings under Configuration.h. Search #define X_DRIVER_TYPE and change the options to match the same models used. A4988 is automatically assumed the stepper driver for all stepper locations.
  8. Try click on the check mark on the top left, this will compile the project and ensure no errors shows up on the bottom status window.

Step 6 – Flash Firmware

Connect the MKS Gen L board to the computer with Arduino IDE installed. Ensure under Tools -> Board is set to Mega 2560, Tools -> Processor is Mega 2560, and you’ve selected the proper port. Then click the button on the top left with an arrow pointing right.

Step 8 – Swap cases & boards

Warning: Turn off power and unplug power.

Unplug and unscrew everything from the Ender 3 board, by now each should be labeled to where they go. They should correspond with the labeling on the MKS Gen L board.

Note for the Ender 3 sensors, you may need to trim off the bottom left notch as shown above.

Step 10 – (Optional) Install BLTouch

I installed the BLTouch Mount for Ender 3 created by registerdthing https://www.thingiverse.com/thing:3003725 .

For plugging in the BLTouch, the 2 pin connector goes into the z min sensor with black to the middle pin and white to the S(signal) pin. The 3 pin one (brown, red, & orange pins) plugs into the last 3 pin socket as shown in this picture.

Step 9 – Adjust Stepper Drivers

Turn on the power and adjust the stepper driver potentiometers with an insulated screw driver and measure with a multimeter to get as close as you can get to the values you’ve written down under step 4. Essentially, the same as measuring in step 4.

Step 11 – Calibrate

With BLTouch, include G29 after G28 command in all GCODEs and adjust the bed corners to be within 0.1 mm or better of each other. Also, adjust the Z offset when Z axis is at 0 after G28 and G29 commands using https://nate15329.com/3d-printer-calibration/.

DDR4 RAM Latency

As a system builder, enthusiast, and gamer, we usually purchase for a new build is RAM (Random Access Memory). This RAM is used for fast temporary storage for your CPU (Central Processing Unit). RAM is similar to amount of desk’s top area. Persistence storage such as HDDs and SDDs are very slow to process data directly, plus they have a limited lifespan for reads and writes. These are like file cabinets. RAM is used between the CPU and the persistence storage, bringing faster application performance. We would want the fastest response RAM by looking at the lowest latency and including estimated cost per GB.

RAM is sold in terms of speed and CAS Latency. RAM speed is the built in clock cycles that refreshes the memory and is in terms of MHz or MT/s. CAS Latency is the delay time between memory controller asks for data and data is available on the RAMs output pins and usually is in nanoseconds.

Since RAM is sold with different speed and CAS Latency, the following formula will assist you on figuring out the relatively faster RAM as the 2 values determine the performance of the RAM.

Latency (ns) = Clock Cycle Time (ns) x CAS Latency (CL)

Latency (ns) = (1/Module Speed(MT/s) x 2) x CAS Latency (CL)

To find the higher performance RAM, look at the lowest CAS Latency and higher RAM speed to minimize the latency as much as possible. Shown below we calculated the latency. We’ve excluded some results due to not existing on the current market or only found very few results to provide an good average price per GB.

Officially, DDR4 memory limitation is set by JEDEC (https://www.jedec.org/) and the upper limit is at 3200 (MT/s) before needing to turn on XMP (Intel Extreme Memory Profile) in motherboard settings (BIOS/UEFI) to get the higher speeds on XMP Ready/Certified RAM. Some motherboards may not have this option to enable. Please refer to your motherboard specs/manual.

Module SpeedXMP Profile RequiredCAS LatencyLatency (ns)Est Price $/GB (6/2019)
4400Yes177.7320.937
4400Yes188.1819.749
3600Yes158.3316.281
4000Yes178.515.745
4400Yes198.6418.041
3200148.7511.149
3600Yes168.8912.292
4000Yes18911.619
3000149.338.923
3200159.389.895
3600Yes179.4410.635
4000Yes199.515.706
2666139.7511.697
300015108.61
320016108.932
3600Yes181010.754
3600Yes1910.566.484
30001610.677.868
24001310.836.906
26661511.257.023
30001711.335.577
24001411.676.454
266616126.582
21331312.196.242
24001512.57.432
21331413.139.76
24001613.335.82
21331514.067.466
24001714.177.164

The difference between the lowest and highest latency times are 7 nanoseconds apart. These differences might be noticeable, but very slightly.

As for our gamer audience, it is wiser to spend extra money on the GPU than on faster RAM. usually for gaming an individual computer only needs 8 to 16 GB depending on the game and near 10 ns in latency before getting higher prices.

Nate15329's Blog