Skip to content

5. Research: Firmware

1. Reserch of 3D printer and CNC firmwares

Content in this page was summarized or generated by ChatGPT, based on following sources.

Prompt A: Please summarize the following articles and tell me which firmware is suitable for beginners to develop a 3D printer from scratch.
Prompt B: How can I modify the firmware depending on a specific hardware such as motor specifications, gear ratio etc.?
Prompt C: Make a detailed comparison table between Marlin and Klipper.

A. 3D Printer and CNC Firmware Overview

3D printer firmware is software that translates G-code from a slicer into electrical signals, controlling the printer's movements and functions. Popular firmware includes RepRap, Repetier, Marlin, and Klipper. Marlin is the most widely used, followed by Klipper.

Marlin, developed in 2011 by Erik van der Zalm for UltiMaker, was designed for affordable 8-bit Arduino microcontrollers. Klipper, on the other hand, leverages more powerful devices like Raspberry Pi for precise control.

B. Modifying Firmware for Specific Hardware

To tailor firmware for specific hardware components such as motors, gear ratios, and sensors, users adjust configuration files and, in some cases, recompile the firmware.

Modifying Marlin Firmware:

  1. Edit Configuration.h for primary settings (printer size, motor specs).
  2. Adjust Configuration_adv.h for advanced features (motor currents, sensors).
  3. Compile and flash the firmware using tools like PlatformIO in VSCode.

Modifying Klipper Firmware:

  1. Edit printer.cfg, a simple text file, to define motor specs, gear ratios, and sensors.
  2. No recompilation needed; changes apply after rebooting Klipper.
  3. Use the web interface (Mainsail/Fluidd) for restarting Klipper.

C. Comparison of Marlin, Klipper and grblHAL Firmware

Feature Marlin Klipper grblHAL
Architecture Runs on 8/32-bit microcontrollers (C++) Splits control: microcontroller (C) + Raspberry Pi (Python) Modular HAL-based system for 32-bit MCUs (C)
G-code Processing On printer's board On Raspberry Pi (via Klippy) On the microcontroller, highly optimized
Configuration Edit & recompile .h files Edit printer.cfg, no recompilation Edit config files; no recompile needed for many changes
Installation Flash via USB/SD, often with PlatformIO Flash MCU + install on Raspberry Pi Flash MCU, sometimes needs a custom uploader
Ease of Use Beginner-friendly, well-documented Intermediate difficulty; very flexible Advanced users; command-line tools, some GUI support
Add-on Integration OctoPrint-compatible Works best with Mainsail/Fluidd via Moonraker API Supports many interfaces; WebUI, SD, Ethernet, USB
Motion Control Stable, Linear Advance, basic Input Shaping Advanced Input Shaping, Pressure Advance Precise motion control, real-time planner, high speed
Community Support Large, well-established, strong beginner help Smaller but growing, strong technical community Smaller, focused on CNC and robotics
Updates Frequent updates, stable releases and nightlies GitHub updates, auto-updates via UI Actively maintained, modular plugin-based updates
Best For Beginners, stable 3D printer builds Advanced users, performance-focused setups CNCs, robotic systems, real-time motion applications

2. Triage

After the triage during system integration week, I decided not to use firmware designed for 3D printing, as that functionality isn’t needed. Other CNC firmware, like grblHAL, might be usable, but it would still require additional code to control the mecanum wheels. But this research could be useful for future upgrades if more advanced G-code translation becomes necessary.