Welcome to Our Community

Unlock hidden features. Sign Up for Free Today!

Spindle, how does it work?

Discussion in 'CNC Mills/Routers' started by dareblix, Jun 2, 2016.

  1. dareblix

    dareblix New
    Builder

    Joined:
    Jun 2, 2016
    Messages:
    5
    Likes Received:
    0
    Hello everyone i have a lot of questions about the spindle but let's make it simple, what it is? How do i set up the spindle in grbl? I'm using CNC shield (the red one idk the name) and what kind of motor should i use? I actually have a chicago eléctric 110v dremel can i use it? And i think that's all any sugestion would be great! thanks for read
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    521
    Likes Received:
    250
    the 'spindle' is the router/dremel/other thing you are using to cut stuff with on the cnc machine.

    You can just switch it on and off yourself, or you can connect it through a relay to GRBL an have the G-code turn it on and off as needed. OR, with some speed control electronics between the shield and the spindle you can control the speed....
    GRBL’s PWM functionality – How to control a laser or variable speed spindle. | Protoneer.co.nz

    GRBL has 2 pin outputs that can control spindles, but what they do exactly depends on the version of GRBL.
    The 2 pins are for on/off/speed and direction.

    in the latest version, 0.9j, the default is to have PWM spindle speed control enabled and this uses different pins.
    older versions had this disabled by default and your cnc shield probably expects this setup.
    details here Connecting Grbl · grbl/grbl Wiki · GitHub

    You can change the option in GRBL (by recompiling in Arduino IDE) so that the pins match your shield.

    Is your shield one of these?
    Arduino CNC Shield V3.XX – Assembly Guide | Protoneer.co.nz
     
  3. dareblix

    dareblix New
    Builder

    Joined:
    Jun 2, 2016
    Messages:
    5
    Likes Received:
    0
    Hello thanks for your explanation, it is this one, i was wondering how should i connect it physically? Can i use a 110v dremel? Dremels usually has universal motors, and it work with ac/dc but i'm not sure if i can use it with grbl, i'll use a 1/8 endmill to cut
     

    Attached Files:

  4. dareblix

    dareblix New
    Builder

    Joined:
    Jun 2, 2016
    Messages:
    5
    Likes Received:
    0
    Also i'm using grbl 0.9 idk if 0.9j it's compatible with grbl shield
     
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    521
    Likes Received:
    250
    The GRBL board can only output 5 volts at very low current. So you have to use a relay to switch the 110 volts for the dremel.

    Also, you need to turn off the PWM option, recompile GRBL , and load it onto the Arduino. Follow the instructions on the GRBL web site to install Arduino IDE and then the GRBL library.
    Then, use notepad to open the file
    c:\users\yourusername\sketchbook\libraries\grbl\config.h
    (I may have got the path slightly wrong).
    In that file, change
    Code:
    // Enables variable spindle output voltage for different RPM values. On the Arduino Uno, the spindle
    // enable pin will output 5V for maximum RPM with 256 intermediate levels and 0V when disabled.
    // NOTE: IMPORTANT for Arduino Unos! When enabled, the Z-limit pin D11 and spindle enable pin D12 switch!
    // The hardware PWM output on pin D11 is required for variable spindle output voltages.
    #define VARIABLE_SPINDLE // Default disabled. Uncomment to enable.
    
    to
    Code:
    // Enables variable spindle output voltage for different RPM values. On the Arduino Uno, the spindle
    // enable pin will output 5V for maximum RPM with 256 intermediate levels and 0V when disabled.
    // NOTE: IMPORTANT for Arduino Unos! When enabled, the Z-limit pin D11 and spindle enable pin D12 switch!
    // The hardware PWM output on pin D11 is required for variable spindle output voltages.
    // #define VARIABLE_SPINDLE // Default disabled. Uncomment to enable.
    
    recompile and upload.

    Now GRBL can turn the Spindle Enable pin (D12) on and off in response to M3 and M5 commands in the Gcode.

    That pin can only supply 5 volts at less than 40mA, so we have to have a relay in between.

    You need something like this
    SparkFun Beefcake Relay Control Kit - KIT-11042 - SparkFun Electronics
    That is a kit you have to build but I am sure you can find them ready built.
    like this
    Isolated Relay Circuit
    which is used in this example
    Inventables Blog: Shapeoko Upgrade - Quiet Cut Spindle with gShield and Relay
    (without the speed controller and 48V supply since your Dremel type tool does not need one)
     
    Joe Santarsiero likes this.
  6. dareblix

    dareblix New
    Builder

    Joined:
    Jun 2, 2016
    Messages:
    5
    Likes Received:
    0
    Okay my CNC shield has 2 spindle pins i guess i'm not sure what of them should i use. Can you explain the M3&M5 g commands?
     
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    521
    Likes Received:
    250
    The pins are
    • Spindle direction
    • Spindle Enable
    since you are attaching a dremel that only goes one way round, you don't need the direction pin to be connected.

    M3 is "Spindle on clockwise"
    M4 is "spindle on anticlockwise" (this would involve the direction pin)
    M5 is "spindle off"

    Please read this http://linuxcnc.org/docs/html/gcode/overview.html
    Note that GRBL only supports a small subset of the codes listed there but can get the job done despite that.
     
  8. dareblix

    dareblix New
    Builder

    Joined:
    Jun 2, 2016
    Messages:
    5
    Likes Received:
    0
    Thanks for your explanations i'll try all these stuff :D
     

Share This Page

  • About Us

    The OpenBuilds Team is dedicated helping you to Dream it - Build it - Share it! Collaborate on our forums and be sure to visit the Part Store for all your Building needs!
  • Like us on Facebook

  • Support Open Source FairShare Program!

    OpenBuilds FairShare Give Back Program provide resources to Open Source projects, developers and schools around the world. Invest in your future by helping others develop theirs!

    Donate to FairShare!