← Back
Home › Systems › Embedded and IoT

printer-firmware

3D printer motion firmware

Klipper, Marlin

SystemTechniques · 5Primitives · 27 printer-firmware Clock synchronizationdistributed · medium: Estimate a clock's offset from four timestamps, filter out queueing noise, and steer the clock smoothly; NTP gets about a millisecond, PTP with hardware timestamps under a microsecond.›Input shapingrobotics · medium: Shape motion commands (ZV, MZV, EI) to cancel mechanical resonancesInverse kinematicsrobotics · medium: CCD/FABRIK/Jacobian solvers posing joint chains to reach targetsLook ahead junction planningrobotics · medium: Plan velocities across queued moves so corners keep speed within acceleration limitsLevenberg marquardtnumerics · medium: Damped Gauss-Newton nonlinear least squares for model calibrationPID controllerrobotics · low: Drive a measured value to a setpoint with three terms on the error: proportional, integral, derivative. The default feedback loop for motors, heaters, drones and gimbals.›Fast Fourier transformnumerics · low: Computes the DFT in O(n log n) by recursively splitting into even and odd halves; the basis of fast convolution and spectral methods.›SPSC ring bufferdata-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.›G code parsingrobotics · low: Streaming G-code tokenizer/parser into motion and machine commands with modal stateVelocity motion profilesrobotics · low: Trapezoidal and S-curve (jerk-limited) velocity profiles for point-to-point movesWatchdog timerembedded · low: A hardware down-counter that resets the chip unless software proves, in time and in a plausible pattern, that it is still healthy.›CRC32C checksumshardware-os · low: The Castagnoli CRC-32 with dedicated instructions on x86 (SSE4.2) and ARMv8. It is the standard fast integrity check for storage blocks, logs and network frames.›Interrupt handlinghardware-os · low: How a device signal reaches a CPU handler through an interrupt controller and vector table, and how top/bottom halves, polling switch-over and coalescing keep load bounded.›Length-prefix framingnetworking · low: Split a byte stream (TCP, TLS, pipes) into messages by writing each message's length before it; O(1) boundary detection with no escaping.›Spline interpolationnumerics · low: Linear, bilinear/trilinear and cubic spline interpolation on grids and tablesStep pulse schedulingrobotics · low: Timer-scheduled stepper pulses (DDA/Bresenham, precomputed step times) synchronized across axesPhase-locked loop (digital)signal-processing · low: Feedback loop that locks a local oscillator to the phase and frequency of an input tone; the core of carrier recovery, clock recovery and GNSS tracking.›Robust statisticsstatistics · low: Location and scale estimates (median, MAD, trimmed mean, Huber M-estimator) that stay correct when a minority of the data is garbage.›IIR and FIR filterssignal-processing · low: Two ways to shape a sampled signal's spectrum: FIR (finite taps, always stable, exact linear phase) or IIR (feedback, a few coefficients, cheap but phase-distorting).›Quaternion rotationsgeometry · low: Unit quaternions as 3D rotations: 4 floats, cheap composition, no gimbal lock, plus the conversions, interpolation choices and numerical care needed in practice.›PCA and SVDmachine-learning · low: Find orthogonal directions of maximum variance by an SVD of the centred data; randomized SVD gets the top k components in a few passes.›+ 11 more primitives

Similar systems

Share the most building blocks with this one.