1. About
  2. Features
  3. Explore

I have read a few times1 that the Arduino Mega can struggle to perform the tasks required for 3D printer control, as the AVR chip is working at its limits, and this is why some manufacturers have moved away from the ATmega2560, to make custom (and integrated) controller boards using ARM processors.

Having just seen the latest answer to this question, Multithreading with the Arduino, on the Arduino SE site, I wondered if anyone had used a Shield Buddy in conjunction with the standard RAMPS 1.4 board?

Shield Buddy

It is pin for pin compatible with the Arduino Mega (and Arduino IDE compatible - once the appropriate add-ons have been installed), but it has a much faster three core processor. Obviously only one core would be used, leaving the other two idling, but even so the performance is apparently much better.

See Bringing Multicore To The Arduino World With ShieldBuddy TC275.

If anyone has experience of using this board, I would like to know whether it was successful or not? I don't see why it should not, although the Marlin firmware would need recompiling, for the Aurix TC275 processor. Would any improvement be seen? Is it worth paying the high price tag of £89?


1 One of the places was 3D Printering: Electronics boards:

While they work for what they’re intended to do, there are a few limitations. Arcs and circles are a little weird to program, and using these boards for something other than a cartesian 3D printer – a CNC machine, or a laser cutter, for example – is a bit out of the ordinary.

1 Answer 1

It's not quite as simple as you would suggest.

You can't just recompile Marlin for another device. You'd need to rewrite large parts of it. It may be compatible with the Arduino IDE, but that doesn't mean you can just run firmware intended for the AtMega2560 on it. All the timings (e.g. those of the pulses sent to the stepper motors) would be off, if you managed to get it to compile at all.

As some examples, here are some pieces of code from Marlin that would be broken, as they're written directly in AVR assembly:

#define DELAY_1_NOP __asm__("nop\n\t") #define DELAY_2_NOP __asm__("nop\n\t" "nop\n\t") [...] // ensure 100ns delay - a bit extra is fine asm("nop");//50ns on 20Mhz, 62.5ns on 16Mhz asm("nop");//50ns on 20Mhz, 62.5ns on 16Mhz [...] #define MultiU24X32toH16(intRes, longIn1, longIn2) \ asm volatile ( \ "clr r26 \n\t" \ "mul %A1, %B2 \n\t" \ "mov r27, r1 \n\t" \ "mul %B1, %C2 \n\t" \ "movw %A0, r0 \n\t" \ "mul %C1, %C2 \n\t" \ "add %B0, r0 \n\t" \ "mul %C1, %B2 \n\t" \ "add %A0, r0 \n\t" \ "adc %B0, r1 \n\t" \