Duet CNC Controller – Part 4 / ENCLOSURE ELECTRONICS

Check out the CNC Controller time Line here: https://miscpro.com/cnc-control-box-timeline/

Ok so I think I’m at a stage now where I can start to dismantle some of the parts that are allowing me to test the coding and files in the system directory, and transfer the components into the enclosure. Before I do that I’d like to talk about the last few things I have done. I’ve changed over to a four channel relay module and I’m actually using the M80 ATX power on command to trip (switch) the relay which has the power going through for the NVR switch which is over here which latches when it’s pressed and allows power to the various components. The live cable is wired through the common and normally closed. And when I send an M80 command which is meant to turn the ATX power on, in this case I am able to turn it off remotely. This might be useful if I want to enable the sleep.g file in the system directory with an option to shut the machine down at the end of a job if I’m going to be preoccupied doing something else. In reality, you should always be around when your machine is operating in case something goes wrong.

I’ve also installed the smaller power supply that is powering the opt laser CNC adaptor – and you can see the power LED is on there. I’m not too happy using these push PC connectors but I’ll work on that and try neaten it up when I have time. I still got to do a few thing with this but it doesn’t make sense to do it until I start to move things over and I can test the module properly.

The other thing I did as well was swap over to these slightly transparent push switches which have a 24v LED which I will be using to operate the relay modules that operate the dust extractor and air filter. When these are pressed the light turns on when the relay modules are energised, and this indicates that there is power going to the plug socket.

I’m still using the solid colour buttons for everything else. And then the last thing I did, is get a panel duo 7i from Ooznest, which means I can actually operate some functions closer to the CNC machine although I’ll try do the majority of things through the web interface. As you can see you can home everything here, stop everything and you can reboot. There is a lot more information that you don’t normally see on the web interface because it’s disconnected from the controller, and this will be nice to check things on the fly. I will make a frame for this which will go on the front of the enclosure itself. There’s a few things that are a shame about this – it’s not set up for CNC use so you can see temperatures and it doesn’t let you know what work coordinates you are in or the machine position. So may feed that back at some point but all my macros will be there, I’ll be able to move. I have no reason to see the extrusion so that is something that needs to go. You can see the console with what’s been going on. And it says print – really it should say job. There’s little things I need to change but I’m really impressed with it – with the right development this could be a pendant. Anyway I’m now going to start dismantling everything but not before taking detailed photos.

I’m not going to shut the machine using the M80 command – M, 8, 0… Boom…. Like magic.

While I’m photographing stuff in the background, I’ll just put this video into context. There was a gap of over two months from filming this part of the project because of the lockdown in the UK, and I think I may have lost some footage. So I apologies about the delay in getting this out.

I began by placing the component and back panel into the enclosure to finalise where I was going to drill the openings for the intake and exhaust fans. Once I was happy with the locations, I removed the electronics and drilled a large 114mm diameter hole for the 120mm fans. The one at the top is centred, while the bottom fan is offset to one side.

I used a long reach pen to mark the mounting holes – which happens to be my favourite tool at the moment, a pen – can you believe it.

After drilling the mounting holes, I installed the dust filter onto the outside with the fan mounted on the inside. The bottom fan will blow cool air into the enclosure around the controller boards – while the top fan vents air.

I then decided the locations of the push buttons – which I was going to place closer to the hinged side of the door. The buttons were to go near the bottom, with the touch screen in the centre and the NVR switch and sockets at the top. I’ve tried to separate the AC and DC voltage to separate enclosures – but professional machines also separate the back panels so they are ground separately so those components are ground and drained separately. Not something I was able to do there.

If I haven’t mentioned these already these components are from RS components and are modular which makes them a lot easier to install and maintain. I’ll talk a bit more about them at the end of the video where I explain the wiring.

To fit the NVR switch I drilled four holes at the corners and used the oscillating multi tool to cut the window out. I then used a pipe de-burring tool to clean the edges. The nice thing about the clear window was I could easily trace where I had to drill mounting holes. That said, this controller is going to look a bit boy racer homemade computer-ish, but if it gets too embarrassing, I could always put some thick curtains up in front of the enclosure.

The final thing to do was to cut the openings for the plug sockets, which I installed in a similar way. And then by the magic of cinema I cut away to the enclosure mounted to a wall and more or less wired up.

I said by the magic of cinema.

By the magic of watching YouTube on your underwear on your couch!

So everything is in the enclosure now and I’ve wired the buttons, the screen up, plus the power plugs and the NVR switch. And I’ll briefly talk about what I’ve done. Here you can see I’ve wired the naturel to the different plugs including the earth – which goes back to this end up here. And the live power goes back into the enclosure to these two relay modules and back to the to these two plugs sockets. I’ve already got one space utilised to this extractor over here. And they are operated either hrough software or these two switches here. The PanelDue 7i frame is mounted onto a Valchromat frame, and what I’ve also done is placed some Kaptan tape on the back to help with static from the plastic. I’ve got a hole here for the Molex connector, and I’ve looped the cable, which is shielded through this ferrite core, and to the relevant connector onto the Duet 2. And I used a couple nylon spaces just to make sure that the screen was held in the correct position.

I’ll should also add when I used the provided ribbon cable with the touch screen, I found I was getting some kind of interference which effected the controller’s behaviour, and this went away when I moved to the shielded cable. Despite not properly draining the shielding on the cable but with the ferrite core – so far I don’t have any problems.

Below that are the various buttons or switches. You can see I mainly used the yellow wire to do this. It would have been nice to have some number systems in place to I could have labelled everything up but you can also check the wiring using a voltmeter and this is why the way it looks the way it does.

I may get some cable markers that clip onto the wires – but don’t know too much about numbering conventions for electronics so if anyone had any suggested reading, please send that my way.

What I like about these connectors and buttons, is you can have up the three different blocks at the rear either normally open or normally closed, or two plus an LED light providing you have a translucent face to the button. For example this emergency stop here- the pair of yellow wires goes to this relay module through this barrier block and then onto the relevant connectors under here. I also have a pair of brown wires which travels along there up here and into the terminals for the OptLaser CNC adaptor. One pair of wires is for the emergency stop, and the other pair goes to this switch – which should be a key switch for arming and disarming the laser adaptor. It gives me a failsafe to make sure it wont run, here and there’s also one on the controller adaptor. I’ve also wired the steppers and limit switches which I’ve labelled on the inside here. You can see the limits here wired through these glands. There’s five of them and this wire here goes to the probe. On the machine itself I’ve made a few changes which how I connect everything up and I’ve moved over to these two part connectors which make the entire process a lot easier. I don’t have to worry about soldering – they clip in place and they are difficult to come apart by accident. And I’ve done that for all the stepper (and limit switches) 

I’ll just show you the controller turning on – the fans are a little noisy so I will rewire those either to with a resistor to slow the speed down or to the spare fan headers on the Duet which I can control the speed either manually or based on the internal temperature – which is entirely possible with the Duet.

Ok I think this video is long enough – I need to work on future videos now and this will include reprogramming and connecting the new VFD to the spindle, walking through the tool touch probe workflow, and setting up the opt laser module, working out how to control the tangential knife, building a enclosure and probably more because I really like to drag these things out. If there’s anything you’d like me to address, please mention those in the comments. Thank again for sticking with me, and to my magnificent Patreon and you’ll catch me the next one.