Echinus goes Marlin


For our BetaPrusaV2 3D printers we use the Marlin firmware on the RAMPS electronics and the BAM&DICE board to interpret and execute the gcode for printing. The Marlin Firmware is pretty advanced, has many, many features and very good acceleration control, which takes the maximum velocity, the maximum acceleration and the maximum allowable jerk into account. This allows the 3D printer to run at very high speeds with still very good results.

With our Echinus Board and the Printupy 3D printer,  we currently use a modified Teacup firmware. This firmware is very efficient, as it is coded in pure C, and with our modifications, it is fully configurable without recompiling the firmware. You can even change which motor controls which axis, via the menu or via a comfortable configuration tool. Unfavourable the printing results of this modified Teacup are never as good as the ones of the Marlin firmware. We tried to incorporate a similar acceleration code with jerk handling, but we could not get it to run as smooth as the Marlin software on our BetaPrusaV2 3D printers.

So we decided we would try to port the Marlin firmware to the Echinus Hardware. At first we though it will be pretty complicated, as the Marlin Firmware is Arduino based, and the main chip in the Echinus is an Atmega128 which is not supported in the Arduino IDE. Luckily we found that someone developed Atmega128 based board and made an Arduino-Addon for this.

Based on this, we created our own Arduino-Addon for the Echinus Board. So that all Arduino code can run on this board without much changes. Unfortunately there are some limitations. One of those limitations is, that the timing for some sleep functions is not entirely correct, as the Arduino code can only handle even CPU frequencies, but the Echinus Board runs with 14745600 hertz.

The other limitation is, that the current bootloader on the Echinus board does not work with the way the Arduino IDE downloads sketches. The Arduino IDE always adds "-D" (do not erase flash) to the avrdude command, which causes the compare after the flashing to fail. If someone knows a way around this, please tell us.

To work around this, you can enable the verbose output for compiling in the preferences, and pick up the generated *.hex file from the directory mentioned in the output and then upload the *.hex file manually with the Echinus_Flash tool, or directly with avrdude.

With this basis it was relatively easy to port the Marlin firmware to the Echinus Board. The main modifications we had to do was integrating the I²C based port extender to control the six stepper drivers, adapting the display code to read the buttons on the echinus vision, reducing the memory footprint so it fits into the ram of the Atmega128 and adding support for the second fan on the Echinus board. We also extended the existing DualX code of the Marlin so it is fully configurable via the display and works with our Printupy DualX printer.

Now the Marlin firmware works pretty nicely on the Echinus board and is currently in testing on our Printupy Single and Printupy DualX printers. The printer can now run much faster and smoother and the print results are excellent. The only limitation currently present is, that due to memory limitations, no folders on the sd-card are supported. 

echinus marlin

If you want to check it out yourself, you can find the code in github. To install it, copy the ArduinoAddons/Arduino_1.x.x/hardware/echinus directory to you Arduino/hardware/arduino directory. Open the marlin.ino file in the Arduino IDE, switch to the newly added Echinus Board under Tools->Board and compile it. Then locate the generated Marlin.cpp.hex file in the output directory and flash it to the Echinus Board with the Echinus_Flash tool or with the avrdude tool.

We are now working on testing this new firmware and updating our Printupy documentation. We will release the new firmware for the Printupy 3D printers in the next weeks.