Setting up a Metrol positioning switch

This is a very quick post on how I installed a Metrol positioning switch for Z homing with my sliding hot end mount using the Duet Wifi electronics.

Metrol are a Japanese company who make high precision switches for industrial applications. Here is a link to their web site http://www.metrol.co.jp/en/. They seem to have a direct sales site called Toolsensor.com which is here http://toolsensor.com/. It looks like you can buy from ToolSensor via their Amazon.com outlet too.

I couldn’t find a UK source so ended up going to Misumi  UK and buying one of their contact switches. It wasn’t until it was delivered that I discovered that it was in fact a Metrol switch. Misumi only sell to businesses but they don’t seem to care if the business is VAT registered (mine isn’t) and there are no  minimum order quantities. So how and where you source these Metrol switches will depend on what part of the world you live in.

These switches come in numerous configurations. The one I chose has a smooth body but there are threaded versions available too. If you can, buy one without the LED as then it can be connected to the E0 end stop connector in the normal way – i.e. just like any other micro switch. The instructions for connecting end stop switches are here  https://duet3d.com/wiki/Connecting_endstop_switches.

Unfortunately, the non-LED version was not available from Misumi so I had to buy the LED version. The Misumi part number of the one I chose was N-MSTK-ASD. The non LED version is the same part number but without the “D” on the end. There is a sleeve on the switch with the word “Metrol” (that’s how I know it is a Metrol switch) and then “CS06A -L” which I assume is the Metrol part number and I would hazard a guess that the hyphenated “L” denotes LED version.

The data sheet for this switch shows a stroke of 2.0mm, the switching point as being 0.3mm from tip and the repeatability to be 0.005 mm. Metrol do make switches with claimed repeatability of 0.001mm but IMO that would be overkill even for our Z axes.One down side is that the switch is normally open rather than normally closed so if a wire falls off, it won’t fail “safe”. As I mentioned in my other post, I installed a backup micro switch to trigger 1mm higher than the Metrol switch and initiate an emergency stop should the primary switch fail.

If you’ve managed to find a non-LED version of this switch, then you can stop reading now as the rest of this post is on how to install the LED version.

Because this switch has a series LED and the Duet electronics also has an LED with a pull up resistor, it has to be treated as an analogue switch rather than a digital switch (this was what confused me at first). So following David Crocker’s advice (DC42) I connected the switch between the In and Gnd pins of the Z probe connector, with a pull up resistor (about 220 ohm to 1 K) between in and +3.3V. The resistor value isn’t critical as long as it is within that range – lower makes the series LED shine brighter when the switch is triggered.

Here is a link to the Duet Wiring diagram. https://duet3d.com/wiki/Duet_WiFi_wiring_diagrams. NOTE. Unless you have a very early prototype board, the diagram to use is the one at the top entitled “………v1.0, v1.01,v1,02” The lower diagram is for PROTOTYPE – don’t let the “V2” fool you into thinking that its is later than the production V1.0 versions. This is important because the Z probe pins are different.

Having got the switch connected, we now need to “tell” the Duet board what type of switch it is. In this case, it is probe type 1. The relevant gcode command is M558 and the settings can be found here https://duet3d.com/wiki/G-code#M558:_Set_Z_probe_type. So my M558 line looks like this. M558 P1 X0 Y0 Z1 F180 T6000 I1. I don’t use and form of bed probing other than for homing so the “T” parameter is irrelevant in my case.

Note that unlike the mini height sensor, the “analogue” voltage from the Metrol switch does not change gradually as the sensor gets close to the bed. Instead it simply switches from one value(zero) to another. So you cannot use the facility whereby the probing speed will slow down as the sensor gets closer to the bed so you may need to drop the Z homing speed (180 mm/min works well for me).

The last thing to do is check that the switch is working and set the trigger value and trigger height.Again, it should be noted that I don’t use any form of bed compensation so I’ve only ever used G31 for homing. If you do detailed probing, you may be using G30 or G32 but the principle will be the same.

I currently have a problem with my printer and am unable to connect using the web interface so I’ll have to do the rest of this post from memory. Apologies in advance if what you see is not what I say you will see.

This is where I discovered another command that I wasn’t previously aware of. One can use M119 to report the end stop status. With the switch open as normal, send M119 via the web control and observe the switch status in the console. Then manually close the switch and send M119 again to check that it is closed. The console on the web interface may indicate that the probe is close to the bed but not actually at the bed. This is because the trigger value may not be correct, especially if you have previously been using the IR probe. So, with the switch open, observe the probe value (top right hand corner of DWC) and should read zero. Then with the switch closed, observe the probe value again. With a 500 Ohm resistor, I had a reading of 474 and my G31 was still set for the mini IR probe with a trigger value set to 500 which is why the web interface console showed that the probe was close to the bed. The actual value will depend on the resistor you used, so set the trigger value to be about half way between zero (when the switch is open)  and the reported value when the switch is closed. In my case I used 250 so my G31 ended up as “G31 P250 X0 Y0 Z-0.8”. The “Z” value is the trigger height and is set in the usual way by using a thin piece of paper between the probe and the bed or whichever method works best for you.

HTH

Ian

 

 

 

Advertisements

Tool free swappable, bed probing hot end mount.

Like many things in life, this printer modification evolved into something much more than my original intention. By way of introduction, this picture shows my original hot end mount and X and Y axes.

original

As readers of my blog will know, I use a Diamond mixing hot end. This is a rather ungainly beast with 3 heat sinks sticking out at 28 degrees taking up quite a lot of space and weighing in at around 250gms (excluding any extruders). Because of the weight, the engineer in me decided that the best way to mount it would be to fix it between two parallel rails, rather than having it hanging over the side of a single rail, which is why I ended with a such a huge X carriage. It was heavy too. The X carriage including the hot end weighed 690gms and the Y carriage with the X rails fitted weighed in at 1,210gms so my combined Y axis weight was a whopping 1,900gms. Having said all that, I regular used to print at 90mm/sec with non print moves set to 350mm/sec with accelerations set to 1200mm/sec^2 and the thing was absolutely rock solid. It was impossible by hand, to “flex” the hot end in any way.

My issue was that I have another Diamond hot end, fully assembled but with a 0.9mm nozzle that I intend to use with Taulman T glass filament, and changing the hot end was a complete pain. So I set out to make a new mount that would enable me to quickly swap hot ends, preferably without the need to use any tools. I also decided to abandon the dual X rail setup and replace the two 2020 extrusions with a single 2040 extrusion. Part of me still thinks this was bad idea from a rigidity point of view, but there are other benefits such as weight savings and increased range of movement which I hope will outweigh the negatives.The next two pictures are Open Scad images of the new X carriage.

OpenScadCarriage

OpenScadWithDiamond

The red part is the new Diamond hot end mount. Effectively, the mount has a sort of Dovetail slot around the two sides and the bottom, into which the mount slides.This is a close up of the actual Diamond hot end mount.

DiamondMount

At this point, I realised that I could solve another minor issue that I had. That is, I use an IR mini height sensor but I also use 3DLac on my my glass build plate, and the 3DLac can alter the reflectivity of the glass, meaning that I often had to make adjustments to my Z axis homing. The other problem I have with the IR sensor is that, because of the shape of the Diamond hot end, it is very difficult to mount it anywhere close to the nozzle.So I thought, rather than locking the hot end into place, I could hold it against it’s seat using springs which would allow it to slide up and down. I could then mount the height sensor above the hot end, rather than below it. This would mean that the hot end is itself the height probe. In the event, I discovered a Metrol positioning switch with a claimed repeatability of 0.005mm  and decided to use that above the mount but retain the mini IR sensor below the mount if the sliding arrangement doesn’t work out. I’ll cover the Metrol switch in a separate post.

It took me a few attempts to print the parts such that they would slide easily but at the same time have no “wobble”. It wasn’t too hard though because the bottom of the mount is also a “Dovetail” shape and when the springs act down on the mount, the effect is to pull the two faces together.

Of course, I have reservations about how well these plastic printed parts will last over time but I am optimistic because now that I have installed and set it all up, I have only 0.8mm of movement before the switch triggers and can probably reduce this further. The worst case scenario is that if the sliding\probing\homing aspect proves to be unreliable, I will change the design slightly to clamp the hot end in place and go back to using the mini IR probe for homing.

At least I will be able to quickly change hot ends without using any tools. Here is a little video I made showing how that all works.

As with all these things, the update was much more involved than I first though. The entire upper section of the printer has to be disassembled, including the motor mounts, idlers, and of course the X and Y rails………

stripDown

………but I got it all put back together.

back together

So in practice, what happens for Z homing is that the bed rises, the nozzle touches the glass then the mount gets lifted off it’s seat and slides up until the switch triggers (currently 0.8mm) and my configuration file is set so that Z=0 is 0.8mm below the point where the switch triggers. The switch has 2mm of plunger travel but triggers at 0.3mm so there is a further 1.7mm of plunger travel available. I made use of this by building in a fail safe which is just a micro switch acting on the bed and set to trigger an emergency stop at 1mm after the point where the homing switch should trigger.

limitSwitch

If using the nozzle itself as a means of Z homing proves to be unreliable, I have still achieved my original objective which was to have a means of quickly swapping hot ends. As a bonus, I have gained an extra 50 mm of movement in X  (now 375 mm instead of 325 mm) and 30mm in Y (now 350mm instead of 320 mm). Also, the new X carriage weighs 520gms instead of 690gms and the new Y axis (without X) weighs 820gms instead of 1,210gms giving me a total weight saving in Y of 560gms ( 1,340gms instead of 1,900gms).

The downside is that I can now “flex” the nozzle in the Y direction if I push and pull hard enough, whereas the old design was rock solid. However, I’ve just finished my first print and there is no sign of and “banding” that I would expect to see if the nozzle was moving around during a print. Also, the Z homing is working like a charm and thus far, is consistent and repeatable.

One last thought. With this mounting arrangement, I could fairly easily change to a completely different design of hot end, by making a suitable adaptor. By way of illustration. here is an adaptor that I’ve just made so that I can fit a dial gauge to level the bed.

dialGaugeMount

I’ll give an update in a few weeks or months when I am able to asses how reliable and/or repeatable this turns out to be.

Ian

Late edit. I’ve just finished printing this object which is 133mm tall.

1stPrint

There is no sign of banding and the dimensional accuracy is pretty good. The smaller diameter should be 45mm and it measures at between 45.3 and 45.2 throughout the height. The inner square should be 21mm and measures at between 20.96 and 21.02 and the overall height measure at 132.8mm now that it’s cooled. So although it is possible to flex the hot end in the Y direction by applying force by hand, I’m reasonably confident that there is no movement during normal printing (at least in the centre of the bed).