How to Upgrade Marlin Firmware – A Complete Guide

Marlin Firmware Coding

With a simple firmware upgrade, you get an important safety net and additional features for free. This article is a step-by-step guide on using an Arduino UNO to burn a bootloader on your printer board and upgrade the Marlin firmware on your 3D printer. We will be using Creality Ender 3 for this tutorial, and you can also apply this same method on other compatible 3D printers.

What is Firmware?

Firmware is software that controls a piece of hardware. Marlin is the firmware used on most 3D printers and it’s based on a previous firmware called Sprinter. There have been several versions of Marlin released since its inception. Most manufacturers fork their firmware from the original Marlin firmware source code.

What is Forking?

Forking means when a developer takes a source code from one software package and starts independently developing it. This results in a separate piece of software for the target device. For example, Creality’s CR-10 and Ender 3 printers run a forked version of Marlin 1.1.6 firmware. Marlin 1.1.6 source code, modified to suit the printers, is the base for this firmware. This means that the forked firmware will no longer benefit from any additional features and safety updates found in later versions like Marlin1.1.7 and 1.1.9. Adding safety is the most crucial reason for updating firmware. Creality has made the Ender 3 completely open-source. Physical files and the version of Marlin firmware are now open to the public. If you browse through it, you’ll see that it’s out of date and doesn’t include essential safety features like Thermal runaway protection.

Why is Thermal runaway protection important?

Imagine the situation where on a long print, your thermistor and heater cartridge comes loose. The printer can’t register the temperature but keeps on pumping in voltage to the heater. This is a potential fire hazard. Thermal runaway protection aims to monitor this and shut things down if needed. The other reason to upgrade the firmware is to allow you to do more advanced modifications, like different hot ends with different thermistors, auto bed leveling with a BL-Touch module and Arc support. We’ll need a vital component called the Bootloader before we update the firmware.

What is a Bootloader?

A Bootloader is a small piece of firmware code that allows you to update the printer board firmware with your USB cable. It runs on your main board’s processor every time you start your 3D printer. If your 3D printer board doesn’t have a bootloader, and you try to upload the firmware using a USB cable, you’re going to get an error about it not syncing. Budget 3D printers use 8-bit boards, which have a limited amount of memory. This is why manufacturers do not ship boards with bootloaders pre-installed on low-cost 3D printers. The general idea is that if your printer has an 8-bit chip like ATmega1284p, you’re going to need a bootloader. You can directly download the latest firmware from Marlin’s official website, but that process requires a lot of technical know-how and prior preparations. Instead, you can use the TH3D Unified 1 firmware, which is very easy to work on and comes with the required libraries pre-installed. If you upgrade to this firmware, you’ll instantly get thermal runaway protection and easy support of more advanced upgrades.

Tools you’ll need:

  • A hex key (To remove the electronics cover) – 1x
  • Jumper wires (For UNO) – 1x Male to Female and 5x Female to Female
  • Arduino UNO (To burn the bootloader onto your board) – 1x
  • USB-A to USB-B connector cable (For UNO) – 1x
  • USB cable (Which connects to your printer) – 1x

Steps:

  1. Go to TH3D’s page for Unified 1 firmware (click here).
    Download link highlighted.
    Click on the highlighted link to download the .zip file.

     

  2. Download the full .zip file package.
  3. Unzip it and open the Windows Batch File, “OpenFirmwareWindows”. It’ll open up a specially prepared version of Arduino IDE.

    Windows batch file location.
    After unzipping, open this batch file.
  4. Select the “Configuration.h” tab, which contains all the custom code which we can modify. (NOTE: The next steps must be followed only if your printer does not have a bootloader. You can check online if your printer has a bootloader or not. Skip to step 15 otherwise.)

    Steps for burning a bootloader:

  5. Use the hex key to take the screws off the electronics cover of your 3D printer. Be aware that the fan is attached to the cover when you remove it, so take care when handling it.
  6. Plugin your UNO to the computer and place it near the motherboard so that the USB slot is facing the printer.
  7. Now in the Arduino IDE, go to File → Examples → 11.ArduinoISP → Select “ArduinoISP”. This opens a new IDE window, containing the ArduinoISP sketch.

    Steps to open an ArduinoISP sketch.
    Follow these steps to open an ArduinoISP sketch.
  8. In this window, Go to Tools→ Board → Select “Arduino UNO”. Because your UNO is plugged into the computer, there will be one COM port selected.
  9. Simply click the upload button on the IDE, and now your UNO is set up as a programmer.
  10. Connect the UNO to the motherboard using the jumper wires. Match the ISCP headers on UNO and the Printer board by using the 5x Female to Female jumpers. Use the 1x Male to Female jumper to connect the pin10 of UNO and the top right pin of the ISCP on the printer motherboard. Refer to these color-coded circles:

    Colour coded connections.
    A color-coded representation of the circuit connections. (Pic taken from Teaching tech’s video)
  11. After wiring up, in the ArduinoISP window, go to Tools → Boards → Select “Sanguino 1284p”. Below the board selector, make sure the processor is ATmega1284p (16MHz). In the same Tools menu, go to Programmer → Select “Arduino as ISP”.
  12. Finally, select “Burn Bootloader” in the Tools menu. A message will appear after some time saying “Done burning bootloader”.

    Burning bootloader.
    Brun the bootloader onto your Printer motherboard.
  13. Disconnect the UNO and remove all the wirings. You’ve successfully burned a bootloader onto your motherboard.
  14. Close the Arduino ISP window.

    Steps for flashing the firmware onto your 3D printer:

  15. Directly connect your 3D printer to your computer with a USB cable.
  16. Now, in the TH3D “configuration.h” tab, go to Tools → Programmer → Select “AVRISP mkII”.
  17. Check if the COM port is set up. Due to the direct connection to the printer, the COM port might be different.

    COM port selection.
    Make sure that any COM port is selected.
  18. Scroll down in the “configuration. h” file,  till you find your printer. Select the particular model by un-commenting that line. Just delete the “//” to un-comment. For example: For Ender 3, on the 366th line, un-comment  “//#define ENDER3” → “#define ENDER3”.
  19. Scroll down far enough till the 1020th line, or press Ctrl+F and search “Misc”. Here, you can change two notable things. As the new firmware flashes, it’ll change the loading screen on your printer. If you prefer something else, then uncomment, “//#define TM3D_BOOT” → “#define TM3D_BOOT”. You can also change the printer name. Un-comment “#define USER_PRINTER_NAME” and in the quotation marks next to it, type in your desired name.

    Boot screen settings.
    Various boot screen settings can be changed by Un-commenting.
  20. Finally, click the Upload button on the IDE. If it all goes well, it’ll show a message “Done uploading”. You’ve successfully updated your printer firmware.

For more information visit –Teaching Tech’s video guide.

Share on facebook
Share on twitter
Share on linkedin

3 Responses

Leave a Reply