Features
Built-in GUI
Prunt contains a GUI for controlling the printer and editing all settings. This eliminates the need to edit configuration files by hand.
G⁴ Motion profiles
Most popular 3D printer motion controllers (Klipper, Marlin, and RepRapFirmware) only support up to 3-phase G¹ tangential motion profiles, meaning a trapezoidal velocity curve where acceleration is always either zero or the maximum allowed acceleration. This is a problem because an object in the real world simply can not instantly change its acceleration and trying to do make the motors in a 3D printer do so results in vibrations which introduce ringing artefacts in to prints and cause additional wear on components. Some commercial or more obscure open-source motion controllers address this by making the acceleration trapezoidal rather than rectangular, resulting in a 7-phase “s-curve” velocity profile, but even here what we have is still not a motion that is physically possible, just a motion that is much closer to being so. Prunt goes another 2 steps beyond this by making the 4th derivative of acceleration in to a rectangular wave, resulting in a 31-phase velocity profile with significantly smoother motion.
To help visualise this, we have plotted velocity and its first 4 derivatives for 3-phase, 7-phase, and 31-phase profiles. All of these were recorded from Prunt’s simulator, as Prunt allows for setting axial limits for each derivative individually, allowing for emulation of other motion controllers by just changing a few parameters in the GUI.
Try it yourself: every limit can be changed independently in the GUI, and the profile below follows the same rules as Prunt’s planner.
Advanced Corner Blending
If you are familiar with some of the more advanced configuration options in Klipper and Marlin then you may be aware that both go through corners at a non-zero tangential velocity to reduce print times as stopping at every corner would be very slow. This means that a short period of infinite axial acceleration is introduced at every corner, rendering our very smooth tangential velocities very useless. A solution to this problem that may seem obvious is to just turn the corners in to arcs. Most slicers have added an option to do that over the last few years. This prevents the infinite axial acceleration, but it could be better if we could also limit the axial jerk, snap, and crackle.
This is a problem that can be solved and we have solved it in Prunt with a curve whose direction is built from an inverse stereographic projection, which matches position and its first four derivatives at each end of the corner. It is also notable that our corner blending is built directly in to our control system so there is no need to make use of a special slicer. We will avoid going in to the technical details here and will instead show all three corners side by side: a sharp corner as in Klipper and Marlin, an arc, and Prunt’s curve, all recorded from Prunt’s simulator, which can produce each of them. The first plot shows the paths themselves and the second shows the X axis through each corner at a constant 10 mm/s, where the sharp corner changes velocity instantly, the arc changes acceleration instantly, and Prunt’s corner keeps every derivative bounded.
Drag along the corner below to see what each corner type asks of the machine at every point.
In addition to blending corners, Prunt also allows for precise control over the maximum deviation of the blended path from the original path. The deviation is set per axis in the GUI (0.1 mm by default), along with how far the curve may miss the commanded corner point.
Extrusion through corners
A blended corner is shorter than the sharp corner it replaces, so Prunt reduces the extrusion to match the shorter path.
Flow Normalisation
Slicers round coordinates when they output them to a g-code file, so a series of segments that should have one flow rate often has many different flow rates when the motion controller goes to execute it. This can theoretically cause minor print defects as well as put extra (but admittedly minor) load on components. Prunt automatically looks ahead in the file and normalises extrusion density when the difference is small enough to be explained by rounding in the slicer. When testing this with a Benchy we found that this reduces changes in flow rate from 43,831 to just 739.
Pressure Advance
Prunt supports pressure advance in the same way as other motion controllers. The G⁴ continuity of Prunt motion profiles means that pressure advance without smoothing does not generate instantaneous changes in velocity, acceleration, or jerk.
Smart Plug Power Control
Prunt can switch the printer’s power through Tasmota or Shelly smart plugs. When doing this, it uses the plug’s own countdown timer as a dead-man switch, meaning that if Prunt crashes for some reason the printer can not be left in an unsafe state, although Prunt’s own safety mechanisms should already stop this. In addition to this, and perhaps more importantly, it gives Prunt a way to turn off the printer in case of a catastrophic hardware failure. This feature can also be used to cut power completely at the end of a print for power savings.
Safer and Faster Homing
Instead of setting a homing speed, Prunt allows the user to specify the maximum distance that the axis is allowed to move after the homing switch is hit. This parameter is used to compute the maximum velocity under the given kinematic constraints, leading to homing being as fast as possible while also never moving past the maximum allowed travel distance of the switch.
Hardware Acceleration
Klipper and Marlin both entirely rely on software to generate step signals at appropriate times. This works but it introduces jitter in to the signals as the software is also trying to do many other things, it’s also one cause of the “timer too close” errors in Klipper that you can find hundreds of reports of with a web search and may have even experienced yourself. Prunt 3D hardware does better than Klipper or Marlin by offloading all step generation to hardware timers which generate step and direction signals continuously, even when the MCU is busy with other tasks such as controlling heaters or communicating with the host. Aside from being more precise, this usage of hardware timers also makes our hardware more reliable as the CPU load does not change based on the step rate. Other inputs and outputs, including heaters, fan PWM outputs, fan tachometer inputs, and thermistor inputs are all also offloaded to hardware, allowing for high output or sampling rates without ever causing extra CPU load.
Vendor Supplied Pin Mappings
Prunt allows the vendor of a board to handle pin mappings. This eliminates the need to look up what MCU pins are connected to and instead allows the user to directly use the names printed on the board.
Automatic Firmware Upgrades
Prunt provides the capability for board vendors to perform upgrades at startup after confirmation from the user, without the need to install a jumper on the board. This feature is available on all official Prunt hardware.
Single Portable Executable
Prunt allows for the creation of a single executable with minimal dependencies. The user does not need to worry about having a specific Python environment or similar. This executable contains the web server and it is possible for a hardware vendor to include firmware update files within the executable, which all official Prunt hardware does.
Multi-Threading
Prunt makes use of multiple threads and allows tasks to be assigned to specific CPUs. Notably, the step generation task is carefully designed to never stall during motion to increase reliability:
- The printer will always have events queued to come to a complete stop before the step generator task performs any potentially blocking operations.
- All computations performed within the step generation loop take approximately constant time.
- Position targets are generated at fixed time deltas, and actual step generation is offloaded to hardware.
All other tasks may be stopped for long periods of time without causing any errors.
High-Level API for Hardware Vendors
Prunt provides a high-level API for implementing new devices. This API makes no assumptions about the types of motors used, the communication protocol, or the communication latency, allowing unconventional hardware to easily use Prunt.