CB CNC Part 17 – Wiring Relay Module To CNC Controller

So I’ve got quite a few different relay modules, partly because I was planning to use a watercooled spindle and I wanted to connect the VFD to a relay, to power the pump. I wasn’t sure of the best way to do that. I ended up with a range of, which included 5v, 12v and 24v DC relays. The pump was 12v but it would also be useful to control a mains voltage for an extractor for example, so I had single or dual channel modules.

There was some information in the VFD manual which suggested I could use a timer feature, and if I was going to do that I wasn’t sure if I needed a relay with an active high or low trigger. I even bought one relay with a built in timer circuit in case that didn’t work.

In the end I decided to simplify the CNC machines and controller at this stage, replacing the water-cooled spindle with all its additional cables and tubes and headaches, with an air cooled one, and to connect a dual channel relays with two 240v power sockets on the enclosure.

I still decided to test the relays by connecting their power inputs to the relevant PSU in the enclosure, and using my soldering station’s DC power output mode to adjust the voltage until the relays were triggers.

I am checking whether the relay turns on or off when I expect them too and what voltage I would need.

I have to connect the ground on the soldering station to the ground from the DC power to the relay, along with the ground from the DC power, so the potential is the same and I can test the switch using the positive DC power from the soldering station. When I connect this to the enclosure I will only wire the signal from the controller and all the other DC components have their grounds connected together – keeping the ground potential the same.

I should also mention the difference between how the signals work from different parts of the controller – because at one point I assumed they all worked the same way.

The probe, the limits, the start, hold and reset all use an active low so you have 5v signal going through the switches and when that goes to zero, that means either the buttons have been press, the probe has been reached or the limits have been reached as well.

The enabling of the spindle and coolant’s different. That’s an active high. So if there’s no voltage being received which is the normal state for those particular terminals, the spindle won’t turn on or the relay wont turn on.

I now know you can invert the pin / signals on the controllers firmware but if you are building a CNC machines for the first time, as I am, you probably don’t feel confident to delve into the murky waters of the cove of firmware – where I heard there’s treasures down there but you might die trying to get them. So I’m trying to use components which work with the firmware as it is.

I am now making the front panel for the power sockets. I am going to use one with an extractor and that part of the relay will be connected to the spindle enable pin and the other will be connected to the coolant pin – although I may use that with a vacuum bed if I ever make one.

So I want to mount the relay somewhere along here. It’s a shame I didn’t realise this at the beginning as I could have put the mounting holes on this bracket. So maybe when I redesign it I’ll try make that a feature. But for now I’ll just screw this onto a bit of aluminium, and use some 3m tape to stick it down somewhere.

So this is what’s going to go between the 24v DC power and the relay. And this piece here goes between the signal from the controller – the coolant and spindle enable to the relay signal 1 and 2. I am using some shielded wire again, so I’ve soldered an extension which will go to the earth blocks.

I’m just switching this to the centre so the VFD doesn’t receive spindle enable signal.

I’m going to turn the coolant on. That’s off. I’m going to turn them both on at the same time. Spindle and coolant. The signal is being received by the relay.

Now I just need to wire the power to the panel mounts.

Ok this is the wiring for the front panel. These two (brown/live) go to the normally open terminals on the relay. These (blue/neutral) go to the terminal block or barrier block next to the contactor. As well as the earth.

I’m just testing this out so the powers off and I can get my hand around the back and make sure this fits in ok. These are probably a bit too close to the aviation panel mounts down here.

You can see the power lights is on.


In the next video I will connect the CNC machine to the Enclosure, and replace the water-cooled spindle with an air cooled one. Thanks again for watching, we are nearly there.

If you enjoyed this video don’t forget to sacrifice a thumb to the algorithm gods. If you keep them happy it will keep my happy too.

Leave a Reply