MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.28k stars 19.24k forks source link

[FR] Scissor-lift Z kinematic #11680

Open Bartolobot opened 6 years ago

Bartolobot commented 6 years ago

Description

My Z steps per mm need to be proportional to the position (like a Scissor Lift) I may have made an altogether new type of kinematics ( Cartesian with a twist). I am not very good at writing code more of a moron still sending morose code through my telegraph. lol.

I'm sure its a simple couple lines of code to calculate the Z motor travel with the actual bed displacement the math is easy enough thanks to the Pythagorean theorem

AnHardt commented 6 years ago

Instead of modifying Marlin, think about a preprocessor. A, for example python script, reading in your g-code, searching the z-values, modifying them with your formular and writing them back to another file.

Usually this is much more time efficient (for you) than a proper integration of a new cinematic into Marlin. DELTA, SCARA, COREXY all begun that way.

AnHardt commented 6 years ago

Would make me wonder if the relation in a scissor lift would be linear/proportional. Please reinvestigate.

a² + b² = c'² where c is constant. (Pythagoras)

pythagoras

'diff(b(a),a,1)=-a/sqrt(c^2-a^2)

Palatis commented 6 years ago

I think implementing a new kinematics will be more appropriate. else we can just take preprocessor for DELTA and CoreXY, too.

the point is to run the same piece of `generic' gcode across different machines they should behave the same.

thinkyhead commented 6 years ago

…like a scissor lift…

Is it similar at all to the Scott Russell Linkage as used in the Kappa?

AnHardt commented 6 years ago

For example

image

Yes, the nonlinear math should be about the same. Here the rectangular triangle is 1/4 of the system. In the Kappa y is adjusted by the difference of the two z-axis. (y² + (z2 - z1)² = constant² ) And z is the lower z-axis (z1).

thinkyhead commented 6 years ago

Interesting… https://www.wikihow.com/Find-the-Height-of-a-Triangle

Bartolobot commented 6 years ago

Thank you for all the responses from the participants. Sorry for my slow reply. Yes Were on the right track ! I like the suggestions I'll try to answer each in order

From AnHardt:

A, for example python script, reading in your g-code, searching the z-values, modifying them with your formular and writing them back to another file

. So this is something I would have to add to my gcode after slicer and gcode generation? Not sure how to do that? what would the script look like?

searching the z-values

This would be from feedback device attached to my Z motor? correct? I do have a rotary encoder physically attached to the z stepper motor . But I have not figured out how to get position feedback from a rotary encoder implemented into marlin! Or even electrically connected to my ramps 1.5!

next question

Would make me wonder if the relation in a scissor lift would be linear/proportional. Please reinvestigate.

I'm pretty sure its proportional that is its a curve as the higher the lift gets the actual displacement decreases for a given unit of measure that the z motor moves.

From Palatis: That's what I was thinking Just implement a new kinematics! but I'm no expert and open to try anything

From Thinkyhead: Yes I Guess it is like Scott Russell Linkage although not quite how it was used in the Kappa AnHardt Example looks right I included a hand drawn sketch of my machine with some dimensions Excuse my chicken scratches but I hope it Illustrates the design adequately enough to answer some questions.

20181011_113944

Where do we go from here?

Bartolobot commented 6 years ago

Here's a few actual images of my machine! enjoy!

20180813_001049

20180813_121212

Bartolobot commented 6 years ago

I think the Graph would look more like this 20181014_033811

thinkyhead commented 6 years ago

Kinematics is simply solving a right triangle.

You know the length of the scissor arm, C. You know the height you want, B. So you just need to solve the base length, A.

A = SQRT(C*C - B*B)

For example, if the scissor arm is 1000mm and you want to move Z to 20mm height:

A = SQRT(1000*1000 - 20*20)
A = 999.799

If B is already some length (e.g., 20mm) when Z=0, simply add that length, Z + B.

A = SQRT(1000*1000 - 40*40)
A = 999.199
Bartolobot commented 6 years ago

Right, the math it's self is not the question here. The question is how do I implement this equation into my marlin firmware. I don't write code. So I haven't the slightest Idea How Or where to do this? You see I know what the problem is. And I know what the answer is. But I don't know how to write it into the code and run it on my machine.

thinkyhead commented 6 years ago

Sounds like you need to hire a programmer to help you. Be sure to pay them well for their time. Good programmers are worth their weight in gold.

Bartolobot commented 5 years ago

Thinkyhead, Thank you for the advice. but I don't think a programmer is really necessary I'm not making the machine to market or gain any profit from it. As you can see I have been open with all the details And its here for anyone to use in their personal projects. This is just a hobby, I do all the work myself and am happy to share my Ideas with the Marlin community. and I really can't afford a programmer. I only ask for guidance if you are willing to help me and possibly anyone else with similar Kinematics design features. and open the doors for out of the box Thinking for new improved designs! Isn't that what its all about here, I mean if you feel your advice is valuable then write a book! I may buy it! Otherwise, I would appreciate any guidance On where I would implement something like what you described in your previous post.

AnHardt commented 5 years ago

I thought a bit about your kinematic. I see more and more problems. In a real system you neither can reach a = 0 nor b = 0. When you hit an endstop or the hard limit you are at a-d=0 or b-e=0. You have to know either d or e very exact to find out where on the curve you are. Adjusting endstop is very critical. Much more difficult than in a linear system because not only the absolute position but also the steps/mm at that point is affected. So if you don't get it right linearity is messed up.

Scissor lifts are able to lift big loads. But they perform best near their maximum height. At the bottom they perform badly, move a lot, but have less power than at the top. Beds of 3D-printers need the opposite characteristic. The load is biggest when the bed is far away from the nozzle - the part has grown up to there and is heaviest. When lifting the nozzle a progression seems not to be useful at all, because the load is constant.

Convince me of the advantages of a scissor lift compared to a conventional solution.

Bartolobot commented 5 years ago

To Anhardt or anyone willing to help. Well, the primary advantage overall is it economically financially and productively makes having a huge build area (bed) more feasible and/or Multiple Build areas some sections may be heated or cooled with adhesive or not, without the need of clearing the plate for subsequent prints and this remains to be seen hopefully allowing it to print for very long periods of time on multiple objects unattended, (I do have a webcam on the list of additions) My build area is around 900mm x 460mm x 500mm ! When considering such a sizeable build bed it becomes quite evident that eliminating the substantial reinforcements and equipment needed to move and keep the bed both rigid and level, While simplifying the overall design makes sense. With the one exception, of course, the Scissor! and I did consider this being somewhat of an issue but I did not imagine how bad it would actually be, I figured shouldn't be too hard just tweak a couple lines of code and well be on our way, On the other hand and (before I list the several more advantages) lets consider what it would take to make a bed of that size move and stay level and ridged. 1) The cantilever design although an efficient design it has many inadequacies especially the bigger it gets the worse the problems are diminishing quality of print for large prints as weight and distance increase print quality quickly follow suit (I have at least Half of this issue completely crushed out of the water as my design offers limitless weight and size constraints here in this aspect) And so the liner rods and bearings to support a cantilever bed to a height of over 500mm would have to be huge! maybe 2 inches thick solid hardened tool steel or more Also, with all other configurations that I've seen out there, the Printer Is Inherently as big as its build Volume plus the support structures required to achieve its build volume. That is if you have a build volume of 250mm cubed that means your machine size is fixed around 300mm+ cubed + any external control panel, filament spool Where my design starts very compact and flat everything inside including spool. I even managed to keep one side completely open and accessible from one side of the top along the whole top including the whole side down to the bed. No matter how high the carriage position, Or can even be pushed back clear of the print allowing the carriage to return home and down to completely expose the large print on all sides not only an attractive feature that with the addition of a conveyor belt as a bed can move finished parts off and into a bin allowing for a continuous production line. Making my Design a Large format printer that's portable, storable and out of sight if need be- Under your bed! Let's consider another more effective design for A large format printer that's no longer portable or storable and you can't hide it from your destructive nephews! That is a Large and expensive Lead screw at each corner and ......its complexities..... 4 Lead screws, 4or2maybe1 z steppers but fewer motors means more linking mechanically and increase in hardware needed to synchronize and maintain precise movement. I did almost go this route inspired by my rather Stout "Dewalt DW735 wood thickness-ing Plainer I have owned a few and used many The best design I've seen in a small home shop Plainer ever! It Uses 4 -1"inch lead screws at its corners Linked by a chain and sprockets that simply wraps around the perimeter engaging the sprockets on only 25% of the teeth to move all smoothly,consistently and with surprising accuracy with the crank of a wheel capable of slicing very thin 1/64" increments off a block of wood at the edge of three rotating very high speed blades that create enormous strain loads and it manages to eliminate snipe at start and end of each piece, that almost all others are plagued with. I apologize if it sounds like a dewalt promo. But if all that can be done with a much more demanding woodworking tool, I know It would make a great 3d printer but I'm afraid its a bit overkill and over exceeds the necessary capabilities. so from there, I began to simplify the design going to a 2 motor 2 lead screw design was next. Until a scissor lift design was whittled out to the most robust and simple also sleek! I think you get the picture right? Scissor Lift Bingo! easy with lots of added benefits only one catch Modify the code. I hope you'll agree with me That modifying the code just a tiny bit has got to be outweighed by orders of magnitude by these other alternatives!

Alleged Issues, and rightfully worrisome but my cup of tea. I have already brewed and enjoyed with a grain or two of sugar and honey.

Let me assure you the Issues you mention Have been addressed and are in fact not an issue with my design 1) I do have hard stops and end stops incorporated on all axis 2) with the addition of a rotary encoder attached to the Nema 23 Z stepper, at the moment only mechanically attached and working Just haven't figured out how to wire it to my Ramps 1.5/then how to use the feedback to make position corrections should that be necessary mid print. 3) Of course Homing the machine is imperative prior to starting a print and as long as No! Z steps are lost or incorrectly executed all will be copacetic Furthermore this starting point is the bottom of compression and should always return to that exact spot in relation to the nozzle/bed distance every time. end stops don't get harder than a completely compressed scissor lift. 4)Your right about the performance increase at the maximum height and increased load at the bottom This has been mitigated with the addition of heavy spring energy that works with opposing force to help equalize the performance. at the start, they have maximum energy stored at the bottom start pos. and at about mid-height, they have released all of the kinetic energy back into the system as they are only needed/ engaged in full force at the start where the loads are very high. This type of system can be tuned accurately and reliably. I might add that a NEMA 23 high load stepper with acme ball lead screw offer a considerable mechanical load/advantage on their own. One more thing to add on this issue also applies to the next is usually on a scissor lift you will have multiple stages more than one X stacked on top of each other. This would compound both the advantages of performance and disadvantages of stability loss for which I have no need for both so my design has only one stage. 5) Rigidity, furthermore I have given the scissor mechanism a great deal of thought as to this issue in order to keep the build area free from any limiting obstructions in the way of links or supports and utilizing the advantage of freedom of mass in this section of design I made the the "X" structures On either side with a double wall box construction of 10 AWG steel And linked to each other with heavy corner guests or Triangular pieces with holes for weight reduction but more of a aesthetic thing, one on each side All connected with a 5/8" all thread rod through it all from side to side completely adjustable with heavy 5/8" Nutts between the X's and Guests! The guests and X" are seam welded to each other on one side and precision drilled to maintain continuity Eliminate twist and enforce synchronicity of movement on both sides Together with the linkage at the lead screw and lead screw attachments with anti-bend supports all work together to eliminate most looseness and backlash.sliding components are fitted with PTFE Teflon glides or bearings.

More advantages, substantially less need for costly and constant leveling of the bed surface. with less setup time and Better print quality while conveniently keeping most wiring safe and stable (no repeated bending of conductors in the bed setup ) prolonging wire/terminal life. Stable Environment under the bed making upgrades and additions easy and worry free of added weight loads on any moving parts. making the electronics area concealed and controlled as far as cooling plus dust and debris from extruder can be kept out! So more than 50% of the entire mass Is under the bed keeping the upper half Sleek, Clean, Compact, and most important of all Blinding FAST Carriage movement! Has been proven only while traveling not printing I kid you not the human eye can not even keep up while executing a non-print travel move albeit this is mostly irrelevant it shows some promise for the desired print speeds looking forward to the all systems go test! (limited only by thermal demands and extruders ability to keep up at a stable rate) I will be looking at improvements to the current convention on these limits with regards to my current overall speed effectiveness and limits I will mention print artifacts prevalent to all at high speeds but am confident that my machine will perform better than many consumer market printers in that respect. I have More but I think I made my case. A rather Lengthy reply so I rest my case. And wait for the verdict I appreciate any help or guidance just point me in a fruitful path to never-ending Plastic Sky's And I will not hesitate to do the same for you my fellow swordfish Anglers!

                             Best Regards
                               Bartolobot 13.

I should Issue a Warning with such a design for anyone attempting to construct a machine based on the scissor lift mechanism. The danger of losing a finger while assembling the scissor lift. When the lift is free to move unimpeded by the motor attachment and lead screw engagement. Which when properly done greatly reduces the danger to almost zero and is pretty safe at this point unless you are an infant, or all of these blind, deaf, slow and numb or in other words intoxicated. But up until it is fully assembled the danger is very High and will severally injure your fingers if not sever them completely off should the full brunt of the weight come down on misplaced fingers Operative word here Scissors Like huge heavy garden Scissors With an indiscriminate 200lbs Gorilla behind them! Let me tell you from first (whole)hand experience that gorilla sneaks up on you and snaps given a chance And he came so close to taking my thumb off. If it weren't for a little precaution taken earlier on my part and a little plastic part I purposely installed backward to limit the travel in the slot where the sliding part links to the lead screw and the other side. When a wood piece I had propped up and supporting all the weight suddenly pops out and outta the way just as I place my thumb in the worst possible place close to the center. My X design actually nests inside each leg and overlap while the bottom half folds down into the frame/main track structure very tightly and I have no doubt the thumb would have come off. It came down with a snap and stopped just as it came in contact with my skin. I felt no pain at all not even a pinch Soo Lucky!

Bartolobot commented 5 years ago

Did someone say elaborate my point? Forgive me. Anhardt, Thinkyhead

I know it's lengthy. I'm aware of my poor grammar and run-on sentences from hell

But please bear with me and I'll try to keep it short

If I was blessed with any talent I know it was in the field of mechanical design and problem solving, If only I could say the same for writing and understanding code.

thinkyhead commented 5 years ago

The core Marlin team is busy for the next few months working on bug fixes, cleaning up code, polishing existing features, and preparing 32-bit support, so we don't have time to put into this issue. I recommend the following resources to ask for advice and recruit help:

Bartolobot commented 5 years ago

Okay, I will do that thinkyhead Thank you for that direction, I am familiar with some of these but I have not introduced myself with the exception of Tom his videos are so good! but he sticks to popular fauna mostly I believe I proposed my issue to him in the form of a comment on one of his vids but it did not invoke a response, will try him again that boy is sharp! and the others, OMWThereNow>>>>>>

AnHardt commented 5 years ago

I do have a rotary encoder physically attached to the z stepper motor . But I have not figured out how to get position feedback from a rotary encoder implemented into marlin!

Rotary encoders usually do not help to find a absolute position, but they can tell how far it is between two points (in encoder steps unit) if you count their steps. Mounting the encoder to the z-stepper (a) will only help to find out if the stepper lost steps (comparing stepper steps with encoder steps). Much more useful would be to know about z (b). With comparing delta a to delta b at 2 or 3 points one could set up the transition curve properly.

If you get that few positive feedback (besiteds of "Uh - that looks sollid.") , you are probably the only one for whom a solution of this problem is useful. For us GPL-programmers it's like a 'public amateur crossword puzzle contest' without a concurrent, where just the organizer is watching, but the spectators are absent - likely unsatisfying.

Bartolobot commented 5 years ago

The basic problem I need to solve first and foremost is the Z step correction of diminishing returns with every z step progression relative to position . I would just like to know what part of Marlin firmware would have to be modified to correct the steps Assuming I have an absolute starting position every time after homing, No steps are lost along the way, and Position is known if we have all that, Then what file or part of marlin is z steps calculated if that was all I needed to do? And I do understand that those things will need to be dealt with to have reliable results but I need to start somewhere? a simple request to start for my comprehension of what the current code may look like and maybe I can gain insight as to what might be adapted or modified perhaps even implement a fix myself and test and learn that simple." You never Know man I could be earnning um, learnning um, or even Burnning um!" anyone Know?

Bartolobot commented 5 years ago

at AnHardt

Yes, I know this and agree with you. But, Shouldn't the system work just like any other printer? without an absolute position sensor in a relative way not absolute considering of course A Correct formula mathematically is codified into marlin for correcting the displacement issue in my z-axis and give that a go In the meantime, I'll be looking at those magnetic position sensors and have one the way here soon.

boelle commented 5 years ago

@Bartolobot still working on this?