Topic: Zwobble phase calibration scripts
Recently installed an E3D (works great, btw!!) and had to fiddle with z-stop screw, which means I'd have to re-calibrate the z-wobble compensation. However, the only thing that should have changed is phase (not amplitude/pattern). Call me lazy, but taking laser pointer measurements is too much work. So I hacked together a script that tweaks the GCODE to make different portions use a different phase.
Brief instructions:
1. Generate an STL with the stacked cylinders test print. You may need to tweak first_delta depending on your slicing settings (the idea is that you want each new diameter to start at z-height that's a multiple of 1.4mm) -- my slicing settings have a 0.1mm zoffset and a 0.3mm first layer height (vs 0.2mm for rest of print), so I need a first_delta of 0.1 + (0.3 - 0.2) = 0.2mm.
2. Slice it and get the output GCODE (make sure zwobble compensation is off for this slicing).
3. Pass it through the Python script (-i option), which will make each cylinder diameter use a different phase (by rotating the measurement vector and manually adjusting the G1 Z... commands) -- note that you need to enter relative moves not cumulative (i.e., the first order difference of what you'd put in your start GCODE).
4. Print it and visually inspect. Pick the phase offset (largest diameter corresponds to 0, next largest to 1, etc, up to 13) that shows the least banding. As a sanity check, the phase offset + 7 (mod 14) should show the worst banding.
5. Use the script to generate the necessary start GCODE, phase shifted (-p option).
The attached script shows the commands for my calibration runs.
Here is a photo that illustrates what you're looking for (here is full scale and alternate view):

The best-looking cylinder is the fourth from the left, corresponding to offset is 3 (although it's a close call between third and fourth cylinder, so true phase shift is probably somewhere between 0.3 and 0.4mm). This photo also nicely illustrates the periodic nature of the error and how the compensation works.
Although it's possible that the phase shift isn't a multiple of 0.1mm, that does not seem to be an issue so far. At .2mm layer height and conservative speeds (no nozzle fan yet), print takes about 2hrs, but I don't have do to anything during that time (as opposed to painstakingly making marks on the wall, measuring them with calipers, averaging, etc etc).
I guess it might be possible to modify this so as to avoid taking measurements altogether (just need to know amplitude, but a ballpark guess might do). But since I had already done the first set of measurements, I didn't look into that.
Now I no longer dread messing with the z-offset screw! And thanks again to rincewind for the firmware mod!
Edit: Fixed script upload; if you do try, please let me know how it works (didn't try to replicate the reverse-lookup and interpolation code 100%, but seems ok after a couple of tests).
