Welcome to Our Community

Some features disabled for guests. Register Today.

Can Black Box control CNC spindle and Laser?

Discussion in 'Controller Boards' started by Michael Forte, Dec 1, 2019.

  1. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    Hi,
    I'm looking at upgrading the Smoothieboard 5XC on my OX to an OpenBuilds Blackbox controller due to the simplicity of the Blackbox design. However, I want to have it run my CNC spindle in addition to a laser (JTech 2.8W). Of course, only one would be used at a time. Is there a way to do this?
    Thanks for any help!
     
    #1 Michael Forte, Dec 1, 2019
    Last edited: Dec 1, 2019
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    You can wire a toggle switch into the PWM line to switch the PWM signal between the two?
    or use a DSDT relay with the Direction signal/ coolant signal to switch between the two using gcode.
    Or just wire both in parallel and only power on the relevant tool?
     
  3. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    Thanks for the quick reply! I love the toggle switch idea as it's so simple. I I ordered my Blackbox over the weekend in anticipation that I could do it with no problem. Can't wait to get it!!!
     
    Peter Van Der Walt likes this.
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    You may also need to setup your CAM software -> gcode headers to include a $32=0 for CNC work and $31=1 for laser mode :)
     
  5. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    That's good to know. GRBL is completely new to me as I have been using Smoothieware.
     
    Peter Van Der Walt likes this.
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    :) Luckily its a lot simpler! Have a bedtime read through github.com/gnea/grbl/wiki (And yes also a lot less reading than the Smoothie wiki)
     
  7. mrjoedave

    mrjoedave New
    Builder

    Joined:
    Jun 18, 2015
    Messages:
    12
    Likes Received:
    2
    Have you gotten to put this together yet? I am working out a similar set up. I had been doing the parallel wiring option, but want to clean things up a bit.
     
  8. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    I have everything wired up and did a test with the laser with success. I'm waiting for a new spindle controller so I can use the 0-10V PWM as my existing one burned out recently. Everything else seems to be working well.
     
    Peter Van Der Walt likes this.
  9. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    don't forget, if you are doing a $32 change in Gcode then you must put a G4 P0.1 after it.
    this forces GRBL to sync and wait for the EEPROM write to finish before continuing.
     
    Peter Van Der Walt likes this.
  10. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    Hi David,

    I'm not sure I follow. Where do put the G4 P0.1??
     
  11. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    to change to laser mode you have to do
    $32=1

    if you do that from the manual command line then that is all you need. you could also put it in the code for a macro button, and a similar button with #32=0 to go to mill mode.

    However, if you wish to have 1 file that does some milling AND some lasering thne it has to change modes by itself and th emode change requires an EEPROM write which is slow compared to other commands and it may not be finished before the cutting starts.
    . thus:
    Code:
    %
    G21 G54 G90 G17
    $32=0 ; set mill mode
    G4 P0.1 ; wait for EEPROM write, the amount of time does not matter, the G4 command forces a queue sync
    M9 ; select spindle with the coolant output
    M3 S12000 ; turn on spindle
    { do a bunch of milling here }
    M5 ; spindle off
    
    ; now select laser
    M8 ; select laser output via coolant pin (or is it M7?)
    $32=1 ; set laser mode
    G4 P0.1 ; sync
    M3 S6000 ;  set laser power
    { do a bunch of laser cutting }
    M5 ; laser off
    M30
    %
    
    note that the above leaves it in laser mode so the next milling operation will have to reset $32 itself, or you the operator will have to make sure of the mode.

    I plan to wire my laser in using the coolant pin to switch the PWM signal so I have thought this through (-:
     
  12. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    Wow! I never even thought of having it automatically switch. I am going to leave my setup very manual when it comes to switching between the two as I want them to be very distinct operations. When milling, I don't want my laser to be susceptible to dust/water so I made it removable. I'm curious how you will keep your laser clean.
     
    Peter Van Der Walt likes this.
  13. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    Hehe, yeah, me too. Hoping the vacuum will keep the chips off it.
     
  14. Rick 2.0

    Rick 2.0 OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Dec 20, 2013
    Messages:
    2,892
    Likes Received:
    1,551
    Gentlemen, put a cap on it. (Just don't forget to remove it when the time comes.)
     
  15. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Could automate that too, so that if the code controls a switch to say, the laser driver's power input, that same toggle will also move a servo to remove the laser's dust cover.

    Just wondering here if it makes any practical difference to the convention of lasers' coordinates being positive and mills' negative. Seems like it could potentially come up if one or the other is done with dedicated software vs both being done within the same CAM setup (eg. in Fusion using a very high speed engraving tool to represent the laser?).
     
  16. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    I just did some cutting of carbon fiber sheets under water this morning with a 2mm compression bit and a 400w spindle on my OX. Let's just say I'm glad the laser is removable. Something messed up in my gcode from Fusion (G19 commands) and drove the z axis down a few mm where the chuck hit the water. Water sprayed everywhere. Luckily I have an enclosure around it.
     

    Attached Files:

    Peter Van Der Walt likes this.
  17. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
  18. Michael Forte

    Builder

    Joined:
    May 15, 2015
    Messages:
    16
    Likes Received:
    10
    I have the Jtech 2.8W laser and their magnetic shroud. Still working and a repeatable magnetic base to stick it to.
    That laser you have is really nice. I bookmarked the page just in case I need another laser one day.
     
  19. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    I don't think this comes into it since you are setting the WCS in GRBL and everything for the mill and laser is relative to that, so conventional 'laser' coordinates systems don't come into it at all. grbl does not care whether it is a laser or not in terms of using the gcode relative to the WCS.

    my idea is to zero the mill in G54 and zero the laser in G55 for a seamless transition, hopefully.
     
  20. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Yeah, that's true. G54/G55 makes the most sense, for sure. My concern was more in terms of what CAM would be spitting out, I suppose, since it could differ in terms of its defaults, but realistically you're zeroing off something else for your WCS anyway, so I don't see any reason to worry about it. Just something that popped to mind when thinking about both systems simultaneously.
     
    David the swarfer likes this.
  21. Gregg Wood

    Builder

    Joined:
    Mar 18, 2019
    Messages:
    1
    Likes Received:
    0
    What settings would i have to add or change to add a laser to my workbee cnc with black box?
     
  22. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    Mostly $32 - see gnea/grbl
     
  23. stuart wallace

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    57
    Likes Received:
    6
    I recently did this (see attached). Someone on the jtech fb group posted about this and I got it to work. Now I'm starting to think of super pid... Is it asking too much of my blackbox and my brain's feeble wiring skills to add a super pid to this configuration?

    http://www.vhipe.com/product-private/SuperPID-v2_Instructions.pdf
     

    Attached Files:

  24. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    You can, same as your diagram, the PWM signal wire to the SuperPID passes through your switch

    Just remember to set $30 gnea/grbl so the spindle speed scales correctly
     
    stuart wallace likes this.
  25. LucasMichael

    Builder

    Joined:
    Mar 8, 2021
    Messages:
    1
    Likes Received:
    0
    Hello, have you decided on their versions? In a way I'm wondering too, but after the reviews, price = quality? :)
     
  26. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
  27. reichertd

    reichertd New
    Builder

    Joined:
    Apr 10, 2019
    Messages:
    1
    Likes Received:
    0
    I am a little late to this party, but I was looking at this, if I am running a 3-wire laser setup AND a VFD (that would be 3.3.2 and 3.3.5 in manual) they share a ground, but the laser using the ground and PWM, while the VFD uses the ground and the 0-10V ports on the toolhead plug, could these be both left connected, and just use the $31 command to switch between the 2, but never having to disconnect or use a switch like a few people said.
     
  28. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    For this setup, control which device is powered up. Laser PSU on, and VFD off = laser mode. Laser PSU off, and VFD on = Spindle mode
    0-10v is derived off the same spindle PWM output (Grbl has only one pwm toolhead. PWM, Servo, 0-10v all the same command/pin)
     

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