Welcome to Our Community

Some features disabled for guests. Register Today.

GRBL Shield help.

Discussion in 'Controller Boards' started by woofguy, Dec 8, 2016.

  1. woofguy

    woofguy New
    Builder

    Joined:
    Sep 13, 2016
    Messages:
    9
    Likes Received:
    0
    Hi All,

    After months of debate, I finally picked a project and started building my first CNC machine.
    I selected the Root 2 CNC Root 2 CNC multitool router 3D printed parts by sailorpete

    The majority of folks that build this machine have been using Arduino Mega and RAMPS 1.4 for the "Brains" of the machine. Since I have built and modified 3D printers I know Marlin firmware.

    HOWEVER, I wanted to learn something new and decided to go the Arduino Uno and Prontoneer (spelling?) CNC GRBL Sheild for my machine.
    the Mechanics of the machine are fine, but I know absolutely nothing about setting up GRBL.
    I have read through the docs and I still have a couple of questions.

    Below is my current settings for GRBL

    $0=10 (step pulse, usec)
    $1=25 (step idle delay, msec)
    $2=0 (step port invert mask:00000000)
    $3=0 (dir port invert mask:00000000)
    $4=0 (step enable invert, bool)
    $5=0 (limit pins invert, bool)
    $6=0 (probe pin invert, bool)
    $10=3 (status report mask:00000011)
    $11=0.010 (junction deviation, mm)
    $12=0.002 (arc tolerance, mm)
    $13=0 (report inches, bool)
    $20=0 (soft limits, bool)
    $21=0 (hard limits, bool)
    $22=0 (homing cycle, bool)
    $23=0 (homing dir invert mask:00000000)
    $24=25.000 (homing feed, mm/min)
    $25=500.000 (homing seek, mm/min)
    $26=250 (homing debounce, msec)
    $27=1.000 (homing pull-off, mm)
    $100=200.000 (x, step/mm)
    $101=200.000 (y, step/mm)
    $102=200.000 (z, step/mm)
    $110=400.000 (x max rate, mm/min)
    $111=400.000 (y max rate, mm/min)
    $112=400.000 (z max rate, mm/min)
    $120=10.000 (x accel, mm/sec^2)
    $121=10.000 (y accel, mm/sec^2)
    $122=10.000 (z accel, mm/sec^2)
    $130=200.000 (x max travel, mm)
    $131=200.000 (y max travel, mm)
    $132=200.000 (z max travel, mm)

    Lines 100-102 and lines 110-112 I must be an idiot because I cannot figure out how to properly determine these settings. help?

    Also, I understand the latest version of GRBL supports spindle speed control. but i'm confused at how to go about implementing this? it talks about pin out, but my GRBL Shield doesn't appear to have a place for this? help?

    Thanks to any and all that can help me, I really appreciate it!
     
  2. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,915
    Likes Received:
    1,619
    Lines $100-102 will depend on belt pitch and what pullies you used. It will also be dependent upon the stepper motors you choose. Most of us use 1.8 degree (200 steps/ revolution) steppers . You also have to factor in the microstepping you chose. Prusa calculator: RepRap Calculator - Prusa Printers If you are set to 1/16 microstepping with GT2 belt and an 8 tooth pulley, your setting may be right. I

    Also read this: Configuring Grbl v0.9 · grbl/grbl Wiki · GitHub it explains it better than I can. I used the 100-102 info there to calculate the movement of my lead screws. It also tells you about the other $ values in question. My maxes are over ten times faster than what you have there for your $110-112.

    As for spindle speed, you may just have to use the Arduino Pin if you can't find the proper spot to hook it up on your shield. I am pretty sure it is there though. However, I am looking at the real Protoneer board and not a clone. I just looked at a picture of the 3.51 version and I see it. Spn en (pwm)
    [​IMG]
     
    #2 Giarc, Dec 8, 2016
    Last edited: Dec 8, 2016
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,275
    Likes Received:
    1,833
    To enable spindle speed control they had to use pin 11 , so pin 11 and 12 swapped.
    This is because not all pins on the chip can do everything.
    On the protoneer board, pin 11 connects to Z+ limit and pin 12 connects to SpnEn.

    So, to use PWM spindle speed control you need to connect the spindle to the pin labelled Z+ limit.
    And then the actual Z limit must connect to the pin labelled 'Sp En' (if you are using limit switches).

    if you do not want PWM spindle, just on/off, you can edit the config.h file to disable spindle PWM control, and then your board will work as labelled.
    The config.h file is in
    (arduino sketchbook)\libraries\grbl\config.h
    Open it with notepad, the arduino editor is crazy and does not allow you to open 'just any file'.

    Having edited the config.h you need to compile and upload to the Arduino.....
    Flashing Grbl to an Arduino · grbl/grbl Wiki · GitHub

    Hopefully Protoneer will bring out a V4 board with jumpers to select between these 2 options.
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,275
    Likes Received:
    1,833
    You can use the calculator at
    GRBL settings calculator
    to calculate the $100-$102 values. After that you can fine tune the settings using the method at
    HOWTO Calibrate your CNC Machine for MACH3 or GRBL

    The values for $110-$112 and $120-$122 you determine by experimentation.
    Your current values are very low (-:
    How to do it?
    Take one axis at a time
    double the value for speed.
    command some moves, G0 X500, G0 X0
    if it gets stuck and loses steps, reduce by 20% and try again
    if it moves just fine, double it again.
    (you may need to increase accceleration so it gets up to the speed within the travel limit)

    Once you have found a reliable maximum speed, you can start the same process with the acceleration.

    I have found that aiming for the max speed can result in a lower max acceleration, with the result that shorter motions never get up to full speed, thus taking longer.
    What to do? reduce max speed and increase acceleration. for each max speed there is a matching max acceleration that work nicely together. Experiment...
     
    Mark Carew likes this.
  5. woofguy

    woofguy New
    Builder

    Joined:
    Sep 13, 2016
    Messages:
    9
    Likes Received:
    0
    so attached is a wiring diagram for my spindle, i assume the "mach 3" connection is pwm? Screenshot_20161208-191049.png
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,275
    Likes Received:
    1,833
    no, not PWM, a 0-10v DC signal that sets the speed. you will need an interface board that takes the PWM signal from the Arduino and turns it into 0-10v signal for that input.
     

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