Welcome to Our Community

Some features disabled for guests. Register Today.

Shapeoko CNC router - Not working M3 ,M5 Command

Discussion in 'CNC Mills/Routers' started by Vmgobinath, Nov 29, 2019.

  1. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Hi,
    I have Shapeoko CNC router and want to use servo motor using PWM pin (D11) via universal gcode sender
    But unfortunately, M3, M4 or M5 code is not making any movement on servo motor (MG955) like rotating or on or off the servo motor which is attached with PWM pin , 5V and Grd. No error also not showing in the universal gcode sender.

    is there any modification required on config .h and upload grblupload once again?

    Anyone can support me to solve this issue?

    Info: GRBL version 1.1
     

    Attached Files:

    #1 Vmgobinath, Nov 29, 2019
    Last edited: Nov 29, 2019
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,993
    Likes Received:
    4,107
    You need a Servo capable Grbl build, stock Grbl does not support Servos. See cprezzi/grbl-servo

    Then control it with M3 Sxxx where xxx = number between 0 and 255
     
    Vmgobinath likes this.
  3. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Thanks a lot. I will try and tell you the feedback.
     
  4. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Sorry to say. Still not working M3 or M5

    Please support
     
  5. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,993
    Likes Received:
    4,107
    That developer (cprezzi) does not offer support, so you will need to play with it on your own, or perhaps the supplier of your machine/controller can offer advice.

    See cprezzi/grbl-servo
    Compile and upload. Perhaps you did not upload correctly?
    Or have it wired wrong?
    Are you sending M3 Sxxx (not M3 on its own)

    Or replace your controller with an OpenBuilds BlackBox BlackBox Motion Control System
    then you can use: OpenBuilds BlackBox 4X Documentation
     
  6. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Thanks alot. One more time I will upload and try.
    I ahve tried M3/ M03 / M3S1000 / M03S10000/ M03225/ M3 225
     
  7. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Still not working
     
  8. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Wow worked out ......$32 - laser was enabled and set to 0 Now working

    Thanks a lot for your kind support.
     
  9. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Oops stop working when I tried to universal gcode sender
     
  10. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Servo working very fine with following code

    Conclusion :
    1. Servo Motor is fine
    2. Connection is Fine
    3. Power for Servo also ok

    May be issue

    .1 GRBL command
    2. UGS - Options
    3. Current Settings



    Code:
    #include <Servo.h>

    Servo servo;
    int angle = 0;

    void setup() {
    servo.attach(11);
    servo.write(angle);
    }


    void loop()
    {
    // scan from 0 to 180 degrees
    for(angle = 0; angle < 80; angle++)
    {
    servo.write(angle);
    delay(15);
    }
    // now scan back from 180 to 0 degrees
    for(angle = 50; angle > 0; angle--)
    {
    servo.write(angle);
    delay(15);
    }
    }
     
  11. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,993
    Likes Received:
    4,107
    Doesnt UGS or your gcode include a $32=1 somehow? (overwriting your settings back to laser mode)

    Use software.openbuilds.com instead
     
  12. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    Thanks alot.. working fine now
     
  13. Vmgobinath

    Builder

    Joined:
    Nov 29, 2019
    Messages:
    10
    Likes Received:
    0
    I have connected one servo motor with pwm pin (D11). I want to connect one more servo ..is it possible ? If yes which pin and how to control via gcode ?
     
  14. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,993
    Likes Received:
    4,107
    All those questions are limited by Grbl's functionality, it has only one PWM output by default (stock grbl uses that pin for spindle and laser, cprezzi's fork uses it for servo pwm) - see gnea/grbl for details on how the available pins are used
     

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