Today, I live in the future. For the first time, an in-house Printrbot Simple has used Marlin’s official code (plus some voodoo from Laine – more on that in a minute) to auto level the bed and print a cube on a severely slanted print bed.
It Doesn’t Look Level?
Auto leveling isn’t exactly what it sounds like. Instead of using motors to actually make the bed perfectly level, it uses software and the Z endstop (microswitch) to probe the bed, map the incline and print perfectly perpendicular to the surface even on a bed that ISN’T level. We decided to try a dramatic incline to illustrate the power of this feature.
Work To Be Done
The bottom line is that Laine got the code enabled and it does work. It is not without challenges, though. The first wall we faced was that the chip we use in the Printrboard (Laine’s design) does not have enough free memory in it’s current form to add the code it needs. We ended up stripping out Ultipanel to make room. We think trimming less often used features from Ultipanel may allow enough room. We will be posting the source in case anyone wants to help tackle this problem.
This may be an opportunity to diverge from ultipanel a bit and go through the menus to trim out the confusing stuff. I have marveled at all the options, but in the end, it needs an ease of use facelift, in my opinion. I will go through the menus and propose the bear minimum. With firmware and software, it is common to rush in and start hacking, patching and commenting out unneeded parts to get to the goal in the fastest possible way. I would really like to take great care to do a good job and not leave any mess. Adding clear comments, removing all unneeded mess is best practice. Laine mentioned that his run and gun to get bed leveling to work was a bit messy and he wanted to clean it up before posting.
Another obstacle we faced with the Printrboard was the fact that we have the LCD panel taking up pins, and we have the Extrudrboard taking up pins… there are literally no more pins available for a servo. I actually never wanted to use a servo because I think a clip-on option will receive wider adoption. I welcome anyone to comb through our code and figure out a way to add servo support. The code already there in the Marlin branch has it, but we need to figure out how to enable a pin and use it. I figure if people don’t have either the Extrudrboard or the LCD, people could grab pins there.. but it could be confusing.
The manual clip-on mount for the Z endstop allows anyone with a printrbot to play along. Eventually, I recommend two Z endstops in series. The microswitches are normally closed, so when wired in series, either switch opening will trigger a stop. The idea with two is that if the probe switch fails or you forgot to clip it on, the normal Z endstop switch will at least save the hotend from crashing into the bed. So now, the challenge remains to design a clip-on mount for the Z probe that allows clipping on and off with perfectly consistent height. You want to be able to use it whenever you want without any fuss, or what’s the point, really?
Since we ended up going for a clip on approach, AND we wanted our solution to be friendly to all the hackers out there, Laine added a new Mcode feature… a programmable XYZ probe position relative to the hotend tip. This will allow you to set up whatever probe mount you want in whatever position you want. Initially, we had a stick zip-tied to the hotend, but realized it was off to the side and may not be as accurate so we moved it to a clip-on that reached directly under the hotend. Our offset was X2 Y-7 Z-22. A positive or negative coordinate is used depending on position, of course.
The new feature worked great and makes it easy to try a variety of approaches without too much trouble. The people wanting to try the servo approach should be able to take advantage as well.
Printing on an Incline
Our example was ridiculous, but illustrated the feature. Up until now, the Z axis stood still until it was time to move up a bit and print the next layer. With this feature implemented, the Z moves up and down in parallel to the print bed surface. This is actually hard to see happening when the bed is only of a fraction of a degree, but was pretty obvious when the bed was at a severe angle – nice for the video.
This brings up an important point: what about backlash in the Z axis? Well, the Simple has a plastic nut that we make ourselves and there is no perceivable backlash. If you have a Simple, or any other Printrbot, with a metal nut – I would expect some backlash. The Printrbot Original, Plus and LC have notches to add a second nut and a spring that act as a do-it-yourself anti-backlash nut. Your experience may vary, so be ready to deal with this issue.
You can see me in the video try to adjust the Z height for the first layer with some difficulty. I was used to being able to turn the Z Acme rod to make fine adjustments, but the Z motor held to tight once it started printing that I couldn’t easily adjust. I had to wait until it headed uphill and just hold it and keep it from turning. It was strange, but gave me confidence that the motor and the Z axis was up to the job!
My thanks to Laine for the hard work. I consider Printrbot very lucky to have such a talented guy on the team. To add to the excitement, while we were working on it, he fired up his Tesla coil and entertained us with midi music and lightning. Nice touch.
Anyway, auto leveling is out of the gate, but not ready for prime time yet. We will design a solid solution to sort the probe out and release the files – hopefully an STL that works with a variety of Printrbots. We will post everything to Github so everyone can play and see the documentation on the new features. As soon as we shoe-horn the code into our firmware without giving up the LCD, Extrudroard, or any important features, we will roll auto bed leveling into production with all our bots. Hopefully, we will get it all working in time for the 3D Printshow in NYC and the unveiling of our new (all-metal) Simple.
Happy Printing (and auto-leveling!)