M2 Auto-Leveling

The place to discuss your hardware and software/firmware modifications...
uslimey
Posts: 5
Joined: Tue Mar 24, 2015 9:31 pm

Re: M2 Auto-Leveling

Post by uslimey » Wed Mar 25, 2015 3:58 am

ednisley wrote:
rpollack wrote:participate in the development
Color me interested...

Gotcha 1: mechanical backlash

The Z axis microstep is 1/400 mm = 0.0025 mm, but the backlash on my M2 runs around 0.01 mm. I'm certain that will vary with the machine's age, due to wear from the load on one side of the threads in the brass leadscrew nut.

Gotcha 2: Marlin numeric resolution

As nearly as I can tell, the Marlin G-Code resolution extends to 0.001 mm, so you can't command steps with finer resolution.

Of the two, I think backlash poses the larger problem. Right now, the platform on my M2 remains level within ±0.1 mm from side to side without much attention, so the corrections on any single command will be very close to the backlash limits. As a result, the position error will be as large as the correction and you won't see any actual improvement in the results.

I think much of the motivation for auto-alignment comes from the desire to get M2 quality from unstable hardware, but ... that's why I have an M2. [grin]

Some measurements I made a while ago may be useful:
http://softsolder.com/2014/03/06/makerg ... h-numbers/
I am not sure if the error you see is truly a backlash issue, or simply a micro stepping issue.... There's a fair amount of mass on the bed. One would assume that would make it favor one side of the lead screw all the time... micro steps tend not be evenly spaced, hence the micro stepping could be responsible... My bigger concern currently is the repeatability of the home sensor... Mine is all over the place....

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: M2 Auto-Leveling

Post by ednisley » Wed Mar 25, 2015 1:40 pm

uslimey wrote:micro steps tend not be evenly spaced
Yabut: if two successive microsteps didn't move the rotor at all, that'd be an error of only 0.005 mm. Typically, the error is give-or-take a fractional microstep around the nominal position, so the actual error will be much, much smaller than the mechanical backlash.
repeatability of the home sensor
Nobody likes my solution to that problem:

http://softsolder.com/2015/03/10/makerg ... is-switch/

But the bare switch holds the platform within ±0.02 mm and doesn't depend on fiddly adjustments. If you're not using a V4 hot end, you can print that red plastic block, then tweak the starting G-Code a bit to make it all work. Measure the offset, feed that into the G92 instruction in the start G-Code, fine tune the offset with an actual print or two, and you're done.

Finally_Joe
Posts: 2
Joined: Wed Feb 25, 2015 4:47 pm

Re: M2 Auto-Leveling

Post by Finally_Joe » Wed Apr 01, 2015 4:40 pm

Hello, 3D peops. I went ahead and installed the new Auto-Leveling hardwares and it actually works. I used an Omron micro-switch, the type without the hinged lever. The spring that I used was the tapered compression spring in the spring assortment kit from Home Depot. The spring assortment is like 4 bucks, maybe 5, and it has a bunch of small-ish to medium compression and extensions springs of varying diameters, heights, and forces. Neat assortment to have around for projects and whatnot. I used an M3 by 22mm hex cap screw to trigger the micro-switch, it is from McMaster. The guide pin that I used doesn't really do anything because it's too slim - I'll swap it out for something better in the future, I hope.
So the Auto-Leveling worked after programming the firmware provided. I only changed the distance Z offset - mine is around -9.6mm. It's not quite correct, I need to re-measure. To make it Auto-Level before a print, I added "G29" directly after the "G28" homing command in the "Starting G-Code" in Simplify 3D. I guess if you home your axes after running the Auto-Leveling command, the Auto-Leveling measurements will be lost - so always home before auto-leveling. Oh, I also moved my Z-min micro-switch to the bottom of the printer and moved its connection from the Z-min connection on the Rambo to the Z-max. I set it so that the bed barely triggers it in its "resting" position. It would be nice to come up with a way to have the Z-Probe automatically move out into its probing position and go back to its resting/printing position after the auto-leveling is complete.
It's wired up so that the Z-min signal input is LOW when switch it pressed and HIGH when not pressed. Also, originally I had too much spring tension and it was pushing the bed down during my initial testing and offset measuring, so probably use as little spring tension as possible. The LED lights up when pressed. I used a resistor (232 ohm) and a LED that was lying around and a chunk of this awesome surface mount proto board from Busboard Prototype Systems (Amazon, Digikey). It's not pretty, but after it proves it's function for a few more prints, I'll consider forming it better. I only did 1 print so far using the Auto-Leveling... 1 for 1 so far.
Here are some pics: http://imgur.com/a/Iz9ss

-Joe

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: M2 Auto-Leveling

Post by jsc » Wed Apr 01, 2015 7:56 pm

Great! Try a print with the bed obviously unlevel and see how well it compensates.

nelsond6
Posts: 16
Joined: Wed Jan 07, 2015 9:36 pm

Re: M2 Auto-Leveling

Post by nelsond6 » Thu Apr 02, 2015 8:35 pm

Joe, does this automatically set your z height then? Any chance you could post a video of the auto-leveling process in action?

-Dan

Finally_Joe
Posts: 2
Joined: Wed Feb 25, 2015 4:47 pm

Re: M2 Auto-Leveling

Post by Finally_Joe » Mon Apr 06, 2015 4:25 pm

nelsond6 wrote:Joe, does this automatically set your z height then? Any chance you could post a video of the auto-leveling process in action?

-Dan

Yes, it does automatically set the Z-height. It'll set the Z-height based on your X,Y, and Z measurements. You can put them in the firmware or set them with the M851 command (example: M851 Z-9.5 ) and do an M500 to save to EEPROM. Make sure your X, Y, and Z offset measurements are as accurate as possible. I'm referring to the distances that the Z-probe is from the extruder nozzle. It'll probably take a few tries - I'm still trying to get the perfect Z-offset. I've just using G1 commands to measure the distances by moving in small increments and keeping track of my moves. I'll see about putting up a video later. Maybe I'll have to upload it to the 'tubes.

nelsond6
Posts: 16
Joined: Wed Jan 07, 2015 9:36 pm

Re: M2 Auto-Leveling

Post by nelsond6 » Mon Apr 06, 2015 5:58 pm

Thanks Joe. Can you post a picture of where and how you relocated your z-min micro switch to the bottom of the printer. That's the part that is confusing me. It looks as if Josh is using a optical switch instead of a mechanical one.
-Dan

triddle
Posts: 3
Joined: Thu Apr 02, 2015 7:25 pm

Re: M2 Auto-Leveling

Post by triddle » Tue Apr 07, 2015 2:20 am

I have been thinking about this also, but I have a different approach. Instead of compensating for the bed not being level, I have been thinking about using some sort of arrangement of small servos to actually turn the three leveling screws and actually level the bed. You would need some sort of switch mounted to the extruder assembly and be able to retract it out of the way when printing. The procedure to level the bed would be as follows:

1. Home Z
2. Lower the build platform by some known amount that is convenient for the leveling procedure.
3. Move the extruder mounted bed leveling switch into the measuring position with a servo. Keep in mind that this switch does not have to be located at z=0, any convenient z location can be used.
4. Move the switch directly over the top of one of the set screws at 102.1,77.5.
5. Use the servo to slowly turn the leveling screw until it closes the switch.
6. Move the switch over the next screw at 102.1,177.5
7. Use the servo to slowly turn the next leveling screw until it closes the switch.
8. Move the switch over the final screw at 152.1,127.5
9. Use the servo to slowly turn the final leveling screw until it closes the switch.
10. Possibly make another pass around the 3 screws for fine tuning, but this may not be necessary in practice since we are measuring directly over the leveling screws to begin with.
11. Retract the bed leveling switch out of the way.

Then assign this firmware procedure to an unused gcode command so that you can call it in the start up script.

With this method every print would start out on a truly level bed. Bed leveling would just take a few extra seconds at the beginning of the print. It will also work just fine with a dual extruder set up since the bed is actually level and will be level for both extruders.

I am still just in the brain storming stage and haven't actually looked to see how you might mount the servos under the build plate. I imagine there is probably a little room under there for some small servos. You shouldn't need a lot of power to turn the screws. Of course the current screws would need to be replaced with hex bolts so you can capture the head and turn it with the servo.

I know there are extra pins on the RAMBO, but I have no idea if there are enough pins to drive these servos. A second Arduino might be necessary for prototyping.

rsilvers
Posts: 185
Joined: Wed Apr 09, 2014 11:07 pm

Re: M2 Auto-Leveling

Post by rsilvers » Tue Apr 07, 2015 2:40 am

I was talking to a guy with an over $2000 well-regarded printer, and he says that he has to set his Z height and confirm level every few prints. I have only leveled my machine once since the first time in 14 months.

Bratag
Posts: 438
Joined: Wed Jan 14, 2015 5:33 am

Re: M2 Auto-Leveling

Post by Bratag » Tue Apr 07, 2015 8:13 pm

rsilvers wrote:I was talking to a guy with an over $2000 well-regarded printer, and he says that he has to set his Z height and confirm level every few prints. I have only leveled my machine once since the first time in 14 months.
The M2 is very stable level wise compared to several other machines I have owned. I think a lot of it is down to the frame the bed is mounted on and uses to level. The other two printers I used both had sprung bolts on the corners which were used to level. The issue with them is that they move and throw the level of the bed off over time.

I have levelled my bed a couple of times since having the M2 - but that was mostly because I had a couple of prints which needed absolute level across pretty much the entire bed.

Z Height I dont touch much unless I change my resolution. If I am going from .25 to say .10 then I may need to adjust the gap a little .

Reminds me I need to post the machinest tool attachement for Jims E3d fan mount.

Post Reply