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. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Maybe this is a dumb question but how are you using LPT pins to communicate with GRBL?
     
  2. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    He's using GRBL to drive his old LPT based CNC. Not the other way around.

    MG
     
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,455
    Likes Received:
    1,915
    Not a direct converter, but we have brains for this... (-:

    From your Z picture...
    200 steps per rev, direct stepping (no microsteps) on a 0.5mm per rev leadscrew is 200 steps for 0.5mm, ergo 400 steps for 1 mm.

    The full formula is
    steps per mm = (motors steps * microsteps) / pitch

    The speed of 25mm/s is 1500mm/min (just multiply by 60 to go from seconds to minutes)

    we could also use the Z part of the calculator at GRBL settings calculator
    which gives the same answer.... (the X and Y parts are for belts)

    gc.png

    Note that you will be able to drive your machine faster if you use microstepping drivers running at higher voltage and swap the leadscrews for courser pitch. Common leadscrews on OB machines are 8mm pitch.

    So if you swap to 8mm pitch leadscrews and 16x microstepping (the DQ542 drivers can do this)
    (200 * 16) / 8 = 400 steps/mm and you still have the same resolution of 0.0025mm per step but the axis will be able to move much faster because the motor does not have to turn as fast. (you will hit the GRBL step rate limit at about 4500mm/min).

    Yes, I know know microstepping is not as accurate as a full step. You have to decide what is good for your machine and what you use it for.
     
    Peter Van Der Walt likes this.
  4. miharix

    miharix New
    Builder

    Joined:
    Jan 16, 2020
    Messages:
    2
    Likes Received:
    0
    @Metalguru
    &
    @David the swarfer

    Manny thanks for all the grat info!
    My old CNC is finally moving :) - time to fine tune & upgrade it (RsPi WiFi control...)

    also, for reference....if some one finds this by google....

    My biggest and totally stupid mistake was,
    that I misread the connection picture from gnea/grbl

    I some how didn't noticed that pin 0 & 1 are not X & Y pulse :banghead:,
    but they should stay not connected (of course, they are for serial over USB)
    Didn't noticed that until I probed pins whit an oscilloscope. :oops:
    And I was wondering whats wrong in my config that nothing moves
     
  5. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    Hi, I'm building my first CNC and been running an Arduino Uno with GRBL and UGS. After the last test (which went fine) I can't make the machine move in negative direction on any axis. I've been reading documentation and doing some research but can't fix it.
    Nothing changed between the last test and now, the electronics are untouched. Can anyone point me in the right direction please? Very much appreaciated. Thank you
     
  6. Gary Caruso

    Gary Caruso OpenBuilds Volunteer
    Staff Member Moderator Builder

    Joined:
    May 19, 2016
    Messages:
    1,193
    Likes Received:
    532
    Maguru, check your "DIR" signal wiring.
    Gary
     
  7. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    I will, but I don't think it's that because it was working fine during the last test and I didn't re-wire anything. Also, it's all the motors that don't work on the negative direction. I see the position changing on UGS but nothing happens on the hardware.
     
  8. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Well, FWIW, flaky wiring is always fine until it's not. Check your ground wires, too.
     
    Peter Van Der Walt likes this.
  9. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    Truth, I will check tomorrow and post back. Thank you for your answer.
     
  10. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    So lemme get this straight:

    You can jog any axis (X,Y,Z ) with the + jog button, and it moves. Use the - jog button on any axis and it does not move. Correct?

    It was working properly, you didn't change ANYTHING, and now it's not working...

    This is very strange. It's almost like your direction pins are not changing. Or the motors are not getting enabled in one direction.

    What type of stepper drivers are you using?

    MG
     
  11. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    That is correct, I can't jog in negative direction, and when I send a Gcode File it only moves in positive direction, the negatives are ignored. Same goes for Returning to Zero. It was working fine, I made several tests a day prior to this malfunction happening. I am using 3 Nema 23's for X and Y, and a Nema 17 for Z, the drivers are all TB6600 and the board is an Arduino Uno. I will do as
    phil from seattle said and double check the connections, he mentioned the ground and now I'm suspicious because I focused mostly on DIR and Pulse wiring. Hopefully it's that...
     
  12. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    If you are using optoisolated stepper drivers (TB6600 drivers usually are) there is usually no ground connection required. Depending on how you wired them up, of course. Normally, all the opto +'s are wired together to 5v, and all the -'s go to the signal pins on the Arduino. This is for active low signal polarity. For active high signal polarity, they are wired opposite, all -'s go to ground and all +'s go to arduino outputs. Check the enable lines, and the 5V line.

    Just thought of something, check your $130, $131, and $132, they should be set correctly, and Soft Limits should be disabled.

    MG
     
  13. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
  14. stuart wallace

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    57
    Likes Received:
    6
    Hi there,
    Thanks to y'all for helping us newbies. We really appreciate it. I'm having two issues. My machine is a lead 1010 with the high z mod.

    1) It feels like I should be able to move my machine further back, but I can't. I tried adjusting the max travel, but even when I do that, and try to jog the machine further back, it still gives me the 'error 15 jog target exceeds machine travel. Command ignored. $J=G91G21Y10F4999. See photos 5347 and 5346. Currently max x travel is 747mm and y is 740mm. This isn't really a huge deal, but I suspect something may be amiss. If y'all see the photos and numbers and think that all looks correct, then I'm good to go.

    2) I've finished my spoilboard and am ready to surface it. I did homing set x and y. Then did the paper trick to set z. (I have used the wizard to calibrate z). See IMG 5349. I left the surfacing wizard at the default 3mm skim and that looked like too much. I stopped the run and changed it to 1mm. That still looked like too much so I stopped the run. Then I changed it to skim .25mm and that still looked like too much. I measured with my really nice caliper that it was actually skimming just a little over 1mm (even though I was telling it to skim .25mm).

    It's getting late and I'm out of ideas. Many thanks for any thoughts.
    all the best and take care
    stuart
     

    Attached Files:

  15. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Actually, you can wire the opto inputs in 2 ways, sig/gnd or +5/sig. It works either way - think of +5 as + and gnd as -.
     
  16. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    I'm really a newbie so I really appreaciate you taking the time to reply. The wiring I made is different to that. I'd have to double check but I'm not at the shop now. I daisy chained all the negatives to the ground. Can't remember the Arduino pins. But something like this.
     
  17. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    Then I will rewire everything and make it this way. Thanks

    I will check the settings for those parameters. Honestly, I don't know what signal polarity means so I have to do some reasearch on that. But thank you very much.
     
  18. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    You can use either method, it makes no difference. Other than one method requires you to invert the $2 and $4 parameters in GRBL settings.

    MG
     
  19. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    1) You should be able to move the machine until the gantry plates physically contact the ends of the c-beams. Set the $130, $131, $132 correctly for the size of your machine. Make sure $20 Soft Limits is disabled.
    2) Did you check your Z axis calibration? If you tell it to move 20mm, does it? If not, it needs to have the calibration constant ($102) checked.

    MG
     
  20. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    5v ..........___
    0v _____|....|______ Active high

    5v _____......_____ Active low
    0v ........|__|

    MG
     
    #1010 Metalguru, Jan 30, 2020
    Last edited: Jan 30, 2020
  21. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    I checked and all connections were solid. So I changed to another ground pin on the Arduino and now it works. It didn't even crossed my mind. No idea if the pin is fried or what, but it works!
    Thank you both and sorry to be a nuisance. This was the first time on the build that I've felt clueless as to what to do.
     
  22. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Not a nuisance at all. Flaky wiring always has weird symptoms - "I didn't do anything" is the clarion call to check the wiring. I was having strange intermittent behavior with my probe and it turned out to be a bad connector.
     
  23. maguru

    maguru New
    Builder

    Joined:
    Jan 30, 2020
    Messages:
    9
    Likes Received:
    1
    I have just been trying different speeds and accel. and I'm truly at awe, thank you very much!
     
    Peter Van Der Walt likes this.
  24. PaulN

    PaulN New
    Builder

    Joined:
    May 23, 2019
    Messages:
    13
    Likes Received:
    4
    Hey folks,

    I was in the middle of a cut yesterday and my X axis made a terrible sound. I reloaded the control software this morning but no good. I did notice that the "Abort" button does not go out when selected, also the "Home All" is not active.

    Things I have tried:
    1. Reload software
    2. Checked movement of motor by hand - no resistance
    3. Reset button on Blackbox!

    Any help would be appreciated.



    upload_2020-2-8_10-5-44.png
     
  25. Gary Caruso

    Gary Caruso OpenBuilds Volunteer
    Staff Member Moderator Builder

    Joined:
    May 19, 2016
    Messages:
    1,193
    Likes Received:
    532
    Hi Paul,
    “Motor makes terrible noise” Almost always a wiring issue, broken or loose connection, take a real good look.
    Cheers
    Gary
     
  26. PaulN

    PaulN New
    Builder

    Joined:
    May 23, 2019
    Messages:
    13
    Likes Received:
    4
    Gary,

    Found the issue loose "yellow" wire at Blackbox connection point

    "Abort" is still active not sure about this - "Home Al"l is not active


    Thanks!!
     
  27. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,783
    Likes Received:
    1,364
    Have you reset/restarted your blackbox since you found the issue? (the old turn it all off and on again method)
    Alex.
     
  28. PaulN

    PaulN New
    Builder

    Joined:
    May 23, 2019
    Messages:
    13
    Likes Received:
    4
    Okay - found the "limit switch installed" switch off

    Strange - suspect operator error!!

    Thanks again!
     
    Alex Chambers likes this.
  29. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,047
    Likes Received:
    4,313
    It checks your Grbl settings, if "Homing Switches Installed" is not ticked, button is deactivated (to avoid accidental "homing" on machines without switches)
     
    PaulN likes this.
  30. dazeddnc

    dazeddnc New
    Builder

    Joined:
    Feb 18, 2020
    Messages:
    2
    Likes Received:
    0
    I've been foolishly thinking I would just tap the serial pin on my arduino mega to spot when G38.2 is sent.
    I wanted to use that to trigger a servo that is attached to an arduino pro mini.
    It worked fine if manually sending commands. But loading and sending a job was totally broken.
    After many hours of dissecting the failure mode...it began to sink in...gcodes are buffered in memory at the arduino.
    Just because the code is sent over serial doesn't mean squat in terms of when to actuate the servo.

    I want to have a servo that brushes my cutter with a spring.
    This will complete the touch plate circuit during a probe cycle. Once it's done...I want it to swing back out of the road.

    So, I'm trying to figure out...what is the line of code that starts the probe cycle?
    When G38.2 is plucked from the buffer, I need to turn on an I/O pin or something that can talk to the pro mini and tell it to actuate the servo.

    I figured I would use G92 to swing the servo away, but it'd probably be more appropriate to turn off the pin or whatever following completion of the probe cycle since I'm going to have to meddle with source code anyhow.

    I just don't know what I'm looking for in terms of when/where execution of the G38.2 command begins and ends.
     

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