Welcome to Our Community

Some features disabled for guests. Register Today.

Fusion/black box/iot switch

Discussion in 'CAM' started by baum, Feb 8, 2020.

  1. baum

    baum New
    Builder

    Joined:
    Nov 26, 2018
    Messages:
    55
    Likes Received:
    7
    Hopefully an easy question..

    I would like to run an iot switch (like this: Controllable Four Outlet Power Relay Module version 2). Is there something special i need to do at the beginning/end of each tool in the program to trigger it? or does fusion already trigger the output on the black box?
     
  2. NthAxisWorkshop

    Builder

    Joined:
    Apr 11, 2018
    Messages:
    55
    Likes Received:
    24
    M3 turns the tools on. M5 turns them off. If you have something plugged into normally on, these commands invert. Simultaneously. That's all you can do with this setup. I pretty sure BlackBox has pins to control other accessories and an onboard relay( max 250 / 125 AC 10A,) If you use this relay, aim to be *under* the max rated and be careful switching inductive loads: use a cap and a resistor (or mov) across the load if you are switching motors, coils, and other relays. Here's some examples of protective measures for switching loads with relays. Good luck! upload_2020-2-9_9-17-25.png
     
  3. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    Grbl has coolant outputs too, one stock and one configurable when compiling from source through the Arduino IDE. Also a spindle direction pin, which most people don't use.

    The question is how that translates through the BlackBox hardware, which functions as an Arduino Uno (ie. should contain an ATMega 328P microcontroller IC, 5V, 16MHz) but I assume uses some non-standard Arduino hardware implementations as part of @Peter Van Der Walt's "hardening and simplifying" process.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,038
    Likes Received:
    4,123
    Its as close to original spec as possible!

    Coolant output does have a Mosfet in front of it though (simplified so users can just hook up a 24v solenoid or valve or DC pump without extra wiring) Of course the IoT relay takes 24vdc too, so wire up a second one, and then use that output to control the second IoT relay if you want to switch AC coolant.

    Other than that, M3/M5 (Don't forget the S-word - ie M3S1000) works as always where S = set by $30 and $31)
     
    #4 Peter Van Der Walt, Feb 10, 2020
    Last edited: Feb 10, 2020
  5. baum

    baum New
    Builder

    Joined:
    Nov 26, 2018
    Messages:
    55
    Likes Received:
    7
  6. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    M7 M8 M9 are your coolant commands (only one of either M7 or M8 works in vanilla grbl, I forget which), which you can select in your operation setup in Fusion. It'll automatically put in the M9 somewhere, I'm not sure if before the spindle turns off, after, only upon a toolchange command, no idea. You'd have to look into that. How you manipulate it and move them around to do what you're trying to do in post-processing is another matter.

    M3/M5 are your spindle commands, nothing to do with the other pins.
     
    Peter Van Der Walt likes this.
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,038
    Likes Received:
    4,123
    Just check your gcode, that it has M3S1000 (as M3 on its own doesnt set the PWM explicitly and last PWM value could have been something other than Max RPM. PWM can be used for spindle speed control if you have a SuperPID or VFD, otherwise set it to maximum so its on/off control to play nice with Relays)
     
  8. baum

    baum New
    Builder

    Joined:
    Nov 26, 2018
    Messages:
    55
    Likes Received:
    7
    I'm using open builds control of that matters

    Basically I want it to turn my router on at the start and turn it off at the end.
     
  9. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    You're using the IOT switch purely for your spindle and nothing else? You hadn't actually stated above what you were using it for, which is why I wasn't jumping into the spindle thing.

    In which case, as Peter says, just use M3S1000 to turn on, M5 to turn off, and plug the IOT input into your spindle output.
     
    Peter Van Der Walt likes this.
  10. baum

    baum New
    Builder

    Joined:
    Nov 26, 2018
    Messages:
    55
    Likes Received:
    7
    Sorry yes i want to simply using it to turn on the router (makita) and turn it off

    With the open builds post is there a way to do this in fusion or do i have to do it in an editor?
     
  11. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,038
    Likes Received:
    4,123

    @David the swarfer 's the author of that Post, and I'm not actually sure if it does add it :) so lets wait for him to reply
     
    baum likes this.
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,287
    Likes Received:
    1,837
    Yes, it always outputs M3/M5 commands for spindle control.
    If you tick 'flood' for the tool coolant, and turn on 'has coolant' it will also output M8/M9 for coolant on/off.

    Here is the tool selection
    flood01.png

    Here is the post setting
    flood02.png
    And here is the resulting Gcode , spindle on in blue and coolant on in red (oh dear, the editor lets me set colours in the code block, but it is not displayed in colour so I have inserted comments after ';' characters so just search for those
    Code:
    (Made in : Autodesk CAM Post Processor)
    (G Code optimized for OpenBuilds OX,Workbee,Sphinx,Lead with BlackBox GRBL V1.1 controller)
    
    (Program Name : 1001)
    
    (2 Operations in 1 files.)
    (File List:)
    (  1001.nc)
    
    (This is file: 1 of 1)
    
    (This file contains the following operations: )
    (1 : Face1)
    (  Work Coordinate System : G54)
    (  Tool  1: Bullnose End Mill 3 Flutes, Diam = 6mm, Len = 20.00mm)
    (  Spindle : RPM = 10000, set router dial to 1.0)
    (  Machining time : 11 sec)
    (2 : 2D Adaptive1)
    (  Work Coordinate System : G54)
    (  Tool  1: Bullnose End Mill 3 Flutes, Diam = 6mm, Len = 20.00mm)
    (  Spindle : RPM = 10000, set router dial to 1.0)
    (  Machining time : 10 sec)
    
    G90 G94
    G17
    G21
    
    (Operation 1 of 2 : Face1)
    
    G90
    G53 G0 Z0
    G54
    S10000 M3 ; spindle on at 10000rpm
    G4 P1.3
    M8 ; flood coolant on
    X34.882 Y0.66
    Z15
    X34.882 Y0.66
    X34.882 Y0.66 Z5
    G1 X34.882 Y0.66 Z-0.4 F1440
    X34.853 Y0.66 Z-0.585
    X34.768 Y0.66 Z-0.753
    X34.635 Y0.66 Z-0.885
    X34.468 Y0.66 Z-0.971
    X34.282 Y0.66 Z-1
    X31 Y0.66
    X1 Y0.66
    G17 G2 X1 Y3.29 Z-1 I0 J1.315
    G1 X31 Y3.29
    G3 X31 Y5.92 Z-1 I0 J1.315
    G1 X1 Y5.92
    G2 X1 Y8.55 Z-1 I0 J1.315
    G1 X31 Y8.55
    G3 X31 Y11.18 Z-1 I0 J1.315
    G1 X1 Y11.18
    G2 X1 Y13.81 Z-1 I0 J1.315
    G1 X31 Y13.81
    G3 X31 Y16.44 Z-1 I0 J1.315
    G1 X1 Y16.44
    G2 X1 Y19.07 Z-1 I0 J1.315
    G1 X31 Y19.07
    X31.185 Y19.07 Z-0.971
    X31.353 Y19.07 Z-0.885
    X31.485 Y19.07 Z-0.753
    X31.571 Y19.07 Z-0.585
    X31.6 Y19.07 Z-0.4
    G0 X31.6 Y19.07 Z15
    
    (Operation 2 of 2 : 2D Adaptive1)
    
    G54
    S10000 M3
    M8
    X-0.619 Y-6.9
    Z15
    X-0.619 Y-6.9
    X-0.619 Y-6.9 Z5
    X-0.619 Y-6.9 Z-9.8
    G1 X-0.619 Y-6.9 Z-10.4 F1440
    X-0.611 Y-6.872 Z-10.585
    X-0.59 Y-6.789 Z-10.753
    X-0.557 Y-6.66 Z-10.885
    X-0.516 Y-6.498 Z-10.971
    X-0.47 Y-6.319 Z-11
    G3 X0 Y-3.052 Z-11 I-14.839 J3.801
    G1 X0 Y-2.942
    X-0.177 Y-2.073
    X-0.181 Y-2.044
    X-0.237 Y-1.865
    X-0.344 Y-1.712
    X-0.494 Y-1.599
    X-0.524 Y-1.584
    X-0.597 Y-1.537
    X-0.798 Y-1.4
    X-0.999 Y-1.234
    X-1.056 Y-1.181
    X-1.2 Y-1.035
    X-1.251 Y-0.98
    X-1.415 Y-0.778
    X-1.549 Y-0.577
    X-1.603 Y-0.491
    X-1.662 Y-0.376
    X-1.759 Y-0.174
    X-1.834 Y0.027
    X-1.895 Y0.228
    X-1.943 Y0.43
    X-1.975 Y0.631
    X-1.985 Y0.832
    X-1.998 Y1.235
    X-2 Y1.437
    X-2 Y20.563
    X-1.998 Y20.765
    X-1.985 Y21.168
    X-1.975 Y21.369
    X-1.943 Y21.57
    X-1.895 Y21.772
    X-1.834 Y21.973
    X-1.759 Y22.174
    X-1.662 Y22.376
    X-1.603 Y22.491
    X-1.549 Y22.577
    X-1.415 Y22.778
    X-1.251 Y22.98
    X-1.2 Y23.035
    X-1.056 Y23.181
    X-0.999 Y23.234
    X-0.798 Y23.4
    X-0.597 Y23.537
    X-0.524 Y23.584
    X-0.396 Y23.651
    X-0.195 Y23.75
    X-0.106 Y23.785
    X0.007 Y23.826
    X0.208 Y23.889
    X0.409 Y23.939
    X0.61 Y23.972
    X0.811 Y23.984
    X1.214 Y23.998
    X1.415 Y24
    X30.585 Y24
    X30.786 Y23.998
    X31.189 Y23.984
    X31.39 Y23.972
    X31.591 Y23.939
    X31.792 Y23.889
    X31.993 Y23.826
    X32.106 Y23.785
    X32.195 Y23.75
    X32.396 Y23.651
    X32.524 Y23.584
    X32.597 Y23.537
    X32.798 Y23.4
    X32.999 Y23.234
    X33.056 Y23.181
    X33.2 Y23.035
    X33.251 Y22.98
    X33.415 Y22.778
    X33.549 Y22.577
    X33.603 Y22.491
    X33.662 Y22.376
    X33.759 Y22.174
    X33.834 Y21.973
    X33.895 Y21.772
    X33.943 Y21.57
    X33.975 Y21.369
    X33.985 Y21.168
    X33.998 Y20.765
    X34 Y20.563
    X34 Y1.437
    X33.998 Y1.235
    X33.985 Y0.832
    X33.975 Y0.631
    X33.943 Y0.43
    X33.895 Y0.228
    X33.834 Y0.027
    X33.759 Y-0.174
    X33.662 Y-0.376
    X33.603 Y-0.491
    X33.549 Y-0.577
    X33.415 Y-0.778
    X33.251 Y-0.98
    X33.2 Y-1.035
    X33.056 Y-1.181
    X32.999 Y-1.234
    X32.798 Y-1.4
    X32.597 Y-1.537
    X32.524 Y-1.584
    X32.396 Y-1.651
    X32.195 Y-1.75
    X32.106 Y-1.785
    X31.993 Y-1.826
    X31.792 Y-1.889
    X31.591 Y-1.939
    X31.39 Y-1.972
    X31.189 Y-1.984
    X30.786 Y-1.998
    X30.585 Y-2
    X1.415 Y-2
    X1.214 Y-1.998
    X0.811 Y-1.984
    X0.61 Y-1.972
    X0.409 Y-1.939
    X0.208 Y-1.889
    X0.007 Y-1.826
    X-0.106 Y-1.785
    X-0.195 Y-1.75
    X-0.396 Y-1.651
    X-0.494 Y-1.599
    X-0.67 Y-1.545
    X-0.757 Y-1.539 Z-10.994
    X-0.867 Y-1.559 Z-10.966
    X-0.97 Y-1.578 Z-10.917
    X-1.075 Y-1.642 Z-10.82
    X-1.156 Y-1.691 Z-10.694
    X-1.196 Y-1.731 Z-10.552
    X-1.21 Y-1.745 Z-10.4
    G0 X-1.21 Y-1.745 Z5
    X-0.619 Y-6.9
    X-0.619 Y-6.9 Z-17.8
    G1 X-0.619 Y-6.9 Z-18.4 F1440
    X-0.611 Y-6.872 Z-18.585
    X-0.59 Y-6.789 Z-18.753
    X-0.557 Y-6.66 Z-18.885
    X-0.516 Y-6.498 Z-18.971
    X-0.47 Y-6.319 Z-19
    G3 X0 Y-3.052 Z-19 I-14.839 J3.801
    G1 X0 Y-2.942
    X-0.177 Y-2.073
    X-0.181 Y-2.044
    X-0.237 Y-1.865
    X-0.344 Y-1.712
    X-0.494 Y-1.599
    X-0.524 Y-1.584
    X-0.597 Y-1.537
    X-0.798 Y-1.4
    X-0.999 Y-1.234
    X-1.056 Y-1.181
    X-1.2 Y-1.035
    X-1.251 Y-0.98
    X-1.415 Y-0.778
    X-1.549 Y-0.577
    X-1.603 Y-0.491
    X-1.662 Y-0.376
    X-1.759 Y-0.174
    X-1.834 Y0.027
    X-1.895 Y0.228
    X-1.943 Y0.43
    X-1.975 Y0.631
    X-1.985 Y0.832
    X-1.998 Y1.235
    X-2 Y1.437
    X-2 Y20.563
    X-1.998 Y20.765
    X-1.985 Y21.168
    X-1.975 Y21.369
    X-1.943 Y21.57
    X-1.895 Y21.772
    X-1.834 Y21.973
    X-1.759 Y22.174
    X-1.662 Y22.376
    X-1.603 Y22.491
    X-1.549 Y22.577
    X-1.415 Y22.778
    X-1.251 Y22.98
    X-1.2 Y23.035
    X-1.056 Y23.181
    X-0.999 Y23.234
    X-0.798 Y23.4
    X-0.597 Y23.537
    X-0.524 Y23.584
    X-0.396 Y23.651
    X-0.195 Y23.75
    X-0.106 Y23.785
    X0.007 Y23.826
    X0.208 Y23.889
    X0.409 Y23.939
    X0.61 Y23.972
    X0.811 Y23.984
    X1.214 Y23.998
    X1.415 Y24
    X30.585 Y24
    X30.786 Y23.998
    X31.189 Y23.984
    X31.39 Y23.972
    X31.591 Y23.939
    X31.792 Y23.889
    X31.993 Y23.826
    X32.106 Y23.785
    X32.195 Y23.75
    X32.396 Y23.651
    X32.524 Y23.584
    X32.597 Y23.537
    X32.798 Y23.4
    X32.999 Y23.234
    X33.056 Y23.181
    X33.2 Y23.035
    X33.251 Y22.98
    X33.415 Y22.778
    X33.549 Y22.577
    X33.603 Y22.491
    X33.662 Y22.376
    X33.759 Y22.174
    X33.834 Y21.973
    X33.895 Y21.772
    X33.943 Y21.57
    X33.975 Y21.369
    X33.985 Y21.168
    X33.998 Y20.765
    X34 Y20.563
    X34 Y1.437
    X33.998 Y1.235
    X33.985 Y0.832
    X33.975 Y0.631
    X33.943 Y0.43
    X33.895 Y0.228
    X33.834 Y0.027
    X33.759 Y-0.174
    X33.662 Y-0.376
    X33.603 Y-0.491
    X33.549 Y-0.577
    X33.415 Y-0.778
    X33.251 Y-0.98
    X33.2 Y-1.035
    X33.056 Y-1.181
    X32.999 Y-1.234
    X32.798 Y-1.4
    X32.597 Y-1.537
    X32.524 Y-1.584
    X32.396 Y-1.651
    X32.195 Y-1.75
    X32.106 Y-1.785
    X31.993 Y-1.826
    X31.792 Y-1.889
    X31.591 Y-1.939
    X31.39 Y-1.972
    X31.189 Y-1.984
    X30.786 Y-1.998
    X30.585 Y-2
    X1.415 Y-2
    X1.214 Y-1.998
    X0.811 Y-1.984
    X0.61 Y-1.972
    X0.409 Y-1.939
    X0.208 Y-1.889
    X0.007 Y-1.826
    X-0.106 Y-1.785
    X-0.195 Y-1.75
    X-0.396 Y-1.651
    X-0.494 Y-1.599
    G3 X-1.21 Y-1.745 Z-19 I-0.263 J-0.539
    G1 X-1.331 Y-1.885 Z-18.971
    X-1.441 Y-2.012 Z-18.885
    X-1.528 Y-2.112 Z-18.753
    X-1.584 Y-2.176 Z-18.585
    X-1.603 Y-2.198 Z-18.4
    G0 X-1.603 Y-2.198 Z15
    
    G53 G0 Z0
    M5 ; spindle off
    M9 ; coolant off
    G0 X0 Y0
    M30
    %
    
     
  13. baum

    baum New
    Builder

    Joined:
    Nov 26, 2018
    Messages:
    55
    Likes Received:
    7
    If i got you correct all i need to do is hook the iot up according to the black box documentation and im good to go?
     
    David the swarfer likes this.
  14. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,038
    Likes Received:
    4,123
    Default grbl $30/$31 settings are 0-1000 "rpm". 10,000 will; still turn the relay fully on, but just a note that needs a check
     

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