Auto Skew Calibration for 3D Printers
Computer vision used to compute 3D printer’s skew for more accurate results.
No machine is perfect, and in the world of 3D printing, misalignment can result in poor prints. Although problems can manifest themselves in many ways – and what is considered poor varies from application to application – one potential cause of frustration is skew, when a printed square's sides aren't at perfect 90º angles.
In other words, skew is when you try to print a square, but get a parallelogram. You could physically adjust your printer ad infinitum, but YouTuber “Not invented here" has a different solution using a camera, OpenCV, and Klipper printer firmware.
The setup adds a small endoscope camera to the print head, which scans along a specially printed ChArUCo pattern – like a chess board with AR symbols – that covers the bed. It records movement results and calculates the differences in the expected and actual print head positions with respect to the bed.
The system then generates commands to be be input into the Klipper console, a popular Linux-based 3D printer firmware package that runs externally to the printer (e.g. on a Raspberry Pi) and allows for advanced functionality. While this sort of calibration could be done manually by printing out a cube and measuring it with calipers, this camera-based procedure should be easier and more accurate.
So if you’d like your prints to turn out better, and especially if you’re already running Klipper, Not invented here’s procedure looks like it’s worth a try. Notably, the same concept should work with CNC routers, laser cutters, and other such automatic tools, though it would likely require some adaptation. More info is available on GitHub and in the video below.