Features

Features

Advanced Corner Blending

Prunt is capable of blending corners using Pythagorean-Hodograph splines with G⁴ continuity. This has multiple benefits:

  • Improved print quality: Common print defects such as surface irregularities, resonance artifacts like ringing, and overshooting at corners are greatly reduced.
  • Reduced mechanical stress: The elimination of instantaneous changes in acceleration, jerk, and snap commanded by the motion planner reduces the stress placed on belts and bearings, likely resulting in longer service life.
  • Better high-speed performance: Blended corners that better model the real motion of the printer allow for higher performance tuning of parameters.
  • Enhanced pressure advance: Pressure advance reduces the continuity of extruder motion profile by one level, which usually means that smoothing is required. With the combination of Prunt’s G⁴ paths and motion profiles, no smoothing is required if the pressure advance time is low enough to not cause excessive load.

G⁴ Continuity

Prunt uses a corner blending algorithm that results in paths with G⁴ continuity, whereas most other 3D printer only supports G¹ path continuity and only with external processing of the g-code before printing. Continuity refers to how smooth a path is as it transitions between different segments. In the context of 3D printers, continuity impacts how smooth the motion is as the print head moves through corners and changes direction. The various levels of continuity are defined as follows:

  • G⁰ continuity: A path with G⁰ continuity is one where segments are connected; there is no gap between the endpoints of two consecutive segments. However, there can be sharp changes in direction at the corners.
  • G¹ continuity: In addition to being connected at the endpoints (G⁰), G¹ paths have a first derivative that is also continuous. G¹ continuity implies that the velocity vector does not change abruptly between segments. G¹ continuity is most commonly achieved by replacing sharp corners with circular arc segments tangent to the two lines that form the corner. G¹ continuity results in smoother transitions at the corners but does not eliminate sudden changes in acceleration, which can still affect print quality.
  • G² continuity: Paths with G² continuity have continuous second derivatives, meaning that the acceleration is continuous across transitions between segments, providing much smoother motion through corners.
  • G³ continuity: In addition to the previous constraints, G³ paths have continuous third derivatives, meaning that jerk (the rate of change of acceleration) is continuous. Improvements to print quality at this point are minor. However, the extra computational cost is minor so Prunt provides this and the next level of continuity despite that.
  • G⁴ continuity: In addition to the previous constraints, G⁴ paths have continuous fourth derivatives, meaning that snap (the rate of change of jerk) is continuous. As with G³ continuity, improvements to print quality are minor. Using G⁴ continuity also allows for pressure advance profiles to have G³ continuity without smoothing.

The below two images show a comparison of circular arc blending as generated by slicers and post-processing tools and the G⁴ blending used by Prunt. The X and Y axis values are shown in red and green.

  • Circular arc blending:

  • Prunt corner blending:

Adjustable Corner Deviation

In addition to blending corners, Prunt also allows for precise control over the maximum deviation of the blended path from the original path. This value can be changed in g-code during a print to control how sharp any given corner will be.

Advanced Motion Profiles

Prunt generates 31-phase motion profiles with G⁴ tangential continuity with individually adjustable velocity, acceleration, jerk, snap, and crackle limits. Most other popular 3D printer motion controllers only support up to G¹ (3-phase trapezoidal) or G² (7-phase s-curve) motion profiles.

These profiles take into account the curvature of blended corners and limit the axial acceleration, jerk, snap, and crackle accordingly. Prunt allows the user to define the tangential limits and allows the axial values to reach approximately double these except on very small corners where the values may be further exceeded. This decision was made so that parameters in Prunt result in print times similar to other motion controllers.

Below is an example of the acceleration stage (first 15 phases) of a Prunt motion profile:

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.

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.

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. Below is an excerpt of the GUI:

StatusConfig EditorG-Code ConsoleRun FileLogPruntSteppersKinematicsInput SwitchesHomingExtruderThermistorsHeatersBed MeshFansG-Code AssignmentLower Position Limit:X_AXIS (mm):-8E+307Y_AXIS (mm):-8E+307Z_AXIS (mm):-8E+307E_AXIS (mm):-8E+307Minimum position that the printer may move to. The E axis may be set to -8E+307 for effectively infinite range.Upper Position Limit:X_AXIS (mm):8E+307Y_AXIS (mm):8E+307Z_AXIS (mm):8E+307E_AXIS (mm):8E+307Maximum position that the printer may move to. The E axis may be set to 8E+307 for effectively infinite range.Max Feedrate (mm/s):1000.0Maximum tangential feedrate. Feedrates higher than this value will be clipped. Unlike axial limits, this limit is strictly enforced and scales with the axial scaler. This always includes all axes. Most users will want to set this to a high value and rely on axial limits instead.Max Acceleration (mm/s^2):200.0May safely be set to 8E+307 for effectively infinite acceleration (to the extent allowed by other constraints). Axial values will go above this value when corner blending is enabled.Max Jerk (mm/s^3):4000.0May safely be set to 8E+307 for effectively infinite jerk (to the extent allowed by other constraints). Axial values will go above this value when corner blending is enabled.Max Snap (mm/s^4):150000.0May safely be set to 8E+307 for effectively infinite snap (to the extent allowed by other constraints). Axial values will go above this value when corner blending is enabled.Max Crackle (mm/s^5):10000000.0May safely be set to 8E+307 for effectively infinite crackle (to the extent allowed by other constraints). Axial values will go above this value when corner blending is enabled.Axial Velocity Maxes:X_AXIS (mm/s):50.0Y_AXIS (mm/s):500.0Z_AXIS (mm/s):50.0E_AXIS (mm/s):50.0Maximum axial velocities. Applied to unscaled positions. Feedrates that result in axial velocities higher than these values will be clipped. These limits are not strictly enforced, especially in blended corners, however with reasonable parameters they will not be exceeded by a significant amount.Ignore E In XYZE:Ignore the E axis component of the commanded feedrate unless it is the only axis involved in a move. This behaviour is the default in some other 3D printer motion controllers. The axial velocity limit on the E axis still applies. The tangential feedrate limit in the settings always applies to all axes.Shift Blended Corners:When blending corners, shift the virtual corners so that the curve intersects the original corner. Corners that are too close to the edges of the work area will never be shifted.Pressure Advance Time (s):0.01The E axis velocity is multiplied by this value and then added to the E axis position.Max Chord Error (mm):0.2Maximum distance that the path may deviate from the commanded path. Setting this very high may cause axial velocity limits to be exceeded.Axial Scaler:X_AXIS:1.0Y_AXIS:1.0Z_AXIS:1.0E_AXIS:1.0Inside the motion planner, all positions are divided by this value before applying motion profile limits, allowing for different limits on different axes. You do not need to take this value in to account when setting position limits, mm per step values, axial velocity limits, or when setting the feedrate in g-code. Corner deviation and tangential feedrate, acceleration, etc. is based on scaled positions, so a tangential acceleration of 10mm/s^2 and a scaler of 0.5 will set the axial limit to 5mm/s^2.

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 (libc and libm). 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.