track up the low-precision slope of the IR probe before measuring down
the high-precision slope near 0 mm. But this means that the probe has to
be set only a fraction of a mm higher than the nozzle itself. Also (at
the moment for safety) the code thinks Z = 0 occurs when it is actually
0.2mm. This is easy to fix when the rest is reliable.
is A0 on the Arduino. The signal seems quite noisy. I have put a 10uF
capacitor across its supply. Maybe add an 0.1uF across its signal?
Two values need to be set in Platform.h:
If v is the value from the A->D on A0, then:
z = v*Z_PROBE_GRADIENT + Z_PROBE_CONSTANT (mm)
Z_PROBE_GRADIENT is dependent on the IR proximity device (though they may
be consistent enough all to have the same value) and Z_PROBE_CONSTANT depends
on how high it is mounted relative to the nozzle.
To generate these values, uncomment the bits of code in and around Platform::Spin()
zero the Z axis by eye, run the program, and raise Z by 0.1mm increments. Put
the raw A->D values in the spreadsheet in the Data directory, and it will
give you the values of Z_PROBE_GRADIENT and Z_PROBE_CONSTANT.