|

TB6560 CNC spindle relay configuration for Mach3 or LinuxCNC

solid state relay configuration

TB6560 4-axis spindle relay configuration with Mach3 or LinuxCNC is fairly straightforward.   But it took me some time to figure out. So here’s how I got it to work.

I wanted to be able to control my Katsu (Makita clone) router from Mach3 and LinuxCNC.   The goal was that it would switch on and off from the g-code running. Several times I started to run the code and forgot to switch the router on.

This configuration is just a simple on/off, no speed control.  The TB6560 can control spindle speed with extra hardware and configuration. But I don’t have this setup, so I can’t confirm.

The TB6560 4-axis board is fitted with a relay which can be controlled by Mach3 or LinuxCNC using the g-codes M3 (on) and M4 (off). The relay is limited to 36 Volts and 7.5 amps.  As most routers are mains powered a relay is required to switch the AC on and off.

After some research, I decided to use a solid-state relay that would switch the AC on by supplying a small DC voltage.   I purchased one from Amazon and wired it as the diagram below.  Please be very careful you are dealing with mains electricity it can kill!!

The Spindle interface has 4 connectors two ground and on my board MOU and MIN.  Basically, the MOU and MIN are the relay contacts.  You can put a multi-meter across them on a continuity setting with a buzzer and it will switch on and off by sending M3 and M4 to it.

Mach 3 configuration

Goto Ports and Pins and check that Output#1 is enabled and set to Port 1 and Pin 2

Port and Pins Mach3 for Spindle configuration
Port and Pins Mach3 for Spindle configuration

On the Spindle Setup tab make sure “Disable Spindle Relay” is not checked and the “Output# “is set to 1 as below

Mach3 Spindle Configuration

That’s all there is to it for Mach3

If you press Reset and click the “Spindle Toggle”  button on the Diagnostics screen it should start the router.  Make sure the router is left switched on.

LinuxCNC Configuration

In the StepConf Wizard select your configuration and set Pin2 to Spindle ON.   That’s it, even simpler than Mach3.  When the g-code M3 and M4 is sent the router will stop and start.

linuxcnc stepconf parallel port

Summary

As you can see it’s an easy solution for Mach3 or LinuxCNC just be careful with the wiring mains power can kill.  The relays are very cheap and mine has been 100% reliable.

Similar Posts