TB6560 CNC 4 axis spindle relay configuration for Mach3 or LinuxCNC

posted in: CNC, CNC Router | 2

Modified on May 30th, 2018 at 10:40 pm

TB6560 4 axis spindle relay configuration with Mach3 or LinuxCNC is fairly straight forward.   But it took me some time to figure out. So here’s how I got the board 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 gcode 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 is able to 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 gcodes 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 as the diagram below.  Please be very careful you are dealing with mains electricity it can kill!!

Products from Amazon.co.uk

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 its 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  “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 you configuration and set Pin2 to Spindle ON.   That’s it, even simpler than Mach3.  When the gcode M3 and M4 is sent the router will stop and start.

linuxcnc stepconf parallel port

Summary

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

2 Responses

  1. Taylor

    If this works I owe you a fat kiss right on the mouth! This TB6560 has not been my favorite thing in the world but this tutorial is really well written and detailed! Fingers crossed, and thanks again!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.