02 January 2024

Repetier firmware on RepRap with Gen 7 electronics

Getting new firmware on an old printer is not that easy, especially when one assumes that new tools are backward compatible. With multiple possible points of failure it becomes a game of cat and mouse to figure out which one works with another.

The right Arduino

My Gen 7 electronics uses an Arduino ATmega 1284P PU 1211 with a 20.000 MHz clock. Thought it seems tempting to use newer Arduino IDE's for updates, things get interesting when we want to use old Gen 7 board support files. Newer Arduino IDE's do not have a straightforward way of manually adding custom boards. Or perhaps they do, but that would require me to write the whole custom board support. At some point I was actually tempted to do that, but first decided to test older IDE's. That was a good call.

Arduino 1.0.3 IDE worked.  You can get it from official Arduino's old releases repo. While it does not have many awesome new features, it shines in one bit way: you can add custom boards just by dropping the configs in ./hardware/ folder, which I did.

The right Gen 7 board support

The right Gen 7 support is the latest one, that is Gen7 Arduino IDE Support 2.1. which is still hosted on RepRap's wiki. 

The right Repetier firmware

Of course the newest ones did not work... But by trial and error I figured out that the working version was Repetier 0.91, which you can configure and then download from https://www.repetier.com/firmware/v091/

There was a small caveat - the old C++ compilers that come with Arduino 1.0.3 IDE do not recognize the rounding function lroundf() which converts floats (fractional numbers) to long integers (non-fractional numbers). I could mess with getting the right C++ compiler, but it was easier for me to edit the code and just map the float type to long. Yes, I loose some precision since this just drops all the fraction and does not round up, but It was faster that fighting with the compiler and the possible precision loss seems minimal.

The final product

After a couple of days (if not weeks) I had my "new" firmware uploaded and working on the printer. The pronterface was able to communicate with it, the Cura slices with Repetier's flavor were properly read, so we were ready to print.
For reference (and safekeeping), I hosted on Github the config files, gen 7 and Repetier stuff.

No comments:

Post a Comment