Upgrading Firmware in an Ender 5

I have wanted a 3d printer for many years. I've looked at the technology many times over the last 5 or so years but it has always been a bit more than I wanted to spend. Over the last year that has changes and this month, I finally took the plunge and purchased an Ender 5 by Creality. With a build volume of 220 x 220 x 300 mm it is one of the larger printers that can be had for under $500.

First a note. I embarked on the process of upgrading the firmware because I was having the printer randomly shut down and reboot, making the printing process less than fun. I thought there might be something in the stock firmware that was causing this. As it turns out, however, it was actually caused by the unit being set to the incorrect voltage setting. Apparently it comes from the factory set for 230V, not the 115V that is needed here in the US. So, if you live in North America, first thing you need to do is look at the recessed switch right next to the power cord and make sure it is set correctly!

Now, on to the process of flashing the firmware. Interestingly, I found very little that was actually written on the process. The best information I found was from the following YouTube video:

However, since I am not a particular fan of the video format, I thought I would put up my experience and process in text format.


First the list of prerequisites.

Installing the Arduino IDE

Since I am using a Debian based distro, my first thought was to use apt to install the Arduino IDE. Unfortunately, that was a bad idea. The version in the repositories was hopelessly outdated. So I headed to the Arduino website and downloaded the latest version of the IDE (1.8.12 at the time of this writing). Install is relatively simple from a terminal:

cd ~/Downloads
tar -xf arduino-1.8.12-linux64.tar.xz
cd arduino-1.8.12
sudo ./install.sh

You will need to either log out/log in or restart after this process completes. In order to get access to the USB port for programming the Uno your user needs to be added to a new group and these permissions won't take effect until you log out and back in.

Configure the IDE

Next, start the Arduino IDE. There are a couple of addons that need to be installed for this process to work.

  • Go to File -> Preferences and, in the blank for Additional Board Manager URLs, paste the following: https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json

  • Go to Tools -> Board -> Board Manager, search for and install Sanguino (this is the board definition for the controller in the Ender 5)

  • Go to Sketch -> Inclue Library -> Library Manager, search for and install u8glib (this is the library for the default Ender 5 LCD screen)

Prepare the Uno

Next, plug the Uno into one of your PC's USB ports, choose File -> Examples -> ArduinoISP. Verify that, under the Tools menu, the board is set to Arduino Uno, port is set to your USB port (should be auto-detected, if not Google is your friend), and programmer is set to AVRISP mkII. Hit the Upload button and wait for confirmation that the upload is successful. Disconnect the Arduino for now.

Prepare the Firmware

Unzip the Marlin firmware (I used version and copy the example config for the Ender 5 to Marlin-2.0.x.zip\Marlin-2.0.x\Marlin\, overwriting both Configuration.h and Configuration_adv.h. Open the Marlin.ino file in the Arduino IDE. Under the Tools menu, set the board to Sanguino, processor to ATMega1284 or ATmega1284P (16 Mhz) and the programmer to Arduino as ISP. Under the Sketch menu, include the library U8glib. Now click the button for Verify. If all goes well, after a minute or two, you will be notified that the firmware compiled correctly.

Flash the Bootloader

To start the process of upgrading the firmware, it is necessary to access the Ender 5's main controller board. Put the printer on its back (z-axis screw resting on the table) and remove the bottom pannel. Be careful as there is a fan directly over the controller board that is connected both to the board and to the panel. You will need to unplug this from the controller board to fully remove the panel.

Once the panel is removed, you should see the ICSP port header (two rows of three pins) just to the right of the USB port. If you hold the Uno with the USB port facing you, you will see a similar 6 pin header on the far side of the board. Using the jumper cables, connect the top three pins to each other (far right to far right, middle to middle, and left to left). On the bottom row, connect the far left pins and the middle pins. The far right pin should be connected to Pin 10 on the Uno board, NOT to the ISP header.

You can now reconnect the Uno to your computer. If you followed the directions above on prepairing the Marlin firmware, you should be able to go to the Tools menu and select Burn Bootloader. If all goes well, in a few seconds you will be informed that the process completed successfully. If it did not, double check your settings in the Arduino IDE. Once the process is successful, you can disconnect the Uno both from the computer and from the Ender control board. Replace the bottom cover on the Ender 5, remembering to reconnect the control board fan.

At this point, when you turn your Ender on, you will see a blank, but lit, LCD screen. This is normal as the process of flashing the bootloader removed all firmware from the control board.

Flash the Firmware

Now, connect your computer to the USB port on the Ender 5. In the Arduino IDE, change the programmer (under the Tools menu) back to AVRISP mkII. Double check that the port has been updated to the correct USB port, and hit the Upload button. In 30-60 sec, you should have a message saying that the upload was completed and verified. You can now disconnect your computer. When you turn the Ender 5 on, you should see the standard splash screen on the display followed by a splash screen stating the version of Marlin that is installed, followed by the status screen.

One additional note is that you may see an error about the EEPROM on the status screen. EEPROM is where the control board stores settings. It would appear that the stock firmware and Marlin use different configuration formats, so you will have to go into the menu and reset the EEPROM (Control -> Init EEPROM). Any preset you had saved to the machine will have to be remade.

At this point, if you ever want to update the firmware again, you only have to compile the firmware in the Arduino IDE, connect your PC to the USB port, and upload the firmware using the AVRISP mkII programmer.


Comments powered by Disqus