Auto Squaring, My axis is hella square…

New Home Forum Mostly Printed CNC – MPCNC Hardware Development – MPCNC Auto Squaring, My axis is hella square…

This topic contains 130 replies, has 30 voices, and was last updated by  Jeffeb3 2 months, 2 weeks ago.

Viewing 30 posts - 61 through 90 (of 131 total)
  • Author
    Posts
  • #43374

    Ryan
    Keymaster

    This was done with 1.1.5 I believe but I am done chasing those updates for a while. They were supposed to have done a feature freeze while marlin was switched over to a new framework (2.0 HAL) of some sort but, there are now there are two very active branches of marlin. Every time we do an update some sort of weird issues arise. I haven’t seen any big updates worth the hassle. Have I missed something?

    #43497

    UnLtdSoul
    Participant

    OMG !!!

    I was just about to sit down and try to tackle this myself,    but first decided to take a look at the website to see if there was a later update to Marlin before I started hacking.    Wow, Ryan,   fortunately for me,  you beat me to it.

    I will download the firmware immediately and try this out – AFTER Irma –   I am in FL, and Irma has promised to cause us a lot of trouble here this weekend.  Who knows how long we will be without power.   Amazing how dependent we are on electricity in the modern world.  When the power goes out we will have   No AC – no water –   No PC !  no 3D printer and No MPCNC !!!!  OMG OMG OMG – what in the world am i going to do?    So, will test this out later.

    I have been using XYZ limit switches since I built this – like 1 – 1/2 years ago.   I know you kept saying it wasn’t needed, but,  I couldn’t think straight without using them.   To me   it had to have a Home position.     I had been, and still am, Homing Z to the max,   so it moves entirely up off the work area when i send G28.

    For squaring it, i had put blocks on the opposite sides of the limit switches, so i could skew the axis off by hand – do home and the side would hit the block first,  grind the motor until the other side hit the limit sw.  That has been working,  BUT, I use 84 oz steppers, and ever since wiring them in series where they get the max power,   I really don’t like the idea of the motors Ramming the block on the legs  – it is bound to eventually throw things out of wack.   But, it had been working.   It will square when it homes –  IF the axis are skewed in the direction that it will hit the block first.   If the carriage skews the other way,  and it hits the limit sw first,   then it will be Out of Sq,   which was a bugger that has been a pain for a while, as i would change bits and forget to skew it in the right direction first,  and wind up losing a complex cut.

    I am currently cutting 16 pieces both top and bottom making a Core master for a mold, so i need perfect alignment each time – and i have 2 bit changes on the top side (3 bits altogether, a rough cut, final ball nose, and then run another end mill to square up some of the rounded areas the ball nose leaves)   And, i wasted 3 pieces because I forgot to align.

    I was so fed up with my forgetfullness I decided to tackle the auto align with separate stepper control and switches,    and Thank God,   you already did it for me.    Thank you Ryan.

    But, i do mine just a bit differently.  I have Z set to Home to Max,   so it moves it all the way up off the table and hits the max end stop.        Just last month I finally added the Zero Plate.        The way I do this, is I use the Z Min as a Z Probe.  I lay down the metal Zero plate, then by hand move the carriage over the piece,    then send G30 to the CNC from Repetier Host.  G30 does a 1-time Z-Probe and it reports the Z value on the Marlin LCD screen.  So, I subtract the thickness of the Zero plate and put that number into the gcode that gets sent.

    On the X and Y sides of my spoiler boards I have a small raised edges that are squared to the X Y axis,    I have cut a board in the shape of an L that is 30mm wide on both the X and Y sides of the L and i place it in the corner so the outside edges are up against the outer raised edges on the spoiler,  and then I place my work piece to square up with the inside of the L – and use my hold downs to hold the piece and remove the L alignment template.    That way, the Zero location of my work piece is always at the X Y location of 40, 40 (mm).

    Here is my gcode header:

    G28 ;  homes all axis to the limit sw’s

    G0 X40 Y40 F6000

    G0 Znnn  F2000 ; where nnn is the number i read off the Marlin screen after doing a G30 – minus the Zero plate thickness

    G92 X0 Y0 Z0 ;   this now sets up the new Zero for all axis,   the new 0 location is actually   x40 y40 znnn (the top of my work piece)

    With this set up I get very precise repeatable cuts,   as long as i have square-aligned by X Y axis before i start –

    And, at the end of the cut I send G28 and the Z axis moves to the Max height before the X and Y zoom –

    Now, once i add the Auto Align,   this will be a real working system.

    BTW,  yes, those are my rapid move settings.  Remember, my build uses 2 pipes screwed on top of one another for the X and Y gantry – so it is a lot more stable,  and i use 84 oz steppers,   so it has ok power.   The Z uses an 8mm lead screw and I build a counter weight on it with a pulley,  to counter the weight of the spindle, so the Z stepper can run faster, and the spindle doesn’t go crashing down into my work or table if the stepper power turns off.    This added 5 lbs to my Z axis gantry,   but, the X Y axis moves very well with the extra weight.   I am contemplating putting on a larger Dewalt 611 (1.25 hsp) OR,  when i can afford it, go with a 1.5k water cooled spindle.     When I run a 3mm ball nose, currently i am running it at 2500 mm pm     but, cutting red oak or cherry    and have ran it even up to 35oo, but, I feel that is pushing it too much.  I was cutting with the 3mm ballnose on cherry and poplar without doing a rough cut first, and it works,  but, if i use a 3mm straight bit, they tend to break if the wood cut is too deep,  and the tappered bits – i don’t want to ruin them, so i have gone back to rough cutting first.

    BUT, as soon as i get to it, i will put a closed loop speed control on the DW660 – I have all the parts, the circuit,  and already have an infrared RPM sensor mounted on the DW660 –   I read on a different CNC site that someone put a closed loop speed control on their DW660 and they said they can now cut with 1/4 bits with ease,   that it really makes the DW660 a lot more powerful at slower RPMs,    so i will try that first.

    #43500

    Ryan
    Keymaster

    I’m sure there are still some kinks but it seems to work well enough for now. I am trying to put more time into it in the next day or two but I have to figure out Git first.

    I will download the firmware immediately and try this out – AFTER Irma –   I am in FL, and Irma has promised to cause us a lot of trouble here this weekend.  Who knows how long we will be without power.   Amazing how dependent we are on electricity in the modern world.  When the power goes out we will have   No AC – no water –   No PC !  no 3D printer and No MPCNC !!!!  OMG OMG OMG – what in the world am i going to do?    So, will test this out later.

    Holy crap batten down the hatches. I hope it all goes okay for you down there, that thing looks nasty. Have the cnc start carving you some helmets just in case.

    For squaring it, i had put blocks on the opposite sides of the limit switches, so i could skew the axis off by hand – do home and the side would hit the block first,  grind the motor until the other side hit the limit sw.  That has been working,  BUT, I use 84 oz steppers, and ever since wiring them in series where they get the max power,   I really don’t like the idea of the motors Ramming the block on the legs  – it is bound to eventually throw things out of wack.   But, it had been working.   It will square when it homes –  IF the axis are skewed in the direction that it will hit the block first.   If the carriage skews the other way,  and it hits the limit sw first,   then it will be Out of Sq,   which was a bugger that has been a pain for a while, as i would change bits and forget to skew it in the right direction first,  and wind up losing a complex cut.

    That is how the mini-rambo guys will need to do it (for now) with one axis and the other should square up nicely.

    But, i do mine just a bit differently.  I have Z set to Home to Max,   so it moves it all the way up off the table and hits the max end stop.        Just last month I finally added the Zero Plate.        The way I do this, is I use the Z Min as a Z Probe.  I lay down the metal Zero plate, then by hand move the carriage over the piece,    then send G30 to the CNC from Repetier Host.  G30 does a 1-time Z-Probe and it reports the Z value on the Marlin LCD screen.  So, I subtract the thickness of the Zero plate and put that number into the gcode that gets sent.

    Too much to remember, just z home min,and set the probe thickness as your z offset.

    BTW,  yes, those are my rapid move settings.

    You can rapid up to 120mm/s before you get board issues. But you run the risk of skipping steps.

    Remember, my build uses 2 pipes screwed on top of one another for the X and Y gantry – so it is a lot more stable,  and i use 84 oz steppers,   so it has ok power.   The Z uses an 8mm lead screw and I build a counter weight on it with a pulley,  to counter the weight of the spindle, so the Z stepper can run faster, and the spindle doesn’t go crashing down into my work or table if the stepper power turns off.    This added 5 lbs to my Z axis gantry,   but, the X Y axis moves very well with the extra weight.   I am contemplating putting on a larger Dewalt 611 (1.25 hsp) OR,  when i can afford it, go with a 1.5k water cooled spindle.     When I run a 3mm ball nose, currently i am running it at 2500 mm pm     but, cutting red oak or cherry    and have ran it even up to 35oo, but, I feel that is pushing it too much.  I was cutting with the 3mm ballnose on cherry and poplar without doing a rough

    Adding all that would be better used slower with larger bits.  A large heavy machine is for hogging stuff out, being light and nimble is for the smaller bits. I get amazing results at 8-15mm/s If it was more rigid I would generally just go deeper per pass or a large roughing bit.

     

    Intelligent speed control would be nice. A few have attempted some cheaper ones but I am guessing nothing has worked out yet. I have done some serious research a few times but there are too many unknowns for me that I’m sure an electrical engineer would know the proper way not to burn down a house. There are a tone of lower amperage ones super cheap zero point crossing opto’s and everything but just not enough amps for a router. I have just wanted to try modifying one of those. Pretty sure there are a bunch on tindie.

     

     

     

     

    #43639

    Ryan
    Keymaster

    Jeffeb3 has put in some serious time helping me to get this thing perfected. As best as I can test all functions work. My most sincere thanks Heffe!!!  Jeffeb3 has gotten it so polished it has been submitted to Marlin to hopefully get integrated into the firmware, fingers crossed.

    DualDual_1_1_5 I have dropped the new fully functional firmware on the site for now, but the GitHub might be the place to get them from now on.

    #43712

    Jason
    Participant

    Look forward to testing this out once I dig out some more endstops.

    I wouldn’t hold my breath on it merging anytime too soon though – I’ve been following Marlin development for a few months (since just before the V1 release) and it’s and bit disorganized.   They’re really bad about freezing things and then adding new features into release candidates which makes it really hard to get a release out the door.  Right now with the 2.0 restructure things are even messier than normal.

    Even without the 2.0 restructure it can be hard to tell which branch is the current development branch because they seem to change it arbitrarily without really communicating it well.   I saw they asked this be rebased onto bugfix-1.1.x but that branch is missing commits from 1.1.5…so they’ve “released” 1.1.5 but it has things that aren’t in the current bugfix development branch – which…that just seems crazy to me.

    It’s nice that they’re getting releases out finally…but…man do I get a headache trying to follow the logic behind their branching and release process!

     

    #43713

    Ryan
    Keymaster

    Yeah, kinda of a bummer. We have the 1.1.5, the 1.1.X bugfix and also a 2.0 version ready to go. I modeled the 2.0 version on the one thinkyhead was working on a few days ago but it is missing things from before 1.1.4….

    Either way, Jeffeb3 very patiently taught me all kinds of stuff over the last week or so. I understand git a bit more and finally understand merge conflict resolution, my previous biggest hurdle. Even if they never want it, we have it and it works, I will do my best to try and keep it up to date.

    2 users thanked author for this post.
    #43718

    Jeffeb3
    Participant

    I think it will make it eventually. It might be one of those “squeaky wheel gets oil” things. 2.0 doesn’t have all the features 1.1.5 has either, so it’s just bad timing. The changes are good, easy to understand, and detailed.

    #44441

    Krzysztof Rygwelski
    Participant

    Hi guys thats me again. I don’t know if that was tested or not but for my that is a problem when I cut part and I have one more to cut and I don’t won to move plate or change gcode I just one to move gentry on place click set up offset and start cutting I get error that I’m to far. Or baby I set up something wrong is some nesasary steps on this firmware that I need to make like many set up bed size?

    #44461

    Ryan
    Keymaster

    That should work if you home it first. I think. I just sold my last ramps stack so I can’t test it for a day or two. I know it doesn’t work with the “?”‘s flashing

    #44587

    Krzysztof Rygwelski
    Participant

    If i home X and Y then i move gentry with LCD Where i won to start i lower z with controller without touch plate and im hitting offset it says on LCD “to far”

    #44599

    Ryan
    Keymaster

    Can you just do it the way we do it now and reset the board or have your first command be g92 x0 y0 z0?

    #44600

    Krzysztof Rygwelski
    Participant

    Yeap i make joystic and i have G92 on it just wondering If this is bug and i shudl look at it.

    #44604

    Ryan
    Keymaster

    I wouldn’t worry about it yet. I think this has been messed up in marlin for a while  at least since the “?’s” first became a thing in marlin (99% of marlin used G28 first). At this point I don’t think we can get a fix pulled into marlin just yet anyway.

    #46909

    Neil
    Participant

    Ryan thanks for all of your hard work on this! Jeff thank you for your time and effort to get it into production!! You guys rock! I can not wait to give this a try on my current build (finally building a smaller machine to do nothing but print from).

     

    Neil

    1 user thanked author for this post.
    #46931

    Ryan
    Keymaster

    I’m excited about it. I need to write up some instructions and order some new wires for a different harness set.

    1 user thanked author for this post.
    #46956

    UnLtdSoul
    Participant

    I need to thank Ryan again. When i was wiring up the motors for separate control i made other changes and completed my PID tach controlled speed controller for the DW660 spindle. And i need to report that the AUTO Squaring worked 100% flawlessly.  THANK YOU.  It is saving me time and saving material from getting waisted.

    About my speed controller: That is also working super well. I can set speed manually with lnob or from gcode through the ramps board from 4000 to 22000 rpm and it holds that speed perfectly steady. I now can set speed according to bit i use and feed rate. 2 or even 3 or 4 flutes.  So far the motor seems to have no over heating issues. I limited high rpm to 22000 (motor will go to 30000) to allow room in power out to maintain the 22000 under load. I am currently designing printed circuit board and plan to offer this in unsoldered kit form or as a soldered board. I have included a number of bells and whistles that i will reveal once kit is ready to market.

    #46961

    Ryan
    Keymaster

    SWEET!!! I am waiting impatiently.

    #47133

    Andy
    Participant

    I’ve printed 4 endstops and am waiting on the actual endstops from china. This has stopped me from completing my build cause I didn’t want to wire the steppers twice. Anyway will try and grab the latest marlin with it in and give it a go.

    #47272

    s7design
    Participant

    This is really a awesome awesome improvement for the machine, and after upgrading the Z and middle assembly to the V2 of the machine im even more hyped about this news, and that would definitely vastly improve the usability of the machine. But me being me i have some questions on how this works 🙂

    firstly im wondering where i can get the Z axis calibration plate, and where dose it plug in into the RAMPS 1.4.

    second if i cant get the Z axis calibration will the X an Y homeing still work? As i can still set the Z by my self just having the X and Y home would be a blessing.

     

    thanks

    #47280

    Andy M.
    Participant

    You can use anything conductive for your Z touch plate…one wire from the plate to one pin of the min z on the board another wire from mill bit to other pin of the min z on the board. You need to compensate for the thickness of the touch plate in your g code. I have wrote about this in a bit more detail here . I have since abandoned the touch plate because I was having terrible interference issues. It would trigger before it was supposed to…

    I am now running the dual endstop firmware. Yes you can just home X and Y and do the Z like normal, that’s what I am doing. I am now setting my spindle over my work piece, jogging it down with the lcd to the surface. Start the program. The start code zero’s Z out first thing, raises to a clearence, then home’s x and y and goes to work.

    2 users thanked author for this post.
    #47287

    UnLtdSoul
    Participant

    I have a 3ft x 4ft build and I get no interference using a Zero Touch plate.  I have a Z max endstop I used when I home  – so it raised the Spindle to the Z max height, off the work area.  I use the Zero Touch plate as the Z min input and I send a G30 gcode command to Marlin      that does a one-time Z Probe.   I enabled Double bounce   so it goes faster on the first hit, then slows down to touch it the final second time.  Repeatedly i usually get +- .05mm   although now and then it will go +- .2 mm  still close enough for most work.

    #47288

    Ryan
    Keymaster

    Dang it I have most of the instructions written but I forgot about the touch plate part… I think that will need to be a separate instruction.

    #47293

    UnLtdSoul
    Participant

    One more thing to report about using the Auto Squaring :   Since I now have both X and both Y steppers wired to their own drivers, I was really surprised when I retested how fast my system will move.   I was able to move both the X and Y at 20,000 mm/min.   That translates to 333 in/min.     No skipping.   When I tried to go 22,000    it seems that one of the X drivers locked up.  The other X motor still ran, but one motor wasn’t.  Had to repower the Ramps board and all worked fine again.  Tried 22,000 again, and it worked,   but, probably not reliable at that speed.  Or even 20,000.  My suspicion is that it is the Mega board that is limiting the top speed.  Or maybe the drivers themselves. I am using the Drv8825 drivers.

    Originally we had the 2 X and 2 Y motors wired in Parallel.  I use motors that drain over 2 amps, but, the drivers max out at 2.5 amps.  In Parallel each motor got only 1/2 the amps, so they were running about 1/2 power.   I did a speed test and  to see how fast X and Y would run,   and the steppers started to skip at around 10,000 – 11,000 mm/min   (167 – 183 in/min)   Then, some months ago Ryan told us about wiring the steppers in Series.  That made a big Power increase,  because in Series when I set the drivers to 2.2 amps each stepper should have been getting the same 2.2 amps.   Definitely my unit had more power.  Almost Doubled the power.   It would cut much better.        BUT,  when i ran a speed test, it would start skipping at just over 9,000 mm/min (150 in/min).

    But, now with the Auto Square we have each of the 2 X and 2 Y motors all wired separately to their own driver.   I assumed the power/speed would be the same as when they were wired in Series –        until now, when i ran the test again.

    When i hit 14,000 mm/min I had to go in and change Marlin configuration to allow it to go faster.   I set it to not exceed 24,000 per axis.   And, i was able to run 20,000 mm/min   all over the whole 3ft x 4ft table, back and forth with both axis running same time (g0 x920 y1220 f20000   then g0 x0 y0 )     and it never skipped a beat.    Would go right back to touching my limit sw’s perfectly (I wired LED’s on my X and Y limit sw’s (all 4 of them) so all 4 light up with it is at 0,0 and squared).   As I said, I think the Mega 2560 is the limiting factor now in how fast this unit will position itself.   I am now using 16,000 mm/min   (267 in/min) as my default non-cutting feed rate (forgot what that is technically called).   I haven’t tried to see how fast i can cut with this arrangement.  I really don’t think the Z axis is strong enough to cut all that much faster then i have been – when I lower the spindle down around 80-90 mm   and push to the side on the bit,  you can see deflection,  so,  until, unless, i can get the Z to be more stout,   cutting speeds will probably not increase.

    I don’t know why wiring up the motors with their own drivers made a big difference in the non-cutting speed, but, for my build it has.  Zip   Zip…   i like it.

    #47294

    s7design
    Participant

    You can use anything conductive for your Z touch plate…one wire from the plate to one pin of the min z on the board another wire from mill bit to other pin of the min z on the board. You need to compensate for the thickness of the touch plate in your g code. I have wrote about this in a bit more detail here . I have since abandoned the touch plate because I was having terrible interference issues. It would trigger before it was supposed to… I am now running the dual endstop firmware. Yes you can just home X and Y and do the Z like normal, that’s what I am doing. I am now setting my spindle over my work piece, jogging it down with the lcd to the surface. Start the program. The start code zero’s Z out first thing, raises to a clearence, then home’s x and y and goes to work.

    Thanks for the info.

    Im still waiting for the end stops so im wondering do i have to change anything in the settings to disable the Z home, as on Ryen’s video the home process seems as one motion, or separate buttons have to be pressed to home each X and Y ?

    And im also wondering if the new dual stop firmware is made for the T8 LeadScrew version or the Allthread versions, as i made the 525 middle part but am still on the Allthread versions of it?

     

    #47299

    Jeffeb3
    Participant

    I don’t know why wiring up the motors with their own drivers made a big difference in the non-cutting speed, but, for my build it has.

    Interesting. I don’t know exactly how the drv8825s work, but if they are getting some kind of feedback from the motors, I could see this being a lot better. The/min numbers are a little counter intuitive for me. I still think in mm/s. 20,000mm/min is about 330mm/s. That is way faster than I’ve heard of before. I don’t know what you set your accelerations or jerk to, but they will play a big part at those enormous speeds.

    Another big problem is that steppers lose torque at higher speeds. Ryan always remembers the numbers, but I don’t. Maybe these extreme numbers would be good for the laser though.

    The mega has a maximum number of steps/second it can do, because of the 328p processor. I think we’ve got that limit before on the Z. The common symptom there is a board reset though. The steps/mm on the Z with the allthread are like 2000, IIRC. If you think you’re hitting that CPU limit, you can switch to 16th stepping and get 2x the headroom.

    I’ve seen somewhere (I think it was on hackaday) where someone put two 8825 drivers piggybacked on the same port. They had wired the motor connection separate, but the rest of the pins were common. Then they plugged one of the z motors into the normal port and the other to the piggyback pins. It was pretty clever. I wish I could find that article.

    I may have to go back to ramps on my low rider…

    #47300

    Jeffeb3
    Participant

    And im also wondering if the new dual stop firmware is made for the T8 LeadScrew version or the Allthread versions, as i made the 525 middle part but am still on the Allthread versions of it?

    I would guess he will. If not, it’s an easy change to the steps/mm.

    #47782

    Andy
    Participant

    my endstops have arrived, might finally get my mpcnc moving this weekend. 🙂

    #47853

    Ian
    Participant

    I remember posting this: https://www.v1engineering.com/forum/topic/marlin-using-e-drivers-to-run-2nd-x-and-y-motors/#post-30892 in the spring and it seemed like nobody was interested in using the E steppers for independent steppers and multihome squaring.  So I went on to start playing with it  in Repetier (I see you linked that PR) but got on to other things before I had it working 100%.

     

    I see someone found my error in Repetier and got that going, so it’s also there.

     

    #47867

    Ryan
    Keymaster

    Marlin has had the dual driver part for a while now and I did nothing on that end,  but it was without dual endstops it was not a useful feature for us, more wires no added power or accuracy. The dual endstops was even in there but only for the Z axis, all we did was make that work on the X and Y as well. To get 2 extra drivers to work at the same time Marlin can not handle zero extruders so we edit the pins.h file to move the extruder to a non existent E2 and X and Y get assigned E0 E1, on any board I have used.

     

    I am not trying to claim we invented this stuff, I tried to link everything I read about the subject in the PR and the forum post. I tried to email everyone that worked on any Marlin dual endstop features but no one was interested.  If you want me to add you to credit somewhere let me know where you would like to be credited.

    #48502

    Yann LANCELIN
    Participant

    Hi all !

    I just apply my parameters to “Marlin-MPCNC_T8_16T_Ramps_LCD_32step_DualEndstop” branch.

     

    When I compile I’ve an error : “avr-gcc: error: CreateProcess: No such file or directory”” u8glib is included to my project, all seems OK and I’m a newbie 😉 …

    Can you help me ?

     

    Great Thanks

     

    Yann

     

Viewing 30 posts - 61 through 90 (of 131 total)

You must be logged in to reply to this topic.