Activation of an IoT relay using Load1 or Load2

At present I’m using firmware 1.0.9 on my X35 Woodworker. I want to be able to turn the router and vacuum on via gcode. I enabled both L1 & L2 via the I/O menu selection. They’re both set for lo-hi.
I send gcode M7 & M8 using MDI. The information screen says they’re both on and using 10 to 20ma of current. L2 is tied to pin 1 of the 25 pin accy. port and the other end is connected to the positive side of the IoT relay I purchased from Digital Loggers. The ground side is connected to pin 7. Nothing is happening, the IoT is turned on.

Any help would be very appreciated.

1 Like

Hey Robert,

this is a frequently asked question. Quoting from existing answers:

As the dust extraction system usually is expected to run when the milling motor runs, it is switched on by the same pin 15 “tool enable”, i.e. switched by M3 command and switched off by M5 command. Note that you have to select “PWM spindle” as “tool type” to activate pin 15 “tool enable” (as you would do for using a laser).

@Satoer’s CNC Remote Control Panel switches dust extraction one second later than the router, in order not to load the MCCB with both at the same time. The delay here is controlled by AVR code since control panel’s core is a microcontroller (it emulates the Onefinity gamepad/joystick completely via USB). However if you just use two relays, one for router, one for dust extraction, you could also implement a one-second delay with a NE555 timer in front of the second relay.

I know this does not answer your question :frowning:, sorry! I would check the connection. There were problems with breakout board adapter reported, see here for possible errors with DB-25 I/O port. The topic deals with a failing ModBus connection (pins 13 and 14), but largely applies to any pin failure on DB-25 I/O port.

Further Reading

tool enable

1 Like

Thanks for the info Alph5u, I appreciated that very much. The thing is working, no more forgetting to turn the router on.

Dumb question. I am not using a PWM spindle, just the makita, would setting it to PWM mess up the carve or just inject the M3 & M5 commands into the gcode?

If you are on 1.0.9+ set your tool to the Makita, not PWM. Use Tool Enable Pin 15 to control the IoT relay. PWM won’t work. Old instructions said to use that and I had tried when doing mine.

M3 and M5 are regular Gcode that get used all the time.

1 Like

Hey Dan,

the commands M3 (start spindle clockwise) in conjunction with S (Set Spindle Speed) (with speed set > 0) and M5 (stop spindle) are provided by your CAD/CAM program when you export your toolpath as g-code.

It is up to the CNC Controller to start the milling motor appropriately when it encounters such a command.

Traditionally, the Onefinity Controller, which is a hardware and a software fork of the Buildbotics Controller, has two methods of controlling the start/stop and the speed of the milling motor:

  • The analog way, which controls start/stop by switching the ‘tool enable’ pin 15 on DB-25 I/O port on and off (and the ‘tool direction’ pin 16 according to M3 or M4 command given), and the speed by providing a PWM signal on pin 17 as described here, and

  • the digital way, which is a ModBus communication over a RS-485 serial communication line to a device like a VFD which is able to communicate this way.

In order to choose the first way to communicate, the analog one, traditionally the Onefinity and the Buildbotics Controllers had one entry for selecting the right ‘tool type’ in the TOOL Configuration tab: “PWM Spindle”. You had to choose this entry if you wanted to use

  1. a PWM Spindle
  2. a Laser
  3. a milling motor that has no interface (like the Makita hand trim router) and that you want to be switched on and off by a relay.

Since having to choose “PWM spindle” when in fact you wanted to use a laser or a hand router was confusing, so with firmware 1.0.9, the Onefinity developers created two new entries for selecting ‘tool type’:

“Router (Makita, etc)”
“Laser (J Tech, etc)”

But internally in fact it still selects “PWM Spindle”.

Welcome to the forum!

Thank you very much!