Welcome to Our Community

Some features disabled for guests. Register Today.

Ask Grbl CNC questions here.

Discussion in 'Control Software' started by Sonny Jeon, Aug 12, 2015.

  1. Lob0426

    Lob0426 New
    Builder

    Joined:
    Aug 17, 2016
    Messages:
    7
    Likes Received:
    1
    @nima
    What is the diameter and the tooth count on your pulley?
    What stepper are you using?
    What belt type are you using?
     
  2. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    The official Grbl on Mega2560 is here (GitHub - gnea/grbl-Mega: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560)
     
    David the swarfer likes this.
  3. Lob0426

    Lob0426 New
    Builder

    Joined:
    Aug 17, 2016
    Messages:
    7
    Likes Received:
    1
    Trying to reduce the dwell time between direction changes for a DIY Laser kit. J-Tech and LaserInk manage this, But I cannot figure out what they did to fix it. I am working with grbl-edge. I need this to use homing switches is why I cannot use J-Tech. and LaserInk is grbl.9G.
    #define MINIMUM_JUNCTION_SPEED 0.0 // (mm/min)
    This seems to have no effect what so ever. I have tried values from .09 to 100.0 and no change. the only things working to speed up the engraving are acceleration and max rates. I have acceleration at 2000 and max rate at 12000. These helped but are not the proper way to fix the problem!
    A couple other things I tried and found no changes;
    #define ACCELERATION_TICKS_PER_SECOND 25
    #define DWELL_TIME_STEP 5
     
  4. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    It's a lot more involved than just altering the minimum junction speed. Grbl v1.0 will be supporting laser mode such that it won't pause. It'll be out very soon.
     
  5. Lob0426

    Lob0426 New
    Builder

    Joined:
    Aug 17, 2016
    Messages:
    7
    Likes Received:
    1
    I guess I will have to wait for it then. I cannot seem to find what I am looking for in the files.

    Thank you
     
  6. Headlodius

    Builder

    Joined:
    Jul 31, 2016
    Messages:
    18
    Likes Received:
    5
    Thanks for all the suggestions turned out that I was using the wrong com.
     
    Strooom likes this.
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    Seems to me that you have not set your microstepping and it is full stepping.
    Set microstepping to 8x using the jumpers, then do this calibration:
    HOWTO Calibrate your OX or C-Beam

    Can we have a picture of your belt drive please?
     
  8. nima

    nima New
    Builder

    Joined:
    Jul 15, 2016
    Messages:
    9
    Likes Received:
    0
    thanks to you , by adding 1 jumper and changing $100=260 & $110=5000 stepper works very smother and much better. still dont know what does jumper do and what is 8x .

     

    Attached Files:

    • d.jpg
      d.jpg
      File size:
      102.3 KB
      Views:
      1
  9. Headlodius

    Builder

    Joined:
    Jul 31, 2016
    Messages:
    18
    Likes Received:
    5
    My Grbl settings were all off, providing me with some dissapointing results, I've entered the correct settings based on the Grbl settings jpg, then I noticed that $14 line is missing from my settings. Does anyone know how to enter that data into the Grbl settings panel?
     
  10. Headlodius

    Builder

    Joined:
    Jul 31, 2016
    Messages:
    18
    Likes Received:
    5
    My Grbl settings were all off, providing me with some dissapointing results, I've entered the correct settings based on the Grbl settings jpg, then I noticed that $14 line is missing from my settings. how would I go about entering that data into the Grbl settings panel?
     
  11. nima

    nima New
    Builder

    Joined:
    Jul 15, 2016
    Messages:
    9
    Likes Received:
    0
    18 tooths and 28 mm diameter.
    FH6-1571 01 (STP-58D307) 6 wire 1.8 DEG/STEP 2.2V 2 A and driver is A4988.
    5M belt 5 mm pitch
     
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    Microstepping explained:
    Microstepping, Full Step & Half Step

    The chip on your stepper driver can do different levels of microstepping, from full step (1x) to 16 microsteps per full steps, or 16x.
    The jumpers select the microstep level.
    In full stepping mode, your motor will do 200 steps per revolution.
    in half step mode (2x) it will do 400 steps per revolution. This will be much smoother than 1x stepping.
    4x mode will do 800 steps per rev
    8x mode will do 1600 steps per rev
    16x will do 3200 steps per rev.

    As microstepping increases, power decreases.
    I recommended using 8x.
    This calibrates as
    (200*8) / (18*5) = 17.77777 steps per mm.
    this means each step will move the carriage 0.05625mm which is good for most cutting requirements.

    On your cnc shield you have a set of jumpers under each motor driver.
    [​IMG]

    according to Pololu - A4988 Stepper Motor Driver Carrier you will need jumpers on M0 and M1 to select 8x mode.
     
    nima likes this.
  13. nima

    nima New
    Builder

    Joined:
    Jul 15, 2016
    Messages:
    9
    Likes Received:
    0
    is that correct ? by increasing microstepping from 17.777 to 290 torque decrease?
     
  14. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    You have the terminology wrong I think.....

    The motor is 200 steps per revolution.
    The driver can multiply that by 1, 2, 4, 8 or 16. This is called microstepping, it makes the motor take small steps in-between the 'real' steps. Turn the motor by hand with power off, and you feel it 'click', those are the real steps.

    When we just the real steps, it is most powerful, however, it is also very rough and can easily resonate, which in turn causes it to miss steps.
    So, we should at least use 2x microstepping, to avoid that roughness and resonance.
    But as we increase the microstep level, we lose power (in simple terms).

    To quote Micromo
    from Microstepping: Myths and Realities | MICROMO

    I am going to sidestep terminology issues for (my) convenience:
    put simply: if your stepper loses steps under load, if you reduce the microstepping setting it will have more 'power' and may not lose steps anymore (depends how much overload there was).
    Of course top speed and acceleration also come into the equation, lower speeds and lower acceleration will also seem like 'more power'.

    so, what does it mean for you?
    If you get your machine to run reliably at 8x microstepping, if you increase it to 16x you will probably have to slow down the max step rate and/or acceleration. Use only as much microstepping as you need.
    If we are cutting wood/plastic/foam do we really need better than 0.1mm resolution?
    But, for metals we can use 0.005mm resolution on fine finish 3D cuts.

    As the article I linked says, do not be misled by '256 microsteps and lots of resolution', you won't get it.
     
    nima likes this.
  15. Strooom

    Strooom New
    Builder

    Joined:
    Feb 28, 2015
    Messages:
    28
    Likes Received:
    4
    Setting $100, $101 and $102 is no guessing, but needs to be according to rather simple calculations :

    Case 1 : timing belt :
    * determine the 'pitch' of your timing belt, ie. the exact distance between each 'tooth' of the belt. In case you are using so-called GT2 or GT3 this is simple, as the name indicates the pitch is 2mm (GT2) or 3 mm (GT3) See this image

    * count the number of teeth on your pulley. Mark one with a pen marker, then count carefully. Don't trust your vendor, sometimes documentation is out of date, parts are out of stock etc..

    Linear travel is then calculated as : travel_per_turn = #teeth_of_pulley * tming_belt_pitch
    Example : 20-tooth pulley with a GT3 belt : 20 * 3mm = 60 mm

    Next we look at the motor : the number of steps per turn is derived from :

    * native number of steps / turn of the stepper motor. Typically motors are 200 steps / turn, also indicated as 1.8 deg (360 deg / 200). Again check your motor's spec. as different motors do exist.

    * are you using microstepping : microstepping further divides each 'native' step of the motor into a number of smaller microsteps. If (eg) you use 8x microstepping, it means each step is divided into 8 microsteps. Microstepping is a feature of the motor-driver, typically set through some small dip-switches or jumpers. (use Google to learn more about pro and con of microstepping). This means your microstepping stepper motor does not need 200 steps for 1 revolution, but rather 8*200 = 1600 steps.

    Now calculating $100, $101, $102 (x-y-z) boils down to :

    $100 = (#native_steps_per_turn_of_the_motor * #microstepping_multiplier) / (#teeth_of_pulley * timing_belt_pitch)
    Example : 200 step motor (1.8 deg), 16x microstepping, 20 teeth pulley, GT3 : (200*16) / (20 * 3) = 53.333

    Case 2 : Lead Screw - Ball Screw

    In this case we need the 'lead' of the screw = how much distance does the nut advance, when the screw makes one rotation. For example for the 8 mm ACME Lead screw this is 8 mm.

    For the lead screw (typically the z-axis) $102 boils down to :

    $102 = (#native_steps_per_turn_of_the_motor * #microstepping_multiplier) / lead_of_the_screw

    Example : 200 step motor (1.8 deg), 16x microstepping, 8 mm ACME Lead Screw : (200*16) / 8 = 400

    Final remark : experience has learned that cheap stepper-motor-drivers (with microstepping) sometimes have incorrect dip-switch settings printed on them, or the microstep settings do not always work in a predictable way. In this case you may assume the microstepping is set to (eg) 8x, but the driver is maybe doing something else (eg 4x or 16x). If the effective travel of your machine is a multiple or fraction (half, quarter, ..) of what you expect, then check this first.
     
    Mark Carew and nima like this.
  16. Strooom

    Strooom New
    Builder

    Joined:
    Feb 28, 2015
    Messages:
    28
    Likes Received:
    4
    Question about using RS232 io USB :

    On my GRBL-Arduino shield, I added a RS232 driver (built around a MAX232) in order to be able to communicate RS232 io. USB. The final purpose of it being more reliable, electrically, as well as mechanically (connectors can be screwed etc..)

    The problem is, when testing it, GRBL resets after a few hundred lines of gcode. (even if all high-voltage stuff is shut down, so I think EMI is ruled out here). Any ideas or suggestions on how to debug this ?

    * Is it possible that serial bytes sent from the Arduino, (which are also sent to the USB chip (CH340) as both are wired in parallel) could trigger a reset from the CH340 to the Arduino ?

    * Can GRBL 'crash' due to buffer overflow on the serial line, or does the serial ISR take care of that ?

    How could I best modify GRBL to trace the source of these resets ?
     
  17. Lob0426

    Lob0426 New
    Builder

    Joined:
    Aug 17, 2016
    Messages:
    7
    Likes Received:
    1
    @Strooom; I guarantee that 2 steps per mm is wrong.

    I asked for Stepper, pulley dimension, teeth and belt type so that I could calculate the steps per/mm for him. I just saw the answer to those questions above.

    You have given him the calculations to get the right setting for his machine once he figures out his "micro-stepping". 80 steps/mm is very common. It was a starting point, nothing else!

    Supplying TMI for him is not going to work. He is still trying to figure out his micro stepping settings!
     
    nima likes this.
  18. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    Good post Strooom.
    That last thing, and in fact any unknown system can be solved like this:
    set steps/mm to 1 (yes, ONE)
    command a move, might have to be quite long to get usable motion so you may need to change your soft limits.
    measure how far it really moved.
    recalibrate:
    new step/mm = current-step/mm * commandeddistance / actualmovement

    for example, we have a 200 step/rev motor at 16x microstepping, driving a 1mm pitch leadscrew (common M6 threaded rod). (but we don't know that)
    set steps/mm = 1
    command G0 X200 will barely move the carriage, so try G0 X400, G0 X800, etc till it turns one full turn, which will be G0 X3200.
    thus
    steps/mm = 1 * 3200 / 1
    = 3200 steps/mm

    You can try other sizes. 200 and a 'G0 X1' should move the 200step/rev motor 1 turn if there is no microstepping, half a turn for 2x, quarter turn for 4x, etc. But combined with an unknown belt drive this does not really help, so just drive far enough to measure, say 10mm of motion, then recalculate and try again to fine tune. Your final check should be over the longest distance you can measure.
     
  19. Andy lee

    Andy lee New
    Builder

    Joined:
    Jun 14, 2016
    Messages:
    1
    Likes Received:
    2
    Hi Sonny, big fan of GRBL. I've been using it for several projects now. Just wanted show some love.
     
    MaryD and Strooom like this.
  20. Strooom

    Strooom New
    Builder

    Joined:
    Feb 28, 2015
    Messages:
    28
    Likes Received:
    4
    Custom Post-Processor for GRBL

    The 'Generic GRBL' Post Processor in Autodesk Fusion360 isn't really well optimized or adapted to GRBL, so I decided to modify it and try to make a more user-friendly and robust PostProcessor for GRBL based machines. I tested on an Openbuilds OX with Makita RT0700 but I think it should work well on ShapeOko's and XCarve as well..
    It's available on

    GitHub - Strooom/GRBL-Post-Processor: Start

    A few of the immediate advantages :
    • doesn't write a M6 T1 toolchange (which GRBL doesn't handle)
    • at the end of the job, moves spindle up, shuts down spindle then moves to machine origin
    • a comment block at the beginning gives an overview of operations, tools, and spindle speeds
    • translates spindle RPM to a 1-6 dial setting for those who use a Makita RT0700 or similar spindle (Dewalt 611, Bosch Colt)
     
  21. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,898
    Likes Received:
    1,613
    Sounds great. Of course I use the Makita so I may be biased. ;)
     
  22. MaryD

    MaryD OpenBuilds Team

    Joined:
    Apr 13, 2016
    Messages:
    649
    Likes Received:
    639
    This would make great reference material for the Projects & Resources section.
     
  23. autox3d

    autox3d New
    Builder

    Joined:
    Oct 3, 2015
    Messages:
    61
    Likes Received:
    9
    I am currently lusting for a working Ramps 1.4 Arduino Mega GRBL setup with the LCD menu and SD card reader enabled, much like the Marlin firmware but without the temp display showing
     
  24. GeoffN

    GeoffN New
    Builder

    Joined:
    Aug 16, 2016
    Messages:
    1
    Likes Received:
    0
    Hi Sonny, congrats for all of your time in getting this rocking;). I am currently converting a small metal lathe to do some rotated carving then hopefully into fishing lures by the same process, I have carriage as the X axis, the cross slide as the Z axis and housing the spindle/router. The Y axis is the head stock chuck and this rotates. I have them all working with a Uno, CNC Shield and DRV8825 drivers. X and Z are good but Y is the problem as it rotates could this be achieved with GRBL now or the near future? Back in the post #4 you mentioned about a rotating axis. I also have a my disposal a Mega 2560 and Ramps1.4 and others if I have to take the Mach route.:eek:
    PS. I have just loaded up the Mega 1.0d and having a play with it.
    Regards
    Geoff
     
  25. the1pro52

    the1pro52 New
    Builder

    Joined:
    Sep 8, 2016
    Messages:
    3
    Likes Received:
    1
    Sorry if I am in the wrong site. Hello everyone new to this site and new to the grbl software. Well purchased a small cnc engraver, and set it up and after 7 days of contacting the supplier and getting nowhere. I started looking all over the net. I found this site. I was looking for marks 2 hr video but unable to find it can someone post link? Okay that's one question and maybe the video will answer all my questions? Sorry about the grammar. So back to what I have done so far.

    1) build the cnc unit. 2) installed software grbl .9 version 3) I created a file in scan2cad and opened it in grbl with the unit hooked up and it sees the file, and when I run it the unit works but here is my problem. The setting of the (y) and (z) need to be set I think as I did not set them in the grbl programme.( I did set it in the scn2cad). I can't get the panel open. So the ( y) motor goes to max and keeps running? can some help please I'm so lost? thanks to all
     
  26. Strooom

    Strooom New
    Builder

    Joined:
    Feb 28, 2015
    Messages:
    28
    Likes Received:
    4
    I think you should start by reading the Wiki on GRBL : Home · grbl/grbl Wiki · GitHub
     
  27. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    which GUI are you using for GRBL? Universal Gcode sender (UGS)? GRBL-panel?
    oh, you really do need to set the calibration in GRBL before running a gcode file.
    GRBL does not know about your mechanics at all, it only needs to know how many steps will move the tool 1 mm.
    It has 3 settings for this, one for each of X Y Z
    The settings are numbered.....
    $100=40.000 (x, step/mm)
    $101=50.000 (y, step/mm)
    $102=100.000 (z, step/mm)​

    In UGS it looks like this
    [​IMG]

    To see those values, type $$ and press Enter in the 'Command' edit box at top right.

    To change a value, type it like this (in the command box) and press Enter to save it.
    $100=26.6666
    That would set $100 to 26.6666

    How to know what values to put in for steps/mm ?????
    Read this C-Beam™ Machine - Plate Maker
    as it explains the calibration process.

     
  28. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    PS you will also need to set the max rate and acceleration values, if they are too high the machine will not move at all.
     
  29. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    The videos I think you want are the ones Mark did for building the OX....
    OpenBuilds OX CNC Machine
    Part 1 and 2 right there on that page.
     
  30. Ambrogio

    Ambrogio New
    Builder

    Joined:
    Jun 13, 2016
    Messages:
    19
    Likes Received:
    0
    good day to all of you in the forum,
    I have a GRBL ver 0.9J installed and works well on my three stepper motors machine.
    I have now installed a LASER and I left the Z axe unused.
    How could I generate a GCODE that controls the LASER instead of controlling the Z motor ?
    My laser is connected to the D_11 PWM at the moment in order to control the beam intensity.
    What programs should i use ?
    Thanks in advance for any help.
    Regards,
    Ambro
     

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