Welcome to Our Community

Some features disabled for guests. Register Today.

Arduino uno

Discussion in 'CNC Mills/Routers' started by RandyK, Oct 25, 2019.

  1. RandyK

    RandyK New
    Builder

    Joined:
    Oct 25, 2019
    Messages:
    3
    Likes Received:
    0
    New to this site needing some help.
    I'm using an arduino uno with grbl controller (just managed to set it up) but my Y and Z axis' are reversed. I'm no good with wiring so not sure about that aspect. Is there a parameter in grbl that I can switch the signal to the stepper motors?
     
  2. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,898
    Likes Received:
    1,613
    Switch one pair of wires of the four for each stepper and they will go the right direction, or refer to the grbl wiki. It will help answer most questions regarding grbl. gnea/grbl
     
  3. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    Or, change axis direction in grbl. I'm away from my computer but it is like $3 or $4.
     
  4. RandyK

    RandyK New
    Builder

    Joined:
    Oct 25, 2019
    Messages:
    3
    Likes Received:
    0
    Sorry, bad explanation on my part. I changed the $3 and that worked to fix the direction of the axis. In my case the Y and Z are switched around as in when I jog the Y axis my Z axis moves.
    This machine was purchased from SVP Laser in India using Multicnc software. The software was buggy to begin with but has now stopped working altogether so I did some research and decided to go with the grbl panel since I'm using an arduino uno.
    Guess what I'm looking for is a quick fix in a parameter to change the axis signal since rewiring my micro step drives is way out of my element.
    I worked as a journeyman machinist a decade ago but mostly ran manual machines so even a hobby style cnc has my work cutout for me.
    Appreciate all the help I can get.
     
  5. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,681
    Likes Received:
    1,321
    It shouldn't be difficult to swap the wiring between your Z and Y axes @RandyK. Post a pic of the wiring at controller end and stepper motors so we can see what the problem would be.
    Alex.
     
  6. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,898
    Likes Received:
    1,613
    A picture of the controller would definitely help. All controllers I am familiar with would have the solution if unplugging both motors at the board an swapping them around.
     
  7. RandyK

    RandyK New
    Builder

    Joined:
    Oct 25, 2019
    Messages:
    3
    Likes Received:
    0
    Well, I actually managed to figure out the wiring (using your advice on swapping them) of the micro step drivers and now have all axis' working as they should so thank you for that! Now, finding my steps/mm is halting progress. Everything is gear driven, no lead screw or belts which all online calculations I've found seem to show. I know i have 200 steps/rev but no idea what any specs are for the microstep drivers are as this machine came with zero schematics for anything. I believe i need to play with my $0 setting correct? Currently it's set to $0=10
     
  8. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,898
    Likes Received:
    1,613
    Is it rack and pinion? If so count the teeth on the motor gear then count the same amount of teeth on the rack. Measure that distance and that will get you in the ball park for mm/rotation of the motor. Then the formulas will work. The machine has no clue if it is using a gear, belt, or screw.
     
    sharmstr likes this.
  9. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    Yeah. and if the gears/whatever are hard to see, you can make a first guess and then see how far an axis moves and adjust from there.

    Example: set up for 200 steps/mm. Move axis 100mm (20,000 steps). if it only moves 50mm then you know the number should be 400 steps/mm. If it moves 200mm, then it's 50 steps/mm. I'd repeat until acceptable precision is met. Formula is New_steps_mm = (expected_distance/actual_distance) * Old_steps_mm. The longer your test movements, the more accuracy you'll get.

    By the way, even with known data for the drive mechanics, you would need to do this. For example, on the acme screws a lot of machines are using, you still have to measure and tweak. iirc, my cbeam machine is about 0.2% long on x and y so I have to use slightly lower steps/mm than you get by using the specs. With belt machines, you probably should recalibrate every so often due to belt stretching. A screw based machine in a cold shop will need adjustment because of thermal expansion (uh, contraction).
     
    Giarc and sharmstr like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice