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. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,291
    You need a Grbl compatible post processor. Ask on the CamBam forums, they'll know where to get one or guide you through creating one. List of gcodes supported by Grbl is about halfway down on : gnea/grbl
     
  2. Mantus

    Mantus New
    Builder

    Joined:
    Apr 8, 2021
    Messages:
    3
    Likes Received:
    0
    Hi everyone, I try to get an eggbot running on a arduino mega and ramps 1.4. There is a grbl hack "spindle_control.c" for the normal "grbl" arduino Uno that can be used for pen plotter and eggbots. Is there a way to use this code in the current "grbl-mega".

    By the way: I already tried to compile the standard grbl for the mega board and figured out that the pin mapping should be compatible (same pins numbers are defined in the CPU map) but it doesn't work. Also my favorite idea to inserting the "spindle_control.c" code in the "grbl-mega" leads to compiling errors.

    Is there a easy way to control a z-axis servo with grbl-mega?
     
  3. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,291
  4. Mantus

    Mantus New
    Builder

    Joined:
    Apr 8, 2021
    Messages:
    3
    Likes Received:
    0
    Thank you for your response. I was already thinking about buying a arduino uno to overcome this problem.

    Nevertheless, if I understand the challenge correctly. The main problem to use a servo on the spindle pwm pin is, to find the configuration value in grbl where you can change the spindle pwm from kHz zu around 50Hz.
    This should be independent of the used board and probably work also in the future with grblHAL.
     
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,435
    Likes Received:
    1,908
    if you look in gnea/grbl-Mega you will see it has a whole RAMPS section starting at line 135
    which defines spindle PWM on D8 at about 1.9khz
    I have not found a hack to change the frequency.

    However, if you run Marlin it already has servo outputs defined, you just need to configure it. Sadly the latest version can only be compiled in platformio (not Arduino) aso you will want to use the older V1 repo. Anyhow, the Marlin firmware docs will tell you what Gcode to send to make the servo outputs respond.
     
  6. Mantus

    Mantus New
    Builder

    Joined:
    Apr 8, 2021
    Messages:
    3
    Likes Received:
    0
    That's it. Marlin works out of the box. I used the last release 1.1.9. with arduino IDE. Thank you.

    I tried to change the prescaler in grbl but it doesn't work for me. In the end marlin was the easier solution.
     
  7. Clay Stahlka

    Builder

    Joined:
    May 31, 2020
    Messages:
    1
    Likes Received:
    0
    I have suddenly developed a problem. When advancing the X axis the Z axis goes up by a the same amount. I checked wiring and everything is fine with no noticeable loose terminals. When moving the Z axis independently, everything works fine, so no crossed wires. I am using Arduino Mega and TB6600 drivers. Everything worked well for many months until now.

    Any suggestion what might cause this?
     
    #1267 Clay Stahlka, May 13, 2021
    Last edited: May 13, 2021
  8. Gary Caruso

    Gary Caruso OpenBuilds Volunteer
    Staff Member Moderator Builder

    Joined:
    May 19, 2016
    Messages:
    1,193
    Likes Received:
    532
    Try a different control software and see if it is the same. UGS panel is easy to get and configure.
    Gary
     
  9. Blink

    Blink New
    Builder

    Joined:
    May 17, 2021
    Messages:
    4
    Likes Received:
    3
    Hi, would really appreciate any help on a homing issue. I have a flat bed cnc router running grbl 1.1h. I get the same result using Open Builds Control or UG Sender. When I Click <Home All> the Z axis homes, then the X axis motor just hums loudly with no movement. While the motor was humming I pressed the x axis limit switch and it is not functional. I get no error codes or windows, or any lines of code in the "serial console/console" window. X axis motor works flawlessly with every other process. Every other part of the machine works flawlessly. all limit switches work as intended at other times. Looking forward to any help on this issue. Thank you.
     
  10. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,291
    Does it move fine while jogging? If so, you may have set the Homing feedrates too high causing stalling: See gnea/grbl
     
    David the swarfer likes this.
  11. Blink

    Blink New
    Builder

    Joined:
    May 17, 2021
    Messages:
    4
    Likes Received:
    3
    Hi Peter, thank you for responding. Yes it moves fine while jogging. I think we have $24 set at 25 and $25 set at 500. Would need to confirm that tomorrow. If the z axis feed rate is ok should not the X axis be ok as you cannot set different rates for xyz. Or is it the case, its a different unique stepper motor therefore may not work with the same settings. Also no matter what we have it set at, is it (as you suggested) worth trying a lower setting.
     
  12. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,291
    As its a singular configuration parameter, you'd have to set it low enough to cope with all axes. 500 is not high though, so do check, maybe a typo and its more.
     
  13. Blink

    Blink New
    Builder

    Joined:
    May 17, 2021
    Messages:
    4
    Likes Received:
    3
    Thank you for the information. We will check on it tomorrow (11:30 at night here in Australia) and also try other feed rate settings as you suggest. Thanks once again.
     
    Peter Van Der Walt likes this.
  14. Blink

    Blink New
    Builder

    Joined:
    May 17, 2021
    Messages:
    4
    Likes Received:
    3
    Issue Solved. The homing was working fine, we just did not realize it. We thought the Z axis had completed its 2 steps ($25 and then $24) and then the humming was the start of the X axis homing. It sounded like a poling electric motor and we saw no movement, so we aborted. The Z axis had actually only completed its $25 (500) step. The loud humming was the Z axis $24 (25), so low we did not observe movement, just happens to be the noise a slow setting makes. We set $24 to (100) saw movement and realized the Z axis was still doing its $24 step. Probably would have eventually realized our mistake, but was solved a lot quicker and with a lot less headaches with direction from you as to where the issue may lie. Thank You. Great Forum.
     
  15. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
    mr. Jeon, ive chatted ith mr vanderbuilt, now he want me to buy a black box, but ive envested so much, time and money, i have an openbuilds table with sfu 16mm 5 pitch ball screws, arduino and tb6600 controlers my first table was 400mm by 400mm worked great, now ive evpanded to 1000 by 1500mm it used to work flawlssly till upgrade, tb6600 are set to 2.8 amps and 1/8 dtep seems to run good to a point, i can make it go 100cm in all axis when calibrating, but then comes problems, in jog mode if i go y pos it will somtimes go pos or somthimes go negitive , sometims in x axis too, below is my grbl settings, ive used t2 laser, laser grbl and openbuils cam and controls, if i design a box in any software when in fire ,up my cnc it doesa lid with an open box, if i do a circle it comes out nothing like a circle, i down loaded the butterfly in OB cam sent it to OB control, i started my cnc and it looks like a dragon with its wings, cut off, the only thing that works is the letter {L}if afaried if i buy a black box {witch i did last night} will not work either, most of open builds rods are 8mm mine is 16mm with, a 5 pitch, inspent $400 last night but i have a pile of arduino stuff still sitting around please im at an end thanks robert
     

    Attached Files:

  16. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    Robert:

    There are so many errors in your GRBL settings it's hard to know where to start. No wonder your machine is not working. Almost every setting is incorrect.

    Buying a Black Box is not going to help if you mess with its settings like you have done here.

    Go back to the GRBL WIKI on Github and carefully read the settings descriptions and follow the suggestions there. Read this also:
    GRBL Settings and Calibration – 3D Tech Works
    Note that the settings in this are examples only, and are for an older Ox style CNC. Don't use them for a Workbee.

    There are only two major differences between your machine and a standard Workbee, A) the length of the Y axis, $131, it should be 1500mm. $132 should be about 90, and $130 should be 1000. B) the calibration constants in $100-$102: these will depend on your screw pitch and microstepping settings. For example, I find it hard to believe your Z axis is 2000 steps/mm. Also, your acceleration settings are out to lunch.

    All the rest will work fine with the default settings. Use the settings for the Workbee 1510 for a starting point. DO NOT change a setting unless you understand exactly what it does. Sample 1510 GRBL settings file is attached.

    MG
     

    Attached Files:

    #1276 Metalguru, Jun 3, 2021
    Last edited: Jun 3, 2021
    David the swarfer likes this.
  17. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,291
    Tb6600s are dubious drivers at best. More often they are the worse TB6560 relabelled as the TB6600s. Theres a reason they are cheap...

    Money saved buying cheap stuff unfortunately doesnt help, if it cannot do the job. BlackBox is a high performance, great quality controller, with warranty, tech support, and what enables our free software.
     
    Metalguru likes this.
  18. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547

    I've been using TB6560 drivers for 6 years, (over 600 of them) and I can count the number of failures on 1 hand. You are sort of correct, a lot of the TB6600 drivers are not TB6600's at all, but they are not TB6560's either. The 6560's have manual dipswitches for setting hold current, and decay mode, which 6600's do not. True TB6600 drivers are awesome, one of the best stepper driver designs for their time, regardless of price. The 6560 and 6600 are both a bit long in the tooth, but still work flawlessly.

    Big difference between a few $10 TB6600 drivers and a $300 Gecko 540, but the former works just fine for a hobby class machine.

    And if the user messes with the GRBL settings like this fellow has, a Black Box wouldn't work so well either. His problem has nothing to do with stepper drivers and everything to do with proper setup.

    MG
     
    Rob Taylor and David the swarfer like this.
  19. PegasusUSA

    Builder

    Joined:
    Jun 3, 2021
    Messages:
    1
    Likes Received:
    0
    Hoping to get some assistance. I would be very greatful.

    Some backstory, I have an extruded aluminum cube, with an Arduino Uno, CNC shield, 4 stepper Drivers and Motors, 3 limit switches all set up correctly and working. I have the spindle on Z mounted horizontally with movement forward and rearward, I have the Y moving the spindle left and right. I have 2 steppers for X being the table (moving up and down) and they are cloned on X and A with the jumpers to clone X to A.

    When I run GRBL, $X, $H I get a perfect Homing action for z moving rearward, clicking the limit switch and moving off it. Y moves right, clicks the limit switch and moves off it.

    X is my problem.

    X reacts different each time.

    Some times it just moves up and down a small amount and stops. It never hits top (-) limit switch. Then as Y starts to travel to center, X starts to move down and bangs over an over at the bottom of the machine trying to keep going.

    Other times after Z and Y home correctly, X starts to move up and bangs at the top trying to keep going and the limit switch does not stop it.

    I think the GRBL code to move X upward a few MM is X-10 but sometimes that moves it up and sometimes that moves it down?!?! And if I enter X10 sometimes it goes down and sometimes it goes up?!?!
     
  20. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    Bad wiring to the X motor is the "random direction" thing, one of your phases isn't fully connected. Homing... Does your sender respond to you manually pressing the home switch? CNC Shields, if they're not official ones, frequently don't work in some way.

    Standard Cartesian CNC directions are the right hand rule- middle is Z+, index is Y+, thumb is X+. Same setup as Fleming's right hand rule. Personally I'd have Y+ going up and X+ going right, but Y+ going right and X+ going down is technically correct.
     
  21. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
    34356"]Robert:

    There are so many errors in your GRBL settings it's hard to know where to start. No wonder your machine is not working. Almost every setting is incorrect.

    Buying a Black Box is not going to help if you mess with its settings like you have done here.

    Go back to the GRBL WIKI on Github and carefully read the settings descriptions and follow the suggestions there. Read this also:
    GRBL Settings and Calibration – 3D Tech Works
    Note that the settings in this are examples only, and are for an older Ox style CNC. Don't use them for a Workbee.

    There are only two major differences between your machine and a standard Workbee, A) the length of the Y axis, $131, it should be 1500mm. $132 should be about 90, and $130 should be 1000. B) the calibration constants in $100-$102: these will depend on your screw pitch and microstepping settings. For example, I find it hard to believe your Z axis is 2000 steps/mm. Also, your acceleration settings are out to lunch.

    All the rest will work fine with the default settings. Use the settings for the Workbee 1510 for a starting point. DO NOT change a setting unless you understand exactly what it does. Sample 1510 GRBL settings file is attached.

    MG[/QUOTE]
     
  22. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
    I did as you said and ordered a black box and 3 nema 23 high tork motors,

    How do you know if a tb6600 has failed? All 4 light up, if I hook up just 1 db6600 to arduino and a motor it looks fine plus I tried on pin 2 and 5. 3 and 6. And 4 and 7 for each axis,

    Can they lihjt up and still be bad?
     
  23. JustinTime

    JustinTime Veteran
    Builder

    Joined:
    Dec 18, 2013
    Messages:
    780
    Likes Received:
    257
    [QUOTE="Metalguru, post: 116404, member: 34356"The 6560's have manual dipswitches for setting hold current, and decay mode, which 6600's do not.
    MG[/QUOTE]
    If my 6600 has those switches it's not a 6600 then?
     
  24. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
    Z axis is not being used, dip switches are set to 1/8 ,amps 2.7. Fyi still looking for a easy way to fest the db6600,
     

    Attached Files:

  25. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    If my 6600 has those switches it's not a 6600 then?[/QUOTE]

    Correct. It's a TB6560. TB6600's have automatic decay mode and auto 50% hold current (there may be a switch to enable/disable this feature, but you can't set the hold current). Other than that, they are pretty much identical. The TB6600 is a slightly newer design, but they are pretty much interchangeable.

    Unfortunately, a lot of Chinese suppliers call everything a TB6600, even when it's not.

    MG
     
    #1285 Metalguru, Jun 4, 2021
    Last edited: Jun 4, 2021
  26. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    You test it by hooking it up to a motor. If the motor runs, it's good. I've never seen one partially fail, ie work but not work properly. Generally, it either works properly or it doesn't work at all (magic smoke has been released). I suppose it could have a blown optocoupler or something, but pretty unlikely.

    MG
     
    #1286 Metalguru, Jun 4, 2021
    Last edited: Jun 4, 2021
  27. JustinTime

    JustinTime Veteran
    Builder

    Joined:
    Dec 18, 2013
    Messages:
    780
    Likes Received:
    257
    LOL, I feel a little better now. Just checked my drivers and they don't have the switches for the decay mode only for micro stepping and current settings (which my 540s have too).
     
  28. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
     
  29. robert christensen

    Builder

    Joined:
    Apr 2, 2020
    Messages:
    43
    Likes Received:
    2
    Ok, black box and 3 new nema 23 hight torque due tomorrow,
    1 turn off all power
    2 add new motors and check wires
    From here where should I go , I don't want to blow up anything,, connect to blac box??

    Thanks robert
     
  30. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,008
    Likes Received:
    1,676
    You will not go wrong by following the instructions here: docs:blackbox:start [OpenBuilds Documentation]

    That is what I did, and I have never had an issue. I have the first edition of the Blackbox and it is still going strong.
     
    Peter Van Der Walt likes this.

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