Upgrade my 3D printer´s firmware was something I wasn't planning to do but one day, suddenly the printer stopped working. The symptoms were:
My first assumption was that since power was OK, the MCU died. I ordered a new board but was very upset with the amount of time I was going to wait until it arrive. Meanwhile I started searching on the internet for reports of similar issues and how they were solved. Looked after the MCU used and if I could replace it.
Found on my own board, the Melzi 2.0_v5 label and started looking after info related to this. Discovered that Melzi is open source hardware project and it's site is: https://reprap.org/wiki/Melzi (more info in https://github.com/reprappro/melzi).
From this site and lot of more research, I was able to make an attempt to flash a firmware on the board. The process was failing and this drove me think that the MCU was really damaged. Fortunately, I found the https://www.youtube.com/watch?v=wauNxu3TjyY youtube video talking about bricked firmware due to damages on bootloader and showing the exact same symptoms I was facing during flashing. This inspired me look after how to flash bootloader in order to give one more try on the firmware.
Flashed bootloader and was able to flash the firmware but nothing happened. I was expecting to at least get some signal on the display. After more research and testing, finally things started making sense and I was able to flash firmware and play with configuration to make it compatible to my printer.
This is for who want to upgrade the firmware due to any of the reasons below:
My 3D Printer is a Tronxy P802EA. "A", I guess, stands for auto leveling. There is Tronxy P802E also.
The board is a Melzi 2.0_v5. Open source project. Circuit and PCB layout may be found at https://reprap.org/wiki/Melzi.
Saw that it uses a ATMEGA 1284P MCU with 16Mhz crystal (http://ww1.microchip.com/downloads/en/DeviceDoc/doc8059.pdf). There is a board called Sanguino with this configuration so Arduino environment may be used to work with it.
Since Arduino is used, lets install it. This will be the application on computer's side used to flash the bootloader and later compile and flash the firmware:
Lets make sure everything is fine until now...
Melzi board uses an ATMEGA1284P with 16Mhz crystal clock. Like Arduino Uno, there is a open source board called Sanguino that uses this MCU. Here we will make Arduino IDE support this board.
Reference: http://dustsreprap.blogspot.com/2015/06/better-way-to-install-sanguino-in.html
This step is necessary only if a new MCU was added to the board or for an unknown reason, this code get corrupted. Run the blink application as described below first to validate your development environment. If things go wrong (like error on flash), maybe give a try here is the option.
* pin 1 MISO (Melzi) on pin 12 (Arduino)
* pin 2 5V (Melzi) on pin 5V (Arduino)
* pin 3 SCk (Melzi) on pin 13 (Arduino)
* pin 4 MOSI (Melzo) on pin 11 (Arduino)
* pin 5 Reset(Melzi) on pin 10 (Arduino)
* pin 6 GND (Melzi) on pin GND (Arduino)
Reference: https://www.arduino.cc/en/Tutorial/ArduinoISP
Reference: http://www.technoblogy.com/show?19OV
Before work with the firmware, lets run the Blink firmware on the Melzi board just to make sure the Arduino IDE is correctly communicating to the Melzi board and bootloader is working, so we are able to flash and run a program.
Unfortunately, I could not find the firmware for P802EA. After a lot of research, found the below repositories:
I also, tried to compile the above code but did not succeed. Maybe they are old for my current setup, I guess. So, idea was get the latest code and use the above only as reference during setup of latest firmware version to my printer model. Latest Marlin Firmware version is located at: http://marlinfw.org/. Current version is 1.1.9. Steps to download are:
Instruction on how to make firmware configuration, is located at: http://marlinfw.org/docs/configuration/configuration.html. It is recommended study this section and also comments from the configuration.h and configuration_adv.h. My approach was study the parameters and bring the ones as much as possible from P802M source codes above.
Steps to configure and flash the firmware are:
I had the problem discussed at https://github.com/MarlinFirmware/Marlin/issues/7155 and by applying the workaround suggested on the same, the issue was solved.
Great tip!
So, below is my firmware customized to P802EA:
Marlin-1.1.x.zip => This is the original Marlin-1.1.x.zip from marlinfw.org with Configuration.h and Configuration_adv.h customized to Tronxy P802EA.
Progress bar may be enabled by changing the below definitions on Configuration_adv.h:
I did this and the effect is very cool! See picture below: