Shop OBEX P1 Docs P2 Docs Learn Events
CNC Motion issue — Parallax Forums

CNC Motion issue

PhilldapillPhilldapill Posts: 1,283
edited 2008-03-04 22:27 in Propeller 1
Hey, I'm building a CNC machine mainly out of HDPE, using a drill press and radial arm saw. This setup is fairly precise for cutting wood and what not, but when you're dealing with CNC, not so much. I've managed to get my rails very parallel, but I've been thinking of a possible problem. Lets say·the top rail set is·perfectly parallel, but the rails themselves are not exactlly horizontal. What will happen, is as the carraige moves from side to side, it will actually "rise" or lower a few thousandths of an inch. I'm thinking this can be modeled as a simple offset vector. i.e. When determining the current XYZ position of the piece of work, you may need to add or subtract a little bit based on the current position. For example, if we are dealing with the left to right top carraige rails, we will have an exact X position which is determined directly by the stepper, but if the rails are slanted down slightly, we would have to offset the vertical Y axis(up down) by using a simple slope equation, Y = mx+b. Granted, m will probably be TINY and b will be zero. So, what you end up with, is when the carraige is at the left side, the offset will be zero since x is zero, but when you get to the right side, the offset might be quite large since x is large.

In addition to the Y axis, there will probably be another offset equation for the Z axis(front to back). Again, this is probably a straight slope-line equation like above but with Z = mx + b. With this, we would have a different m coefficient for this axis. The same would apply for the other rail sets too. Basically, two offset equations for each rail.

Remember, I'm totally new to CNC so this may be some basic "duh" info, but·even the novice's advice sure helps.

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-03-01 23:02
    hello Phill,

    i'm a novice to descriptions like you posted above.

    second idea very short to describe posted above the first:

    how about adjusting all these tolerances by milling the mounting surface where the objects you want to work with are mounted ?
    Then this mounting surface will be perfectly parallel to your axis as long as the rails don't move up AND down from one end to the other


    My first Idea is:

    define 3D-Vectors to create a calculation-base in this 3D-space

    you have to measure the Deviation of the edges of the driving range
    4 edges 4 points to measure in 3D. this means measure the X,Y and Z-coordinate

    1 point is the shared basepoint between really flat level and the deviated level because of tolerances in your rails

    with this 3 points you can calculate a 2D-Level-equation inside this 3D-space

    with this level-equation you can calculate the Z-offset at any XY-point

    for the mathematical basics of vectors and vector-algebra

    http://en.wikipedia.org/wiki/Vector_(spatial)

    out of three points you can get almost always two direction-vectors and a basepointvector
    this gives you the level-equation inside the 3D-space
    By giving in your actual XY-coordinates the level-equation calculates the Z-position
    and this should be directly the offsetvector to the real flat level

    best regards

    Stefan
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-03-01 23:33
    hello Phill,

    now i have to make a second posting

    with HDPE do you mean High Density Polyethylen ??

    i guess using this material for building a CNC-machine
    you will get better results giving your work to a sculpture-artist working with hand-tools !

    the mechanical and thermal properties are much lower than from steel

    if it has to be plastic i would use POM Polyoxyinethylen

    PE
    thermal Expansion coefficient: 0,02 mm/m/°C
    mechanical tension to burst 22 N/mm2 ( i can't describe it better in english)

    POM
    thermal Expansion coefficient: 0,10 mm/m/°C
    mechanical tension to burst 70 N/mm2

    steel
    mechanical tension to burst 370-1400 N/mm²
    thermal Expansion coefficient: 0,012 mm/m/°C

    that's the reason why you don't find ANY bigger maschines build upon plastic

    best regards

    Stefan
  • Sleazy - GSleazy - G Posts: 79
    edited 2008-03-02 09:52
    · I used to model my own machine designs in INVENTOR 10, then use MASTERCAM X to produce CNC code, then I would setup and run·a HAAS VF-4 mill.· I have some experience.

    Find some good·ball screws and you shouldnt have any problems with your·table moving Z when instructed to move x or y
    Or make sure your·table is heavy enough.·

    KEY: You need to make sure that you write into your code BACKOFF AND FEEDFORWARD ONLY if you want any accuracy.· Doing this will keep your bearings in your ballscrews siezed appropriately in the locked direction.
    ·
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-03-02 16:53
    Ok, I hope this doesn't give you guys nightmares, but right now, my budget for this thing is under $200. I ordered three 12"x24" sheets of 1/2" HDPE to use as the frame. The guide rods are made out of 3/8" steel rod I got at homedepot, and the lead screws are 1/4-20 threaded rod, again at homedepot. I got the straightest rods I could find at the store and checked them by rolling them on the ground. People stared, but I got suprisingly straight rods. I'll be using something like Mach 3 or some other free software. Sleazy G, your reply reminded me...

    When you say you use these programs to genereate the G code, what does that mean? I mean, I know what G code is for the most part - instructions to move the tool, but somewhere along the line, those instructions have to get processed into individual step commands, and that further has to be processed into what phase to have on in the stepper, and so on. What do you use to do this processing? Can I just use the parallel port of the computer(or another port) to directly activate the phases? I know they can't source the current, but I'm saying use them as signals for a stepper driver?
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-03-02 17:13
    Hello Phill,

    i'm not a specialist about those driver-softwares.

    in professional use in most cases you have a steppermotordriver that works that way:

    the steppermotordriver has inputs for step and direction of the axis

    the details how to switch the current for the coils is done INSIDE the steppermotordriver.

    so i guess most of these PC-Softwares provide step and direction-signals at the parallelport

    There are some other steppermotor projects in the forum from other people.

    I didn't take a close look at them. I guess there will be projects where the propeller gets XY-coordinates
    and the propeller generates the signals how to switch the H-bridges for all axis. Making the control able
    to drive the cnc-tool in any 3D-direction


    another idea for a datainterface is to use the *.PLT-format HPGL Hewlett packard graphic language

    there the coordinates are stored as simple ASCII-Code like this:
    Example X=120, Y=350

    inside PLT: 120 350; X-coordinate space Y-coordinate semicolon

    maybe you have to add a Z-coordinate

    these coordinate could be easily transmitted through a simpel serial interface
    of course this could also be done with G-Commands but then you have to interpret
    the G-commands inside the propeller

    inbetween would be that the propeller gets step and direction signals and does just the details about switching the H-bridges
    in the right way (fullstep, halfstep, maybe microsteps)

    best regards

    Stefan
  • kelvin jameskelvin james Posts: 531
    edited 2008-03-02 23:26
    I realize that you have a fixed budget, but i would advise you to get the frame parts professionally machined. Any variance will be a ever-lasting pain in the butt to deal with. The only way to accurately drill the holes for the rods and such is on a mill. There are usually small machine shops around, and it would be a simple job for them to do. The DIY approach is always good, but sometimes you have to look at the reality of what can be accomplished with the tools you have.

    Post Edited (kelvin james) : 3/2/2008 11:36:25 PM GMT
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-03-02 23:33
    I agree. I want to get some of this pro-machined. As for the rod holes, I'm sure they are extremely parallel. What I did, was made sure my dirll press is vertical, and got the two faceplates(where the motor connects to and rods go in), and clamped them together, then drilled the rod holes through both. This way, I know the holes are exactly the same space apart, and will be perfectly parallel. As for the frame... I really wish I had gotten it machined. Now, I'm going to have to make all sorts of software adjustments to compensate for the non-parallel nature of how I drilled everything.
  • Paul RowntreePaul Rowntree Posts: 49
    edited 2008-03-03 04:53
    Yes and no on professionally machined frames. I've seen home-built frames that work well, especially since I understand that you want to cut PCBs, which is not too demanding.
    As for the slightly non-horizontal rails issue, one solution is to build up the sample support stage with a machine-able material, then simply cut into it making a flat surface cut across the entire working area of the machine. The new surface will be exactly true to the rails, and so any material mounted to it will follow these definitions. THis is a lot easier than correcting the motion vectors or G code. If you only have a few thou of rise across the surface, this is trivial.

    Another trick is to use your Mk I CNC to cut pieces for Mk II, and to incrementally improve the precision of your machine.

    Cheers!
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2008-03-04 10:51
    Mach3 allows the definition of mathematical relationships between the axis so you can remove none squareness if you want. You can also map lead screws to remove lead error etc I think.

    IMHO this is off topic for this forum really, you should try www.cnczone.com

    Graham
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-04 10:57
    If you can get accurate reference points and a good measurement system you could use a feedback system. If setup properly this could allow for any small non-alignments.
  • tpw_mantpw_man Posts: 276
    edited 2008-03-04 22:27
    Make the G-code to stepper phase converter the propeller smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1010, so be surprised!
Sign In or Register to comment.