Wednesday, 3 April 2019

Surface flatness - analysing the scanned data

The data challenge:
Now that I have 2 massive data files containing ~10,000 points of x, y, z coordinates, I need to do something with them. I'm hoping to show that the scanning system (probe, machine and controls) actually generate consistent / meaningful measurements.

You might try to plot data like this using Excel's 3D surface plotting function but you'd be disappointed.

Instead, Matlab should do the trick. 


Took a bit of buggerage to figure out but this seems to work. The main issue is that the data amounts to several GB of data so it takes ages to run and the Intel graphics card is challenged to refresh when images are reoriented. 

Here's the code, where x_base, y_base, z_base etc are the numeric matrices containing the x, y, & z coordinates for the moulded base etc. There are 3 sections and I ran each individually, commenting out the other 2 to avoid grinding to a halt.

         [X,Y] = meshgrid(x_base,y_base);
         Z = griddata(x_base,y_base,z_base,X,Y,'cubic');
         surf(X,Y,Z);
         shading interp

Control surface:
First of all, check out the results for the precision ground (control) surface.

Looking edge on at the surface of the plotted data, it's clear that I hadn't trammed the surface. However, if I allow for that, the total Z deviation is of the order of 10um (2 vertical divisions). It would have been helpful to have trammed the surface first to avoid the tilt in the results, although it only amounts to about 20um total over the whole scanned length of 80mm or so. Pretty happy with that, as it suggests that the scan results should be accurate to around +/- 5um.

Plan view. Interesting to speculate on what causes the regular patterns here. The scan was performed from left to right, then returned to the left and restarted. This means that backlash in the X and Y directions should have been largely eliminated. The horizontal patterns appear to be repeated at steps of 20 mm. The ballscrews have a pitch of 5mm. Odd. I'll have to think about that.
Finished unit:

It's clear that the potted unit was also mounted at an angle to the horizontal, although the "non-flatness" dominates. I truncated the X coordinate range to remove the 4 fixing holes here:
The main "flat"(!) surface deviates from the green-yellow value (-77.30mm) at the edges to blue-turquoise (-77.6mm) at its "deepest", which is a height range of ~0.3mm from side to side. Those measurements aren't affected by the tramming error and are a lot greater than the measurement error.
Full scan area shows fixing holes. The probe dropped down into those holes a fair way.

There's a funny artefact under the main surface in these last 4 images which is probably to be expected from the data but I couldn't be arsed to understand or fix it:
Conclusions:

  • The Renishaw probe seems capable of Z axis scanning with an accuracy of around +/-5um around actual ie . That's a fifth of a thou - or "two tenths" in Mercan. It's actually pretty reasonable considering - and is way better than my machining is ever likely to be.
  • Obviously the scanning imposes minimal loads on the machine, so machining accuracy will likely be a lot less than this.
  • It's important to always scan in the same direction to avoid backlash being added or subtracted from the measurements. However, the critical dimension in this example (Z) is always approached from above anyway. 
  • Next time, don't be so ambitious with the resolution. Too much data results in an almost impossible number crunching task.
  • Happy chappy!

No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...