This topic came up in another thread, and don't want to drag it into too much of a tangent. So probably better to give the topic of PnP self-calibration its own topic. Mainly because there are some advantages that a PnP can offer in calibration that a 3D printer may not have available. That and it's a different set of calibration priorities.
When it comes to calibration on a pick and place, even the commercial machines drift, and all the ones I've used have a "Place And Self Measure" systems for calibration.
Even with integrated linear encoders it's just the nature of things, they're going to drift. Sometimes it's because you bumped a sensor, sometimes a screw vibrated loose, sometimes it's a gear or ballscrew that's worn.
Yes the precision machining can limit that amount of drift, but it's still going to happen.
Small component calibration uses a solid color PCB, typically white, with only fiducials on it. No traces or pads. Parts (0603's for instance) are placed in a fixed pattern, usually at 0, 90, 180, 270 rotation, on double sided tape or spray adhesive. Then it goes back with the downward facing camera and compares the ACTUAL placement location to where it THOUGHT it placed them. Bam, there's your offsets for X/Y/Q.
It does consume parts and you need that calibration PCB, but it is very effective for smaller parts. You just need to make sure the PCB and parts colors have enough contrast that the downward facing camera can see them clearly.
Typically this would be good enough for your small passive components, smaller SOIC's, and things of that nature. Keep track of the data and you also get a trend in machine performance to see if you're having an accuracy degradation for some reason.
Start placing large BGA's or QFP's though and your theta gets even more critical. Basically because the slightest drift in rotation means a larger movement of the leads at the edges of the part.
Not just that but your theta rotation becomes the limit on your placement speeds, not the X/Y. Which is also why your sequence should be a pre-rotation, vision inspection, and then a fine correction on the theta.
Otherwise you're swinging it too much after the vision inspection and it increases the risk of things going out of place. Larger IC calibration is with glass parts that are precision marked, placed onto a target board that's equally precision marked. Place the parts, then measure actual placement compared to predicted. Kinda like an optical comparator. Those glass slug sets are EXPENSIVE though. This probably makes calibration of this style out of reach in the Hobby/DIY market without some kind of significant change. There might be some other techniques out there I'm not aware of which are more cost effective.
For Z-height, the in-elegant but effective solution is spring loaded nozzles that actually slightly over-drive down into the pick and place locations, compressing the spring.
It's why you're seeing so many cheaper machines that are made to use JUKI nozzles, they have integrated spring compression. You need that kind of flexibility in Z-height because you're never going to able to do it accurately.
PCB's warp, it's inevitable. Doesn't matter how much support tooling you have, how strong you clamp them, or anything you do. You're placement height is never going to be fixed.
Gets even worse if you have a lot of V-scores or milling. Can also do a compressible nozzle with an integrated touchdown sensor if you want to really get picky.
But it's easy to get too wrapped up in the Z-height for pick and place.
And I think that's one area you're going to come across significant conflicts between 3D printing as opposed to pick and place.
For 3D printing, Z is your critical calibration, X/Y only need to be repeatable but don't need to hit specific exact locations, and theta is completely meaningless.
For a pick and place, X/Y/Q are your criticals that need to hit the same every time, where Z you have to compensate for a drifting target height.
Then fluid dispensing, again a different set of criteria. X/Y/Z all matter, as does volume, and to be honest theta if you take it where you've got a rotating head that can profile around existing parts.
But for fluid dispensing, if it's the right material, you can still do a Place and Measure calibration for your X/Y if you're doing a fixed theta. Some machines have a designated clean spot just for such a purpose.
Place a dot, go back and look at where the dot is compared to where it thought the dot was placed. There's you're X/Y offsets.