Thing-O-Matic: Z-Minimum Platform Height Switch

Z-minimum switch - left view

Z-minimum switch - left view

Getting a good bond between the build platform and the first extrusion layer depends on the nozzle height above the platform: too high and it doesn’t stick, too low and the excess plastic ruffles up to ruin the next layer. I’ve been setting the height manually, but that’s tedious, fraught with error, and goes best with a cool platform that may change size when it heats up. Measuring the Outline or Skirt extrusion provides after-the-fact information about build platform alignment, but doesn’t ensure that the current print will work.

The best way to do this is to measure the actual height of the nozzle above the build platform immediately before starting the extrusion, with everything at operating temperature, then set the Z axis so that Z=0.0 puts the nozzle on the platform. Nophead put a height measurement station beside the build platform and I’ve built a tool length probe for my Sherline, so I’m not breaking new ground here.

The catch is that the switch must sit flat on a 120 °C platform, withstand being poked with a 220 °C nozzle, repel ABS, and trip with better than 0.1 mm repeatability. I don’t know that what I’ve done here meets all those criteria, but it’s a first step along the way.

The top picture shows a surplus SMD pushbutton switch with a metal actuator button mounted on a small steel strip. The gray epoxy blob to the front secures a brass tube that protrudes from the bottom into the middle socket head cap screw along the right edge of the platform.

[Update: The surplus place was likely Electronic Goldmine, but it seems they have no more. Sorry. Maybe glue a metal disk atop a plastic switch?]

Drilling thin sheet metal

Drilling thin sheet metal

The steel strip was an RF shield from a junked wireless network card. I bent the edge in a small sheet-metal brake to keep the whole thing rigid and, somewhat to my surprise, the strip remained as flat as I can measure throughout the adventure.

Drilling a good hole through sheet metal is easier when you clamp it between two sacrificial sheets and drill through the whole stack. That keeps the metal from warping and gives you a nice, circular hole; otherwise, you get a rumpled sheet with a triangular hole that’s good for nothing. You can see the bent edge sticking up on the left; the drill center is 4 mm from that side.

The brass tube in the hole and the bent edge constrain the switch to a known position relative to the underlying HBP. The tube fits snugly in the center bolt’s hex socket to set the XY position and the bent edge keeps the whole affair parallel to Y. That allows the upper plate to shift slightly in XY while the switch remains in the same location relative to the TOM’s XY home switches (the bent edge allows a bit of slop in X for the top plate’s hole tolerance)

The Z height, of course, depends only on the altitude and thickness of the top plate, which is exactly what’s being measured relative to the nozzle.

I built it in two stages: epoxy the brass tube, then mount the switch and a second tube as a strain relief around the wire. A layer of Kapton tape insulates the SMD switch terminals from the steel strip; the epoxy sticks well enough to the tape for my present purposes.

Attaching Z-min switch and cable

Attaching Z-min switch and cable

None of the dimensions are critical, although having the whole assembly narrow enough to stay out of the build area seems like a Good Idea. The center line of the platform bolts sits 4 mm inward of the plate edge, to give you an idea of the scale.

The right-side bulldog clamp holds it securely in place, with the wire from the switch threaded beside the platform and wrapped around a solderless lug on the front corner:

Z-minimum switch on build plate

Z-minimum switch on build plate

I think a tiny neodymium magnet embedded in the top plate would work just as well, although it’d tend to suck steel swarf out of the rest of the shop. This is not the right place for a random speck of grit!

The wire connects to a 24 inch CD-ROM audio cable fresh from the usual eBay supplier. I snipped off the end and added a resistor to resemble an MBI mechanical endstop switch: 10 KΩ to +5 V, switch connects the resistor to ground. No LED, alas.

Next, a dab of G-Code to poke the nozzle into the switch…

About these ads

,

  1. #1 by Andrew P on 18-May-2011 - 08:30

    Neodymium magnets tend not to like sustained >100C temperatures over the long term. At least that’s what several of us early-adopters of the magnet-mounted MakerGear HBP discovered.

    • #2 by Ed on 18-May-2011 - 09:14

      Neodymium magnets tend not to like sustained >100C temperatures

      Good to know that… thanks for the update. Bulldog clips FTW!

      Again, one careful observation outweighs a kilo-opinion.

  2. #3 by Brent on 18-May-2011 - 10:33

    Interesting approach.

    I had thought of mounting the Z-lower-limit switch on the Z-stage. It would be mounted in so that during normal builds it would be outside the build volume. But during calibration the platform would be moved to one extreme corner, and at this X+Y limit the Z switch could just catch the corner of the platform.

    One drawback would be that the stage is getting measured at X+Y extremes, not at the center of its operating range.

    Maybe we could just slowly drive the nozzle into the center of the platform, and sense when the X-stage lifts off the driving nut. That would end up being like -1 or something,

    • #4 by Ed on 18-May-2011 - 11:41

      mounting the Z-lower-limit switch on the Z-stage

      That’s much easier, but then the measurement doesn’t see any of the changes in the entire extruder stack. It’d probably work if you could guarantee a constant temperature throughout the stack, which seems an unreasonable requirement; I know the answer comes out differently for cold starts and hot starts.

      That would end up being like -1 or something

      It’s the “or something” part that gets you… and I’m not hoisting my Z stage atop the nozzle, thank you very much! [grin] Probably wouldn’t get along well with the springs under the build platform, either.

  3. #5 by Zach Smith on 19-May-2011 - 02:39

    Hey Ed,

    This is simple and elegant and I like it. This is something I could see us wanting to integrate

    Having been burned in the past by using parts beyond their rated specifications (see: power resistors as heaters) I think it is really important to make sure that we’re using a switch that is rated for the operating temperature (and then some).

    Do you have a p/n for this guy or a datasheet?

    I did some looking on the internet for high temp switches, and found this guy which looks like it would be a great candidate: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=401-1598-2-ND

    Max temp of 125C, what appear to be tight tolerances on the travel distance, and a metal actuator. Sweet!

    One other concern is regarding the nozzle orifice. Right now we use stainless steel for nozzles, but there may be a switch to brass or aluminum in the future. Is this something to be concerned about? What are your thoughts on something like that?

    • #6 by Ed on 19-May-2011 - 07:46

      Do you have a p/n for this guy or a datasheet?

      Alas, the nature of surplus parts eliminates most links back to the manufacturer unless they burned a part number on the side. Even if the surplus outlet had more, they probably got a box of random switches as part of a huge dollar-per-pound cleanout with no doc at all.

      I’m certain that the plastic body under that metal top isn’t rated for what I’m doing to it. I have a (small) stash, so I can swap new ones in as they fail, while hoping they’ll last long enough for my simple needs.

      Digikey 401-1598-2-ND

      That button has a nice finger-friendly domed top that must feel wonderful, but that means the sensed height depends on where the nozzle hits the button. It’s also 1.45 mm in diameter and would be difficult to hit dead-center with a 0.5 mm OD nozzle.

      I’m getting hit repeatability inside 0.5 mm from plate to plate, which is fine for a flat 2.0 mm diameter button. I think nearly all of that error comes from the edge tolerance of those plates affecting where the switch sits in X: I really didn’t anticipate adding a switch and the edges weren’t a critical part of the machining. If the switch were part of the platform, it’d be better.

      That C&K switch has a maximum rating of 125 C, but I know other folks run their platforms hotter than that. Even at the 120 C I use, the switch will run on the ragged edge of what’s tolerable, which isn’t where you really want it to be.

      At 120 C ABS sticks to Kapton like it’s glued, but that’s probably too hot. After things settle down a bit, I want to see how low that temperature can go. Given dependable first-layer heights, no plate tilt, and very low speeds, I think build platform temperature becomes a secondary factor.

      a switch to brass or aluminum in the future

      The switch probably won’t care, because it’s just getting a tap every now and again. There’s a very very thin film of plastic between the nozzle and the actuator, so they (probably) don’t touch.

      Is this something to be concerned about?

      IIRC, I have an old (well, in Internet years, anyway) brass nozzle. Brass is really nice stuff for small fittings in nasty conditions: there’s a reason pipe fittings use brass!

      If you’re using an aluminum Thermal Core, an aluminum nozzle is a terrible idea: aluminum-aluminum joints gall like crazy even at room temperature; you’ll never get the nozzle out, even with a liberal application of Never-Seez, at least after a while.

      I think the stainless nozzles will have a similar, perhaps lesser, problem in stainless Cores.

      Aluminum-in-stainless seems decidedly bad. They both gall easily and the nozzle expands more than the Core, so thermal cycles tend to grind them together.

      I’d love to be proven wrong on all that…

      • #7 by Jonathan Katz on 24-May-2011 - 21:35

        Any reason not to use a metal lever type microswitch similar to the mechanical endstops? The metal lever certainly wont care about the contact with the nozzle and the .1mm difference in contact point will be rather insignificant at the angle of activation of most of those switches. It also gives you a little more leeway before over travelling and putting too much force on the switch and/or nozzle. With a properly clever mounting arrangement it could probably be indexed to the top or bottom surface of the build platform while remaining thermally isolated enough to use a standard microswitch.

        • #8 by Ed on 25-May-2011 - 08:10

          Any reason not to use a metal lever type microswitch similar to the mechanical endstops?

          Two that I could think of:

          • The lever arm magnifies any jitter in the trip position
          • I couldn’t figure out how to mount it with a reliable index to the plate surface

          The latter was really the killer: the switch stuck out in all the wrong directions no matter how I held it. You want the lever nearly flush to the plate surface, so as to not hit the Z stage when it’s printing the first layer, but that forces the switch body below the plate. The nozzle doesn’t go very far outside the print area on the right, the back of the plate is already close to the Z axis rods, and I didn’t need anything else cluttering up the front.

          I thought of bending the arm, making a little platform, machining a fancy holder… then came to my senses. The SMD switch probably isn’t the right hammer for the job, but it works!

  4. #9 by rocketguy1701 on 10-May-2012 - 14:18

    Now that I have a Replicator, (and will also be building a machine shop), I’ve really wanted to look at this sort of auto-calibration. Partially for the ease of the end task, but also for the elegance of the whole thing.

    One thing I’ve been thinking about and/or read about in some CNC magazine somewhere, is using continuity for contact detection. So instead of a microswitch or button, you clip a wire to the extruder and another to the build plate, and have a small area that isn’t coated by kapton etc, that you contact with the head to set Z=0, perhaps with a slight compensation for tape (Z= -0.0001?) The detection circuit should be trivial to implement if you’ve got a spare pin on the arduino/arduino-like substance running the machine.

    And now that I’ve thought about it for a few more seconds, a wipe platform to clean the nozzle(s) might be needed to ensure you don’t have the plastic insulating the contact. Maybe that isn’t a problem if the nozzle is hot, or maybe an auto-wipe is a good idea anyway?

    So does this make any sense or am I totally missing a factor(s) that make it impractical?

    • #10 by Ed on 10-May-2012 - 14:45

      using continuity for contact detection

      That’s the problem: continuity works perfectly about 85% of the time…

      For example, the spindle bearings on my Sherline produce a perfect oil film, so that there’s no continuity whatsoever between the machine frame and the spindle. I decided that expecting to remember to attach an alligator clip before probing wasn’t going to work at all. Installing a permanent rotating contact didn’t seem feasible, either.

      The same goes for the extruder nozzle on a 3D printer. Almost all of the time you’d be able to wipe the nozzle clear enough to work, but some of the time you’d have a layer (or blob!) of plastic on one contact surface or the other. Ramming the nozzle through the platform is a Bad Thing.

      That’s why my homing routine first touches off on the standard MBI Z-maximum switch, then on my homebrew Z-minimum switch at the platform. The probe to Z=0 should terminate at about Z=+1.5, but when Something Goes Wrong it’ll stop a millimeter or two below the top of the switch without doing too much damage. I’m sorry to say I’ve verified that on a few occasions.

      If I were going to build another 3D printer, I’d put the Z-min switch off to the side at a known offset from the build plate, where the switch wouldn’t cook at 100+ C all the time. Can’t do that with the TOM: not enough travel and structural rigidity. It’d work great with dual extruders, although I suspect the firmware isn’t up to the job right now…

      • #11 by rocketguy1701 on 10-May-2012 - 16:08

        Thanks Ed, good to know.

        I’m now wondering if it would be worthwhile to have a contact fixture probe with a calibrated length instead of using the nozzles, with a sharp pin or bump on the build platform (to keep the probe shorter than the nozzles and away from the print in progress. Maybe even as a machined part of the build platform?
        Not as elegant, and rapidly heading to why-so-complicated-land, but it would be heat proof.

        And of course there are non-contact methods, lasers etc. But I was hoping not to go there, as much as I love the lasers.

        • #12 by Ed on 10-May-2012 - 16:36

          a contact fixture probe with a calibrated length

          Nophead has an off-platform probe like that on his Hydraraptor, with deliberate manual intervention that signals the firmware to continue. Of course, he’s written fully custom firmware for a spectacular machine, but … that type of probe works!

          I didn’t do it for the TOM, though, because the whole Z-axis assembly depends on the nonexistent stability / rigidity of a tall acrylic and plywood structure. IMHO, there’s no way to get 0.1 mm accuracy at the nozzle tip without touching that tip to the probe switch; the Z-axis platform has too much slop for anything else.

          The Replicator has a lot of flying mass hung off tiny non-adjustable plywood doodads and the HBP is a cantilever design. I’d want to verify the whole thing can hold alignment to 0.1 mm across temperature variations / height adjustments / XY positioning.

          It’s one of those problems that looks trivially easy until you try to make it work… [grin]

          • #13 by rocketguy1701 on 10-May-2012 - 16:42

            Roger that, I’ll have to do some measuring…

  5. #14 by martinbogo on 21-December-2012 - 10:48

    Do we need a switch, at all?

    Why not use the brass/steel/etc nozzle directly, and run a small amount of current through the whole assembly? Say, 3-5V, with a big 1MOhm resistor, and slowly bring the head down until it taps the surface of the build platform on the corners? Especially with all-steel or all-aluminum build platforms, you’ll get a very accurate reading of where the 0 point is.

    -M

    • #15 by Ed on 21-December-2012 - 11:31

      Why not use the brass/steel/etc nozzle directly

      Two reasons:

      1. While there’s no drool accumulation, there is the distinct possibility that a very thin layer of plastic will insulate the nozzle from the platform.
      2. Both the platform and the nozzle must be grounded to eliminate static buildup and static zaps to the electronics.

      On my Sherline, I discovered that the oil film in the bearings insulated the frame and spindle, so it doesn’t take much to reduce the conductivity to zilch. Ideally, you want a zero-pressure contact, which means the nozzle can’t punch its way through the plastic.

      Unlike LinuxCNC, the TOM firmware doesn’t provide any way to report a probe touch failure back to the G-Code. If the platform is spring-loaded and the G-Code uses a short probe distance, then it probably won’t break anything, but … the nozzle will be far too high over the platform when the print starts.

      So I think a mechanical switch does what’s needed. I agree that indexing it to the platform surface poses a problem; if the whole structure were more rigid, it’d be easier, but then we might not need a switch at all!

  1. Thing-O-Matic: Z-Minimum Probe G-Code « The Smell of Molten Projects in the Morning
  2. Thing-O-Matic: Z-Min Platform Height Switch Testing « The Smell of Molten Projects in the Morning
  3. Thing-O-Matic: Polyholes Print Quality at 25, 50, 75 mm/s « The Smell of Molten Projects in the Morning
  4. Thing-O-Matic: Z Axis Resolution / Repeatability / Backlash « The Smell of Molten Projects in the Morning
  5. Thing-O-Matic: Revised Homing « The Smell of Molten Projects in the Morning
  6. Thing-O-Matic: Wiper Rebuild Doodles « The Smell of Molten Projects in the Morning
  7. Thing-O-Matic: Small Hole Calibration « The Smell of Molten Projects in the Morning
  8. Platform Level Test Pattern « The Smell of Molten Projects in the Morning
  9. Thing-O-Matic 286 Conversion: Marlin Firmware Tweaks | The Smell of Molten Projects in the Morning