Delta robots are cool, so I built a kossel mini. Unlike a cartesian printer, problems with a delta printer seem a lot less intuitive to track down, and a lot harder to identify since the problems seem like they can stack/combine in strange ways. In order to see what that I ended up writing a delta robot simulator.
- It is difficult to get the tower base positions correct
- It is difficult to get the towers to be parallel
- It is difficult to home accurately
- It is difficult to get the rods to be the correct (equal) length
Additionally, I wanted to find out what the symptoms of these problems should look like, and figure out tests to diagnose these problems so that they can be compensated (or at least tweaked). For example, on a cartesian printer there might be a problem with the X and Y axes being not perpendicular. The symptom in the print is that if you print huge L shape, the two ends of the L will not be perpendicular. You can measure the angle and compensate in software, or adjust the two axes until the two ends of the L are perpendicular.
To this end I decided to model a parallel delta robot, complete with G0 linear interpolation, and forward and reverse kinematics. I expect I will need G2/G3 circular interpolation as well. In order to see what happened if a machine was built wrong, my approach will be to:
- Simulate a perfect machine running a set of G codes
- Take the tower positions from the perfect machine and run it on a simulated “bad” machine
- Compare the trails
The model works! It has been possible to simulate tool paths with some pretty arbitrary tower rotations/arm lengths thanks to the flexible way the forward and reverse kinematics are modeled. A lot of kinematic models for deltas simplify things early on in order to get simpler solutions that are easier to implement on a microprocessor, like the model on the marlin delta firmware. Since this is running on a computer, and it is meant to model things that are not perfect, I did not make those assumptions. This means that I can actually generate tower positions for really weird geometries, and this model can create “tower codes” that could be used for machines with mis-matched arm lengths, or crooked towers. This might be a little smarter than having a tiny microcontroller generate the positions “on the fly”, but it could increase file size slightly.