Welcome to Our Community

Some features disabled for guests. Register Today.

Servo vs. Stepper motor for Z-Axis

Discussion in 'DrawBot' started by Bepis, Dec 23, 2022.

  1. Bepis

    Bepis New
    Builder

    Joined:
    Dec 23, 2022
    Messages:
    1
    Likes Received:
    0
    Hi I was wondering if anyone knew of which would be a better Z-Axis for a GRBL based drawing machine: a stepper motor or a servo? It seems a stepper motor would be a bit overkill but is more natural for the firmware.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,458
    Likes Received:
    1,915
    stepper is better, i find servos to be very jerky
    mount the pen on a spring, then 'depth of cut' will set penpressure
     
    Bepis and Peter Van Der Walt like this.
  3. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    When I was initially testing the laser, I made a drawbot head for it. Z-axis stepper made height and pressure adjustments extremely easy, and putting the pen spring behind the cartridge, under the screw cap, smoothed everything out.

    Photo Dec 12 2018, 18 08 26.jpg

    Photo Dec 13 2018, 17 53 51.jpg

    It worked so well, the plan is eventually to build a nice light machine to permanently mount that fixture on.
     
    Bepis and David the swarfer like this.
  4. roses

    roses New
    Builder

    Joined:
    Jul 29, 2019
    Messages:
    41
    Likes Received:
    9
    I switched from using a nema17 stepper to a small servo on the pen gantry in order to reduce weight, and I'm happier with that.
     
    Bepis and Peter Van Der Walt like this.
  5. GIANNHSitia

    Builder

    Joined:
    Feb 20, 2023
    Messages:
    4
    Likes Received:
    0
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,049
    Likes Received:
    4,313
    Make sure you also have $30=255 (if you want to use M3S255 as max) - grbl default is $30=1000 (which then needs S0-1000)
     
  7. GIANNHSitia

    Builder

    Joined:
    Feb 20, 2023
    Messages:
    4
    Likes Received:
    0
    hello.. working with $30 .. now i have a another problem.. the limit switch no work.. i have enabled $21 = 1 but do not stop with trigger allarm y or X ... if ι press hold the limit switch in ugs or candle presents alarm but dont stop move
     

    Attached Files:

    • $$.jpg
      $$.jpg
      File size:
      182.6 KB
      Views:
      9
    • alarm.jpg
      alarm.jpg
      File size:
      179.9 KB
      Views:
      7
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,049
    Likes Received:
    4,313
    We don't provide technical support for 3rd party Grbl forks, this sort of thing is typical from some of the non standard firmwares, half built features and very little testing. Do make sure you didnt wire X to Z for example just to eliminate user error
     
  9. GIANNHSitia

    Builder

    Joined:
    Feb 20, 2023
    Messages:
    4
    Likes Received:
    0
    I understand, but my main problem, that I can't use any official version is that I need it for the z axis servo.. and the one I found is the only version that has it but the hard limit doesn't work...
    it is easy to convert the official version to work the z axis with servo?
     
  10. roses

    roses New
    Builder

    Joined:
    Jul 29, 2019
    Messages:
    41
    Likes Received:
    9
    The blackbox controller supports use of servo in place of and in addition to use of the z axis. If you have a blackbox controller then the specific version you have will require a slightly different configuration.

    Since the blackbox controller supports servo and z axis then I would assume that the software does as well.

    If you are trying to control the servo with z axis commands then others may be better able to suggest options. My preferred option in that case would be to open the gcode in a text editor and do a search and replace to servo commands ....
     
    Peter Van Der Walt likes this.
  11. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    I happen to be debugging a pen plotter I just put together from some spare parts and new ones as well and am running into a similar problem using open builds controller to run the thing. Having configured my grbl flash in the Wizard to configure my system as 2 axis plus Z axis servo (Arduino Uno controller) when I try to jog things in controller, the "Pen Up" button got no result. The serial console shows a M3 S128 command and when I modified the code to S250 I got about 15 degrees of swing on the servo. The Pen Down button (M3 S115) worked fine. On my particular machine, while S250 works, S350 works better and moves the pen up where I want it before travel. Is there any way to reconfigure the buttons to send the modified code so pen up/pen down actually work? I tried writing a macro but got no result. Is there any way to make sure the Gcode I use to draw my canvases uses S350 and not S128 as the default?
     
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,458
    Likes Received:
    1,915
    GRBL settings $30 and $31 set the limits of the S words.
    The default is $30=1000 and $31=0, which means that the S values can run from 0 to 1000

    Note that you must configure the servo in such a way that M3 S0 lifts the pen up (thus S500 will put it halfway down, etc).
    This is because when the program ends and an M5 is sent, that is where it will go, toward the S0 position.
     
  13. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    Following your lead I tweaked the GRBL settings in Control and the Up/Down buttons now move the pen adequately BUT in the wrong directions. Up is down and vice versa. I wasn't able to trick GRBL into reversing this by inverting axis or homing direction and the experiment involving swapping the numbers on $30 and $31is not one I care to discuss. I suppose this is then hardware dependent somewhere on the CNC shield? Or elsewhere even more inaccessible to me like a config.h file?
     
  14. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    Is there a way to do that in the beginning and ending macros that will set different values for a particular piece of GCODE permanently?
     
  15. roses

    roses New
    Builder

    Joined:
    Jul 29, 2019
    Messages:
    41
    Likes Received:
    9
  16. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,458
    Likes Received:
    1,915
    by 'configure the servo' I meant the hardware connection, where the arm is on the servo spindle. Each brand of servo has its own direction convention, some go clockwise for low pulse inputs and some go anticlockwise for low pulse inputs.

    what you have to do is position the servo so the arm moves the pen up for M3 S0 commands. it must also not be hitting any hard stop in that position otherwise it could burn out as it will still be trying to move.

    some servos can be reversed by swapping wires inside the casing, somewhat of a fiddle and it depends largly on the exact construction of the servo you have.
     
    roses likes this.
  17. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    I moved the servo and re-engineered the linkage and now everything moves as it should. My main issue now is getting Openbuilds Cam to "play nice" with me. It continues to say that it can't connect to Control even though they're sitting right next to each other on my desktop, open and operating. CAM keeps wanting me to download a new version of Control that will not open on my MacBook running the latest Ventura. Does that sound right? I also cannot get any of the scale functions to respond so Im constantly getting gcode files that are either much larger or smaller than I expected. Is a mouse with right and left buttons necessary to implement scaling?
     
  18. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,049
    Likes Received:
    4,313
    CAM can only connect to new versions of CONTROL. Due to an ongoing bug we can't release new versions for Mac and Linux

    Luckilly super simple solution: Click the SAVE GCODE button and open the file in CONTROL as usual. Two clicks instead of the one click Transfer but you'll survive :)

    The onscreen instructions presented this information to you as well:

    upload_2023-3-6_19-59-21.png
     
  19. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    Im doing that already; that's only one and not the biggest problem. Thanks for addressing it so I won't go fiddling around for some solution that might result in a fire. The bigger problem is manipulating images within CAM. I usually import jpg or svg files but unless I size them EXACTLY before import (which is tough to do accurately, at least for me) Im stuck with that size even though CAM boasts a scale function below select, move, and erase. There are tantalizing references to mouse buttons and other functions but I use the built in trackpad on my MacBook Pro which, in most cases, has all the functions of a mouse save a scrolling wheel (two finger swipe, Im told). Are there any Mac tutorials out there you can refer me to?

    PS Thanks for the quick responses!!
     

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