Welcome! Log In Create A New Profile

Advanced

Auto-levelling efforts

Posted by neildarlow 
Auto-levelling efforts
May 19, 2014 08:22AM
Hi All,

I have noticed that quite a number of people here are interested in, and independently attempting to implement, auto-levelling for the Mendel90.

May I suggest that you pool your ideas and perhaps produce a common solution. Due to the general level of interest in auto-levelling I would think that nophead may have a few ideas relating to this and might want to contribute also.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Auto-levelling efforts
May 19, 2014 11:43AM
I have not looked into the efforts being already tried. But I had a idea while trying to level my bed that maybe someone can expand on.


What if we placed strip of something conductive around the edge of the printer bed with it wired as a ground to a endstop. Than make a holder that can be either clipped to the hotend or attached to the hotend bracket. Use a simple probe that could be turned parallel or perpendicular to the bed that simply completes the circuit if it touches the conductive strip and wire that to the positive of a endstop. Make it a known distance longer than the hotend.. And then using software to tell it move to this corner of the printbed and touch down..record. Move up 1mm and travel 10mm(or 100mm) touchdown etc..

I'm not even sure its feasible just thought I'd share my idea..
Re: Auto-levelling efforts
May 19, 2014 12:01PM
I use self retracting probes on my wooden machines but I don't really see the point on a Dibond machine as it doesn't change. Better to physically level it once than have the Z axis constantly moving. Why do people see a need for this?


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 19, 2014 03:34PM
Quote
nophead
Why do people see a need for this?
Because for the life of me I can't get my bed/x-axis to stay consistantly parallel across multiple prints. One print things might be perfect, but the next one I run it up and then back down the x-axis and it's off again. Yes the z-probe is just fixing a symptom, not the problem. But if it works, it works.
Re: Auto-levelling efforts
May 19, 2014 05:20PM
If it doesn't stay level then there is probably something wrong with the Z axis, in which case auto levelling will not work anyway because it uses the Z axis to compensate.

Possibly the axis is only resting on one nut due to the Z bars not being vertical enough.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 19, 2014 07:17PM
For me the main driver was the fact of experimenting with new things and being human - i.e. I cannot always predict that e.g. the machine is about to plow the extruder into the plate or the top z clamps with enough force to push things out of calibration. An added real benefit is that I can now freely switch between the kit glass pane and the IKEA Sörli mirrors I have - which was a pain before since they're not the same thickness. An imaginary but still in my opinion relevant benefit is the pure technical coolness of automating the measure. For a beginner I would think this would shorten the learning curve as getting prints to stick is way more consistent and not wasting so much time on the slicer to compensate.

If I was using my printer for serial production of well tested files I might also have the opinion that auto leveling brings limited value. Clearly, the feature does not fix a flaw - it just makes an exellent base design a bit more practical for varied use.

In all fairness I find the slight added rattling from the probe rod during prints a bit annoying. Also the EMI from driving the servo tends to stress the USB comms a bit more - setting up a new 5v and adding a low pass filter basically restored the original stability.

Leaving the debate of good/bad why/why not aside, I took some inspiration from nophead's blog when I chose my design. Thinking back my key thoughts were:
- to have fixed switch with a moving trigger device to get good long term stability
- to not have to sacrifice any build height by moving the head around a fixture on the frame to raise and lower the probe - I also see problems if some build would reach up into that space
- be able to probe all over the surface to take advantage of Marlin auto bed levelling
- to have the probe point as close as practical to the extruder so I can get the widest symmetrical grid pattern
- to have the probe top somewhat protected from twisty filament

If I would do a "v2" I'd consider:
- using an optical fork as the switch - removes the trigger contact force and you need to run separate power to the extruder for the servo anyways
- have a datum edge/corner to locate the switch against - so one can dis-/remount without needing to change the probe-to-extruder offsets
- having the probe rod held by some spring force to stop rattling - perhaps tied to the servo with a rubberband configured as a mechanical toggle
- having the probe/servo bits as a separate bolt on to the extruder - easier to print a standardized extruder and then adapt the probe assy to different hardware

If experimenting with the latest Marlin consider that it does not cleanly handle probes that are tripped when retracted. I had to fix some issues to get it to work smoothly. At some point I'll pull the latest version and update the patches in my thread at .
Re: Auto-levelling efforts
May 20, 2014 04:51AM
With most additional features there is always the desire/necessity factor. As svanteg mentioned, the biggest advantage is not bed-levelling but Z-height compensation.

My kit came with a piece of glass 2.2mm tick and my, locally sourced, additional pieces came out at 1.8mm thick. Switching between the two either requires Z-height compensation in the firmware/slicer settings or I have to re-calibrate Z-height. A technical solution with zero effort is to ensure that all glass used is from the same supplier and, if possible, cut from the same sheet but this might not always be practical. Printing on different surfaces would also benefit from this feature.

A second scenario is when the machine is moved. The many YouTube videos I have seen of Mendel90 in action show the machine being used in a non-dedicated location e.g. kitchen table-top, lounge coffee table etc. This implies that the machine is moved and (from my experience of two movements during recent house renovation work) bed and Z-height calibration is always required after doing so. Think also of the case where a machine is shared, or loaned, between people in different locations.

A practical Z-height compensation/bed-levelling solution for the Mendel90 that works within the Melzi's capabilities and, if possible, with an LCD panel attached would benefit the machine and keep it on-a-par with its peers.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Auto-levelling efforts
May 20, 2014 06:25AM
The solution I use only needs an input pin. It doesn't need a servo, just a magnet between two steel objects. When deployed it pulls towards the bottom and closes two contacts. When it touches the bed the contacts open. To retract it just goes lower so the magnet passes the midway point and is attracted to the top object and is lifted above the nozzle.

With Panelolu2 fitted there are no spare pins but I don't use the second MOSFET for anything so A4 could be used. Some people may have lights on this output though.

Changing the jumpers to read the encoder switches over I2C frees up two spare inputs but I don't know the firmware implications. I think there are issues with I2C upsetting the stepper timing as it is so probably not a good idea.

Possibly the probe could be in parallel with the button as you don't need to press it while it is probing but it would screw things up if you did.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 20, 2014 08:03AM
I believe nophead has a valid point (its been a while since I calibrated and everything still works) but on the other hand it would be exciting and I would love to test this feature smiling smiley.

Quote
neildarlow
With most additional features there is always the desire/necessity factor. As svanteg mentioned, the biggest advantage is not bed-levelling but Z-height compensation.

When you say Z-height compensation you mean that the probe will auto calibrate the "Z_HOME_POS"? If that is the case wouldn't you need to know the distance between the probe head and the extruder head? If so, we will essentially need to keep that distance calibrated, no? The only way I think that might work is to use the extruder as the probe. I have seen an implementation, where sensitive pressure sensors where installed between the heat PCB and the glass and they were triggered when the extruder touched the glass.

Edited 1 time(s). Last edit at 05/20/2014 08:04AM by demetris.
Re: Auto-levelling efforts
May 20, 2014 08:27AM
@Demetris: There will be a fixed relationship between the levelling sensor and the extruder. For a given Z_HOME_POS (Z_HEIGHT_MM in my Marlin fork) the levelling sensor will trigger at a particular value of Z. A change in the bed height will trigger the levelling sensor at a different Z value. Referencing the original Z value to the new Z value will give the amount of Z shift. Marlin may not support this scheme but it is something I am considering for my own hardware/firmware/PC host stack.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Auto-levelling efforts
May 20, 2014 08:58AM
The problem with using the hot end as the probe is it usually has some plastic stuck to it when cold and oozing out of it when hot.

Yes the distance between the probe and the hot end needs to be manually calibrated by measuring the thickness of the first layer outline. It varies with temperature as well because the hot end expands about 0.2mm at 185C and more at higher temps such as 250C for ABS. Also if the extruder is demounted and remounted it may need a slight tweak.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 20, 2014 09:03AM
@Neil: I see what you are saying. I am just thinking that the probe cannot be entirely fixed because after probing it has to move out of the way. Based on that, all that movement may cause some inaccuracies to the distance between the probe and the extruder which eventually will influence the Z_HEIGHT_MM value.
Re: Auto-levelling efforts
May 20, 2014 09:56AM
@nophead would you be prepared to share your design (or even a photo) for the Z probe you currently use on your wooden machines? It would be a life saver for those of us who have a sturdy machines made out of MDF.

It seems like normal british changes in humidity cause just the right amount of Z hight alteration to be annoying. Also drying a load of laundry in my flat gives me a 0.05mm change in Z with in a few hours!
Re: Auto-levelling efforts
May 20, 2014 10:32AM
The two machines that I have Z probes working on are not Mendel90's. They use probes with two magnets and microswitch as described here: http://hydraraptor.blogspot.co.uk/2011/04/auto-z-probe.html. They are moving table rather than moving head. For Mendel90 it needs to be much smaller to fit under the carriage.

The design I am working on looks like this but I have not tested it yet. It uses a stainless steel rod through an LM4UU bearing. When it is extended the magnet is attracted to the bearing and closes the gold contacts. When it is retracted the magnet is attracted by an M4 nut with a grub screw in it.





[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 20, 2014 12:10PM
I was thinking of trying to create something like the Z probe you documented on your blog [hydraraptor.blogspot.co.uk]. I was still thinking of using a micro switch.

My plan was to try to make it smaller by using 3 magnets all lined up in a row and use the magnetic field (not just gravity) to provide the pull against the micro switch. The central magnet would be attached to the probe/plunger (think of it being hidden in the plastic disc of your original Z-probe). If the probe is lower the central magnet is pulled down by attraction to the lower magnet (hopefully) with sufficient force to operate the micro switch. If the probe is pushed up a small amount (in normal probing) it would open/close the switch. When you wont to retract the probe you just push it up past the 1/2 way point where it would then be attracted to the upper magnet and hopefully held out of the way while the machine prints. [Hope that description is vaguely comprehensible].

I got stuck on how to mount it on the carriage... I wast starting to think of putting it on top of the wades block and having a very long probe through a hole in the wades block next to the filament path. It would have to magically go through the fan duct if installed. I also thought it would be too long and wobbly. Yours looks much smaller and neater than anything I could come up with.
Re: Auto-levelling efforts
May 20, 2014 12:38PM
The probe force needs to be small because the bed easily flexes with a dial gauge for example. The machines that I have probes on have 6mm aluminium under the glass rather than a PCB. Low force micro switches are expensive and big so I switched to just a pair of contacts. It should be more accurate as you can't get more digital than that and should have close to zero hysteresis.

I think three magnets would give too much force. One magnet and two steel items seems about right.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 20, 2014 01:31PM
I suspect thats true. When I have the dial gauge on the bed I only have to look at the bed a bit funny to make it move by quite a long way.

So gold contacts = pins from a pin header?
Re: Auto-levelling efforts
May 20, 2014 01:37PM
Yes a dual row 0.1" SMT header.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 22, 2014 11:26AM
@neildarlow: the way Marlin does a g29 it resets the Z-offset using the probe data - the at-the-top homed Z is discarded. As long as top-Z-referenced "-1" is physically below the plate and you start the probe above the plate you're good. The GitHub snapshot from your repository did not work out of the box though - I don't remember if the fix was mechanical or via code fix but it only tried to probe for up to 20mm before calling a hit regardless if that was in mid air.

@nophead: to be sure I am not missing anything in your new design - you deploy your probe by hand (I vaguely sense a risk of being misunderstood here) and you use a programmed move to retract it, yes? That is what I understood from your blog on the original design, just want to make sure I am not missing anything magical... Otherwise very neat and inspiring for a v2 of my design. This week I had a demo at another location where I had to move the printer. Sticking it in the trunk I snapped the lifter thread for the probe rod so I am thinking about another arrangement for the top end that protects the rod in the retracted position using a magnet to keep it still.

As for input pins there is the option to use the existing z-stop as the probe signal since the Mendel90 design cannot physically home and probe at the same time. This _should_ also work with Marlin since homing and probing commands start by deploying the probe. It also assumes open-when-untriggered switches and a pull up on the input which I think is the case. I might give it a try for v2.

@ElectroWomble: I went with the "very long probe" approach using a 2mm drill rod (d.o. piano wire is cheaper and would work just as well) and drilled out the printed pilot hole to 2.1mm making it pretty stable and located in the x-y plane. The top "paddle" tends to rattle slightly against a locating reference "bump" though - although that has no bearing on the function. An advantage (IMHO) with this approach is that the probe stays calibrated relative the extruder tip when you remove the extruder assy. Also, nohead is right about the heat expansion - if you want the last bit of precision you want to stick the "set Z offset" command in the slicer startup code so you can tune it differently for e.g. PLA and ABS. If you haven't already you can take a look over here for my current design.

@demetris: your right about things causing the extruder-tip-to-probe-distance to "move"...however this is not so much of a problem since it "just" needs to stay within about +/- 2-3 hundreds of a mm. Which it basically will if you have a descent switch and probe under controlled conditions - i.e. at the same point in the startup code with things at a stable and same temperature. And since the auto levelling removes the plate slant causing differences between right, left, upper, lower part of a test print it is actually pretty easy to get inside the +/- 1 hundreds window if your plate is flat enough.

The switch is a key part of the precision and it is not a given that a micro switch is precise enough - the only one I found that repeats consistently better than 0.01 mm is the one I use. An optical "fork" is also sensitive since it depends on clean power to the led and keeping stray light away. Even nopheads approach with gold pins - good and simple as it is - requires having a handle on the contact bounce.

Edited 3 time(s). Last edit at 05/22/2014 11:32AM by svanteg.
Re: Auto-levelling efforts
May 22, 2014 11:43AM
>you deploy your probe by hand (I vaguely sense a risk of being misunderstood here) and you use a programmed move to retract it, yes?

Yes I pull the probe down before I start the machine and it refuses to start if it is not down. After probing it just moves the nozzle closer to the bed and as soon as the magnet gets past half way it snaps to the top.

I don't think it can be wired to the Z limit as that is normally closed for safety. The probe is also normally closed when deployed, opening when triggered but is permanently open when retracted.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 22, 2014 12:34PM
I cant work out which would be most convenient... having the probe attached to the wades block V having it attached to the carriage? It would be nice to keep the symmetrical air flow from the fan duct.

How repeatable is the Z hight when you take off and reinstall the extruder? ie dose that muck up your Z hight calibration anyway... I would have thought it would depend on how tight you screw on the wing nuts (or there low profile replacement).

When I get a moment I may try to get some crude measurements.
Re: Auto-levelling efforts
May 22, 2014 01:02PM
Yes it varies a bit depending on the tightness of the wingnuts. It also seems to take some time for a new J-head to stabilise in length as they seem to stretch a bit, or maybe the Wades block does.

I always check the first layer height if I remove the extruder, although I do that very rarely, I can't remember the last time.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 22, 2014 06:55PM
Some (not particularly scientific) results:

The spring in micro switches is sufficiently strong to bend the bed by 0.08 - 0.1mm in the middle and 0.06mm in the corners. I attached a dial gauge to the X carriage and pushed down on the bed (2mm glass) just next to it with a small micro switch (the kind of thing everybody uses for end stops with the leaver arm removed) until I could hear the click and then read the gauge.

I then increased Z by 10cm unscrewed the dial gauge took it off and then screwed it back on again (to simulate taking off the extruder). Dropped Z by 10 again and looked at the reading on the guage. Doing this a few times ... out by 0.02 - 0.05mm each time. So you can nearly get away with taking off and reattaching the extruder but not quite.

Would be interested if others get the same results.

Edited 1 time(s). Last edit at 05/22/2014 06:58PM by ElectroWomble.
Re: Auto-levelling efforts
May 22, 2014 07:21PM
Why would you ever take it off though unless replacing the hot end or swapping it for another one?

Normal micro switches need a lot of force. That is why I used a special low force one on my original design.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 23, 2014 05:15AM
You wouldn't. I was hoping eventually to have several extruders with different nozzle size and be able to swap them (change a value in firmware to represent the calibrated offset of the nozzle) and be able to swap them back without having to do any manual calibration (ie just dial in the per extruder offset again.) Not a problem i currently have though.
Re: Auto-levelling efforts
May 23, 2014 05:59AM
[removed due to technical posting error...]

Edited 2 time(s). Last edit at 05/23/2014 06:14AM by svanteg.
Re: Auto-levelling efforts
May 23, 2014 06:13AM
Just following up the possibility of sharing the Z endstop signal with the probe... Unless I am missing something an OR gate would work?

Z endstop	Z probe	out	Z endstop state				Z probe state				Comment
closed		closed	closed	connected; not triggered		connected; retracted			either all ok or short circuited
closed		open	open	connected; not triggered		not known if connected; deployed	
open		closed	open	not known if connected; triggered	connected; retracted	
open		open	open	not known if connected; triggered	not known if connected; deployed
Re: Auto-levelling efforts
May 23, 2014 06:20AM
The state of the probe is open when retracted, closed when deployed and open when deployed and activated.


[www.hydraraptor.blogspot.com]
Re: Auto-levelling efforts
May 23, 2014 08:45AM
I am not sure that a shared signal is a safe thing to do for two reasons:
  1. If bed levelling is not performed, operation should be normal Mendel90 behaviour.
  2. The failure of the levelling mechanism, in any manner, should not impact normal Z-limit switch operation.
Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Auto-levelling efforts
May 24, 2014 01:35PM
i run a I3 but i think if someone gets a 5v solenoid to run on ramps i know you can run one from the arduino with some added circuitry, use the solenoid to push the probe down to operate the probe, im going experiment later with a laser pen and a micro camera that be best way forward be able to use the laser to read the distance based on webcam range finder just be hard to find some code to implement in in my firmware as i know no programming knowledge but ill have to learn sometime or another lol

Edited 1 time(s). Last edit at 05/24/2014 01:44PM by chris33.


Check my rubbish blog for my prusa i3

up and running
[3dimetech.blogspot.co.uk]
Sorry, only registered users may post in this forum.

Click here to login