Tool Enable - M15 - IOT Relay - & Breakout board (auto turn off/on router)

I want to give a big Thank You to each of you who participated in this thread!

Yay, no more forgetting to start either the router or vac anymore!! A great automation feature for sure.

1 Like

hello, do you have a schematic or pictures to see how to connect the iot relay to the controller. I want to understand but I can’t see how visually and I’m a bit bad at it! thank you!

1 Like

Hi All

I’m trying to set my Makita to operate off an M3 S1 command and have followed this PDF in this thread and get zero response from the Makita.

I’ve checked all the connections and they look fine, I’ve changed the two set of parameters and even rebooted to make sure they are active, but get nothing.

I’ve changed the relay for another and nothing.

these are the relays I purchased from amazon.com in the states because I couldn’t find one that looked correct in the uk

Songhe 1 Channel DC 3V Relay High Level Driver Module Optocoupler Relay Module Isolated Drive Control Board for Arduino (Pack of 5): Amazon.com: Tools & Home Improvement

Any ideas what else I can check

Thanks in advance
Dave

Quick question, do I have to insert M3 S1 and M5 commands into the tool change code? How does 1F controller manages tool enable during tool change?

Sorry for the slow reply, it’s been hectic to say the least. To answer your question, the post processor for OneFinity will automatically insert the spindle start and stop commands when you generate a tool path that has multiple bits. To confirm that it is working correctly you could create a simple project such as a square and circle outline. Assign different tools to both and then generate a tool path that includes both the square and circle. Then open the file and look through it for the tool change and confirm you have a M5 (spindle off) and a Sx with a M3 following that. You should also see a pause in between.

1 Like

I did this update to my 1F, added iot relay and Break out Board. Works great thanks to the above instructions.

Question: When the router starts up, the tool path is pretty much ready to go and starts immediately. I would like to have a short pause, maybe 1 second, to make sure the router is fully up to speed before it starts. What is the g code for that?

I tried this:

G90
G20
(Contour.T…)
M05
M0 ;T102
M03S10000
G4 P2
G0X2.8086Y3.4370Z0.1500
G1Z-0.0500F8.0
Y5.5630F20.0
X5.1914
Y3.4370
X2.8086
Z0.1500
M05
M02

The pause, or G4 dwell works, but not in the sequence I would have thought. The dwell of 2 seconds happens before the router turns on. As soon as the pause finishes, the router is activated and the tool paths happen. I would have thought having the pause after the M3 line would pause after the start of the router?

Anyone do a pause? Is this an issue?

Thanks all! Bill

If you use the pp by @blaghislain the pause comes after the M3; I use it (10 seconds) to (1) allow my spindle to get up to speed and (2) last checks that the deck is clear etc… Mind you, I’m using fusion360, and it may be generating differently in other products.

I manually added that code in, but I don’t understand why the pause is happening before turning on the router.

1 Like

Can the 1F controller support via break-out-board 2 relay boards hooked in parallel? Asking because router and a shop vac would exceed 10 amps with a single board.

That I don’t know.

BTW, I switched and use Vcarve PRO now, and their code does start up the router (and vac as I have it on the same power switch) and pauses with an on-screen message saying something about waiting for the router to spin up, then you press continue and it runs the tool path. Pretty awesome actually.

Thanks for your experienced input, Bill! I haven’t setup my machine as I just got it a few days ago. I’ve been scouring the forum topics for the best setups in all aspects of the 1F machine, dust collection, cable routing, etc. I thought it would be great to turn on router and dust collection when starting a machining simultaneously. Your input has got me going down the right path! Thanks for the prompt response!

Brian Lindell

No problem at all Brian. If you have any further questions, feel free to reach out!

There are various trigger levels for IoT relays. Some as 3 volt some at 5 volt. The output of OF. Is 3 volt at least on mine Might check your IOT specs.

Is there a document with a detailed description of all the terminals on the 25-pin breakout board, ie, detailed meaning, input/output, AC/DC, voltage, maximum load, waveform (ie, more than
Buildbotics 25-pin I/O Breakout), etc, and particularly, how each is controlled via G-code (eg, M3 and M5 for pin 15).

Presumably, it’s possible to use an IoT relay or relay board together with a vacuum switch (such as EToolCity New Generation Automatic Vacuum Switch) to turn on both the router and the\vacuum.

1 Like

Hey Bob,

additionally to ā€˜tool-enable’ (pin 15) which is controlled with M3/M4/M5, the ā€˜load-1’ (pin 2) and ā€˜load-2’ (pin 1) outputs on Buildbotics & Onefinity Controllers are for workpiece coolant which is switched on and off with the commands M7, M8, and M9 (ā€œM7 = mist coolant onā€ and ā€œM8 = flood coolant onā€). Workpiece coolant is primarily used for milling metals.

Here the detailed documentation of I/O ports:

ā€œLoad-1ā€ and ā€œload-2ā€ pull-down menus are associated with the L1 and L2 outputs on the back panel of the Buildbotics controller. The L1 and L2 outputs can be software controlled through GCode commands. ā€œload-1ā€ becomes active when an M7 GCode command is executed, and becomes inactive when a M7.1 or a M9 GCode command is executed. ā€œload-2ā€ becomes active when an M8 GCode command is executed, and becomes inactive when a M8.1 or a M9 GCode command is executed.

Alternatively, the ā€œload-1ā€ and ā€œload-2ā€ pins can be inputs and control the Load 1 and Load 2 outputs. To do this, set the input to ā€œdisabledā€. Apply 3.3 Volts to the pin to turn the load output on and Ground to the pin to turn the load output off.

The state and pin numbers on the DB25 connector for ā€œload-1ā€, ā€œload-2ā€, and ā€œfaultā€ are displayed to the right of the respective fields. A legend for the states is provided in the ā€œIndicatorsā€ tab on the ā€œControlā€ page.

You might be interested in the information given in the following posts:

Note that if you use a water-cooled spindle, this water pump is usually not controlled by the CNC Controller but by the VFD which has output terminals for relays used for this. The VFD can also ensure that water cooling continues for a certain time after spindle was shut down.

As for dust extraction, as this is usually expected to be on when milling motor runs, you can let it be switched on and off with M3/M4/M5 also, which would be switched by a relay on ā€˜tool-enable’ (pin 15) when using a router, or by an output terminal of VFD when using a spindle. The VFD receives these M-code and the other commands via the ModBus serial connection.

1 Like

Thanks again. That’s all great information. What I actually wanted to learn was whether I could operate the dust collector (turning it on and off) via one of the other pins on the breakout board using Gcode, similar to how the router can be operated via pin 15 using Gcode M3 and M5. But I should have just read this (rather long) post carefully in its entirety. (I was previously thinking of using a vacuum switch, operated via pin 15, to turn on both the router and the vacuum, with a delay between; that may still be the easiest solution.)

Just to be clear, do the M7, M8 and M9 commands control both the L1 and L2 outputs on the back of the controller as well as pins ā€œLoad 1ā€ and ā€œLoad 2ā€ on the breakout board? If so, is there any reason to prefer the outputs rather than the pins to control an IoT relay or relay board?

1 Like

When I tested the on board L1 and L2 connections I recall they output 36v vs the Load1 and Load2 pins on the breakout board are 3.2v. Make sure to test the voltages yourself and implement necessary voltage conversion if needed (some SSR/IoT relays require 5v min and won’t work with 3.2v or will let all the smoke out at 36v for example)

1 Like

Hey Bob,

Yes.

Yes, if you have a DC load that sucks a high current and is operated at 36 Volts.

If you look a the Onefinity CNC Controller Schematics and search for the string ā€œload_ā€, then you see the pins ā€œload_1ā€ and ā€œload_2ā€ on DB-25 I/O are directly in-/outputs of AVR microcontroller with its 3.3 V output voltage, while J7 ā€œLOADā€ and J8 ā€œLOADā€ outputs on the back of the controller are controlled by ā€œload_1ā€ and ā€œload_2ā€ too (over IN3 and IN4) but you have +Vcc (with a high side current monitor with its output watched by the ATtiny on the board) over a mosfet and finally a 40 V zener diode. As the power supply enclosed in the Onefinity Controller case is a 36 V version of Meanwell LRS-350, these outputs are 36 V outputs.

On Buildbotics.com controller, these ā€œLOADā€ outputs are rated with 10 A:

Each of L1 and L2 are capable of supplying up to 10 amps. However the total power budget for the Buildbotics Controller is 15 amps, so L1 and L2 cannot both supply 10 amps at the same time.

See also Buildbotics Manual v1.0 > Power budget

But see Meanwell LRS-350 36 V version used in Onefinity CNC Controller for total power on this controller.

Also a difference is that the pins on DB-25 can be used the way I already cited above:

This has been discussed and shown frequently in this forum. You can find it easily:

The router and the dust collectors should be both switched on with M3/M4 commands so the ā€˜tool-enable’ pin is the correct output. As most users here use the Onefinity to mill wood and wood dust is not compatible with oiled mechanics like ball screws and is as well harmful for human respiratory system and cancerogenous, usually you want dust extraction to run always when milling motor is on.

Switching dust collector on with M7/M8 commands would require that your program and/or post processor diverts ā€œworkpiece mist coolantā€ / ā€œworkpiece flood coolantā€ commands from their intended use.

Also you don’t forcibly need ā€œIoTā€ relays, if you can wire things you can simply buy a relay on a small board with screw terminals. They are easily available.

In any case look at the specifications of a relay if you buy, on the switched side they have to be rated for the voltage of your dust extractor and of your router respectively and to have enough current (AmpĆØres) for your dust collector and this applies to router too. Use separate relays for dust collector and for router, even if you let them both be controlled by ā€˜tool-enable’. On the controlling side of relay, you got to know that generally you do not drive the relay with the power from the I/O pin sink/source current of AVR microcontroller (datasheet) pins directly which would be max. 25 mA. In order to drive relays, usually you have a power supply for this, e.g. one with 24 V which is a common voltage for this. The relays you can buy on small boards are switched by an optocoupler on the board so they are galvanically isolated from the switched circuit which is safe.

1 Like

If you’re using the on board L1/L2 it’s worth noting there was a redesign between the revision 4 and revision 5 controllers. The rev 4 controller is similar to the Buildbotics design and they claim up to 10A of current for L1/L2 where as the rev 5 controller introduced a new design with a 0.05 ohm 3W sense resistor in series which if accurate would limit current to around 80mA max before risking letting the factory installed smoke out of the resistor (3W at 36vdc). One easy way you can tell the difference between them by the toggle power switch (rev 4) vs push power button (rev 5).

1 Like