Thing-O-Matic: Z-Min Platform Height Switch Testing

After building a few large objects (about which more later) and verifying that the Z-minimum switch remains stable and delivers useful results, I cobbled up a test script that simplifies measuring the build platform tilt and extrusion thickness for a given switch height value.

The pattern looks about like this, although the G-Code script below connects the top of the X so it hangs together better.

Test X extrusion pattern
Test X extrusion pattern

The extrusion uses my defaults for the first layer: 0.33 mm layer thickness, 2.0 w/t, 10 mm/s, 0.66 rev/min. Those are 20% of the normal extrusion speeds: 50 mm/s and 3.3 rev/min.

I built all the objects without adjusting the plate tilt to determine if all three plates produced the same result: they do! The results showed a consistent tilt, with the rear left corner high by 0.10 mm and the front right corner low by 0.10 mm. Those are all rubbery numbers, with accuracy based on measuring a filament, but they’re reasonably consistent.

The Z-min switch set the middle of the platform to about 0.35 mm, making the corners around 0.25 mm and 0.45 mm. That led to slightly too much plastic (plate too high) and slightly too little (plate too low), respectively, but the objects printed quite well.

Running the G-Code below under those conditions produced these numbers:

30 29
32 30 34 33
30 32 41
28 36

The numbers come from two measurements on each side of the outer square at about the 1/4 and 3/4 points, plus four measurements near the middle of the X. I didn’t average multiple measurements, some are definitely off due to error, and your mileage will vary.

Those thicknesses aren’t quite the same as I’d been seeing around printed objects, but if you squint you can see the tilt. There’s one missing number; that part of the X broke off and vanished somewhere between the Basement Laboratory and my upstairs desk.

I tightened the rear left bolt 1/6 turn (about 0.08 mm) to lower that corner and raise the opposite one, then stuck a sheet of 8-mil (0.008 inch = 0.021 mm) shimstock under the upper plate to see how the switch handled an abrupt change in plate height:

Built plate on 8 mil shimstock sheet
Built plate on 8 mil shimstock sheet

Another text X extrusion produced these thicknesses:

25 26
28 27 34 30
29 31 30 38
28 36

It’s obviously tilted even worse than before, which means the shimstock has the odd nick, bend, or bit of grit. What’s important, however, is that the extrusion thickness remains pretty close to normal, despite having the build surface 0.22 mm higher than usual. Without the Z-min switch on the plate, the extrusion thickness would suddenly decrease by 0.21 mm… and that’s enough to wreck a print!

Removing the shimstock and running another test extrusion produced about what I expected:

35 32
36 24 35 33
30 36 35 38
29  35

Overall, the thickness now lies within 0.05 mm of the 0.33 mm average. My measurement accuracy simply isn’t good enough to get any better than that.

The evidence so far suggests the platform tilt remains reasonably constant, even as the overall height varies, so I think a Z-minimum switch on the build platform should compensate for the changes that affect first layer extrusion thickness.

What that means: slice an STL into G-Code and fire the Thing-O-Matic!

This Level Test.gcode file, which is basically my start.gcode and end.gcode laminated around the snippet that draws the boxed-X pattern, lives in ~/ReplicatorG/scripts/calibration and thus appears on RepG’s pulldown menu:

(---- start.gcode begins ----)
(MakerBot Thing-O-Matic with aluminum HBP and Z-min platform switch)
(Tweaked for TOM 286 - Ruttmeister MK5 stepper extruder mod)
(Ed Nisley - KE4ZNU - May 2011)
(- set initial conditions -)
G21		(set units to mm)
G90		(set positioning to absolute)
(- begin heating -)
M104 S210 T0	(extruder head)
M109 S120 T0	(HBP)
(- coarse home axes -)
G162 Z F1000	(home Z to get nozzle out of danger zone)
G161 Y F4000	(retract Y to get X out of front opening)
G161 X F4000	(now safe to home X)
G92 X-53.0 Y-59.0 Z117.0	(set XYZ coordinate zeros)
(- fine home axes)
G0 X-51 Y-57 Z115 F400	(back off switches)
G161 Y F200
G161 X F200
G162 Z F200
G92 X-53.0 Y-59.0 Z117.0	(re-set XYZ coordinate zeros)
(- manual nozzle wipe)
G0 X0 Y0 Z10	    (pause at center to build confidence)
G4 P500
G0 X40 Y-57.0 Z10	(move to front, avoid wiper blade)
G0 X56            (to wipe station)
G0 Z6.0           (down to wipe level)
M6 T0			        (wait for temperature settling)
G1 Y-40	F1000		  (slowly wipe nozzle)
(- home Z downward to platform switch)
G0 X55.9 Y8 Z3	      (get over build platform switch)
G161 Z0 F50	          (home downward very slowly)
(-----------------------------------------------)
(- Set the Z height based on the switch height  )
G92 X55.7 Y8 Z1.45
(-----------------------------------------------)
G0 Z6.0			          (back off switch to wipe level)
(- start extruder and re-wipe)
G0 X56 Y-40     (set up for wipe from rear)
G1 Y-57.0 F1000 (wipe to front)
M108 R2.0	      (set stepper extruder speed)
M101		        (Extruder on, forward)
G4 P4000  	    (take up slack, get pressure)
M103		        (Extruder off)
G4 P4000  	    (Wait for filament to stop oozing)
G1 Y-40	F1000		(slowly wipe nozzle again)
G0 X0           (get away from wiper blade)
(- manual splodge)
G0 X0 Y-58		  (to front center)
G0 Z0.5 		    (just over surface)
M108 R2.0	      (set stepper extruder speed)
M101            (start extruder)
G4 P2000        (build up a turd)
(---- start.gcode ends ----)
(--------------------------)
(- print thread around platform)
( Speed as in Raft plugin for first layer)
( Print continuously to make it hang together while measuring)
M108 R0.66				(set stepper extruder speed)
G1 X-45 Y-45 Z0.33 F600	(to front left corner)
G1 Y45
G1 X45
G1 Y-45
G1 X-45					(return to front left)
G1 X40 Y40				(diagonal to rear right)
G1 X-40					(to rear left)
G1 X45 Y-45				(diagonal to front right)
(--------------------------)
(---- end.gcode starts ----)
(Tweaked for TOM 286)
(Ed Nisley - KE4ZNU - May 2011)
(- inhale filament blob)
M102		(Extruder on, reverse)
(- turn off heaters)
M104 S0 T0 	(extruder head)
M109 S0 T0 	(ABP)
(- move to eject position)
G162 Z F1500	(home Z to get nozzle away from object)
M103		(Extruder off)
G0 X0		(center X axis)
G0 Y40	(move Y stage forward)
(---- end.gcode ends ----)

Things are looking good!

5 thoughts on “Thing-O-Matic: Z-Min Platform Height Switch Testing

  1. Ed,

    You said,
    “That led to slightly too much plastic (plate too high) and slightly too little (plate too low), respectively,”

    On my read and with my plate if too much plastic (plate too low) and slightly too little (plate too high).

    If my plate is high the plastic gets squeezed. If the plate is too low then I get a thick toothpaste flow.

    1. If my plate is high the plastic gets squeezed.

      Yup, that’s “too much plastic” for the space available. When the plate is low, there’s not enough plastic to fill the space: “too little plastic”.

      That’s because the extruder puts out a constant amount of plastic and it’s our responsibility to align the plate correctly under the nozzle to provide exactly the right amount of space to hold that amount of plastic.

      The switch can only correct for one spot on the plate; it’d be slick to measure, say, three points, compute the actual plate tilt, and apply windage to the extrusion speed to lay down exactly the right amount of plastic at each point!

Comments are closed.