CNC Control Box Part 6 / Light Curtain Safety Barrier, Infrared Transmitter Receiver,

Affiliate link to infrared sensor:

In this video I assembled a stand to mount an infrared sensor. The sensor comes in two parts with one transmitter and a receiver. And can be used to detect movement when an IR beam is broken.

And it’s to hold this thing here. A detector dual photoelectric sensor. One will go on this side here and the other over there. Once a receiver and the other a transmitter.

I’ll be using the sensor by connecting it to a relay module which will trigger the hold feed terminal on the controller – pausing the CNC machine and parking the spindle.

I took the CNC machine to Maker Central 2019 this year, and I wanted to have a safety feature available in case anyone got too close. The sensor is attached to a frame which is itself dismantlable. I used dominoes to assemble it and it simply sits in front of the machine. Off the shelf laser based light curtains are expensive, so this is a cheaper alternative.

I’m mounting the sensor and receiver to the stand. The receiver will go to the right hand side while the transmitter is to the left. I drill through holes so the wires can be hidden behind the stand.

So red and black are going to go to the power and ground.

Ok I’ve just soldered these together so you can see what I’ve done. Power is splitting to the two sensors plus the ground, then this green and white cable actually goes towards the relay switch. I’m not sure how the tamper works… The tamper circuitry can be wired to prevent exactly that – tampering with the transmitter or receiver. When the cover of the either unit is taken off, a switch is released which can be used to signalling or activate some other behaviour. I could possibly even wire the signal wires through the tamper switches so removing the cover acts in the same way as breaking the beam. But that’s over complicated so I will ignore those terminals.

So the tamper switch is independent to the other circuit.

I’m now going to show you what the tamper terminals are doing with a voltmeter. When the cover is on the terminals produce a closed circuit and when removed the connection is broken.

Ok I now need to wire up this socket and power will go to the 24v power supply unit and the switch on the sensor need to connect to these two wires here.

The terminal on the enclosure has four prongs in total with two for 24v DC power and it’s neutral, and a further two prongs for the wiring through the relay module and onwards to the hold feed terminal.

If I decided to not use this barrier sensor I’m going to need something that I plug into this socket which bridges the connection on the relay. Otherwise that would be interpreted in the same way as pressing the hold feed button – which breaks the circuit.

The wiring also makes it possible to replace the IR sensors with a physical switch, which could be held to a door if you preferred to fully enclosure your machine. I’ve cut and re-soldered the wires together and now neatening everything up.

Ok so this is how I’ve wired it up. You can see number one is the power coming in so that’s the red cable and ground is black. And according to the diagram I’ve connected to the normally closed terminal although if I grab the volt meter and put it on continuity. Normally closed is actually normally open. I’ll just turn the power on. So that’s closed now that the power is on.

And the way I’ve wired this up 1 and 2 are down which is channel 4. What I found was that even though the manual says to keep them (receiver and transmitter) on the same beam channel I get a better response time if I set to the bottom two and on the other one 1 is set to up and 2 set down which is channel 2. Green is in common and white is in normally closed and I’ve left the tamper as is and then on this on the transmitter beam intensity is set to low, because they are quite close to each other.

This number indicates the voltage 9 being it’s high and correct. The other settings include the response time so 4 and 3 are set high which 50ms – if I drop those down. What’s going on there that’s 700ms so I’m guessing it waiting for 7. 3, 2, 1. Lets try 100ms. Then 300ms. And 700ms. So it seems that something has to disrupt the beam for that amount of time. And the alarm time is either one or three seconds. I’ve got it on 1 second. 1, 2, 3. So If I change these so they’re both on the same channel you can see it takes a while before it trigger, so I’m wondering whether the dip switches are actually connected to the correct numbers on the display.

I’m now turning on the infrared mode on the camera. You should be able to see the intensity of the beam changing based on the toggle switch going between low and high.

I’m now running a job and about to pull the sensor cable out – which simulates the sensor wire being cut or the sensor not present. The way I’ve wired this up mean the controller will detect that as hold feed.

If I pull this it it should stop. There you go. Now if I press resume. While unplugged if I press resume it will remain stationary.

Here I’m breaking the beam in different more creative ways.

I should remind everyone that my machine has spindle parking enabled so it doesn’t stop in one go – and instead raises a short distance, were the spindle is turned off and then followed by a movement to a safe z axis location.

The final thing I did was wire up a jumper connector for the terminal for the infrared sensor – which gives me the option to not set up the sensor and still be able to use the machine.

So that is the final video in the latest CNC control box build series. There are six information packed videos in total, and the playlist for those will be available in the description and information card. I’m going to lift the acceleration peddle on the videos for a little while now, but if you want to see what I’m working on I’d recommend following me on Instagram where I’ve started a CNC new machine – which I think will be the ultimate hobby / semi-professional desktop bit of kit.

Leave a Reply