Build Your Own CNC Controller, Part 1 | DDCS V3.1 | 6040 Router

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video i will go through the entire build process for an offline cnc controller that i will use for my 6040 cnc router i will cover the preparation of the enclosure why i use certain electrical components and i will include any errors i made along the way to hopefully prevent other people from making the same mistakes this build will be divided over at least two videos due to the large amount of content please also check the description and comment section for any updates so let's get started around five years ago i bought a 60 40 router from the chinese company ucnc who now go by the name of omeo cnc the machine is controlled by mach3 over usb connection the internal interface board only takes care of the communication between the pc and passes the commands from mach3 onto the steppers and other components although this works fine i have a preference for using an offline cnc controller it eliminates the need to have a pc connected to your cnc at all times also if the usb connection fails at any point you might be in trouble i did experience some lost steps on x-axis from time to time which i hope will also be mitigated with the new controller lastly the wireless controller has some nice functionalities but there is a significant delay between the input on the mpg and the movements of the router after some searching on aliexpress i decided to go for the ddcs version 3.1 controller i got the four axis version since i also wanted to upgrade my router with the rotary axis although there are plenty of alternatives i chose this controller since it appeared simple to use it has all the functions i need and perhaps most importantly there's a good manual available for it in english the ddcs controller does not fit in the original control box so i had to purchase a new enclosure at first i purchased a plastic enclosure that was only slightly larger than the original controller however after trying to fit the components in the new box it quickly became apparent that it's better not to skimp on the size of your enclosure a larger one makes your life a lot easier when assembling everything so i bought another enclosure that measures 400 by 500 by 175 millimeters i got this locally for only 85 euros i chose plastic enclosure because it's cheaper and easier to work with than a metal one since i would not be using the old controller any longer i took it apart to salvage any parts i could use in the new setup the original plan was to reuse the power supply stepper drivers and the vfd and hook all of these up to the new ddcs controller this would be a big cost saver and would only require me to buy new buttons and parts for safety circuit in the end i also ended up replacing the stepper drivers but more on that later while taking the old controller apart i marked all of the wires and constructed a wiring diagram to help me understand how everything was connected so it would be easier to wire the new controller here's the wiring diagram of the old controller i will put a pdf file of this diagram on my website see the link in the description below from the mains plug one of the leads is going to the main power switch this is connected in series with the e-stop so you can kill the power over the entire system in case of an emergency behind this is a separate power switch for the vfd so you can choose to leave that off even when the controller is running the mains power to the vfd goes through an emi filter to reduce electromagnetic interference in case you're not aware vfd stands for variable frequency drive it allows you to control the rpm of the spindle motor the mach3 interface board sends signals to the vfd for both on off as well as for the desired rpm the wires connected to the uv and w terminals are going to the spindle motor the mach3 interface board is also providing signals to the stepper drivers the drivers themselves turn these signals into high current signals that drive the actual stepper motors the stepper drivers are powered by a 40 volt power supply i will go into more detail on how to connect the vfd in the stepper drivers later on [Music] the spindle and mains connector had to be unsoldered since the connectors can only be removed from the housing on the outside [Music] i took out the vfd with the mains cable here you can also see a ferrite ring and the emi filter for reducing electromagnetic interference all this will be transferred to the new controller the vfd comes with its own control panel which can be plugged into the vfd itself or mounted on the outside of the control box to have access when the machine is running here i am removing the stepper drivers these drivers are placed between the cnc controller and the stepper motors to drive the motors at a specific current and number of pulses per revolution more details on the settings for the stepper drivers later on in the video the only thing left in the old control box is the mach 3 interface card which is no longer needed [Music] the wiring schematic for the new controller is slightly different compared to the old one this is mostly due to the addition of a safety circuit what i did not like on the old controller were the flimsy e-stop button and the switches for the mains power and vfd these two switches were placed directly in line with the mains power this means that when the machine is on and you have a power failure you might end up in a dangerous situation if you forget to turn the machine off before the power comes back on a more common solution on industrial machines is to use a contactor to switch the mains power the contactor acts like a sticky relay if you connect it as shown in the schematic you can engage the contactor by pressing the on button and disengage it by pressing the off button both buttons are momentary contacts the clever bit in the circuit is that the contactor keeps its desired state even after releasing either of these buttons this is achieved through the use of auxiliary contacts when the on button is pressed the contactor closes not only the main contacts for the high power circuit but it also closes the auxiliary contact when this happens the contactor is held in place by current going through the auxiliary contact that it just closed itself so even after releasing the on button the contactor stays closed the off button is a normally closed contact when this button is pressed the circuit is broken and the contactor disengages and also here stays in that position even after the button is released an eso button could be wired in series with off button and would act in the same way if the e-stop is pressed the contactor disengages and will stay off even if the e-stop is released you then have to press the on button as an additional action to turn the machine back on this is a typical safety feature as releasing the estop alone should not be the only action required to turn the machine back on since the cnc controller is not in the circuit switched by the contactor the cnc controller will remain on when the e-stop is pressed so let's go over the components for the new controller here we have a power supply salvage from the old controller it has an output voltage of 40 volts at a maximum of 10 amps this should be sufficient for three nema 23 stepper motors which are rated at 3 amps each since i'm also adding a fourth access to the system it is a bit tighter but the motors will not all draw their maximum current at the same time also as i understood there's a rule of thumb that states that you can use a power supply that is rated to two-thirds of the stepper's phase current so for having four motors rated at 3 amps it would require an 8m power supply so unless i ran into any stability issues i will not change anything this smaller power supply is a new one this will be used only for the cnc controller and the case fan both of which draw very little power the cnc controller only requires 500 milliamps and the power supply should be able to deliver 740 milliamps at 24 volts so this should be fine this is a new e-stop that i bought to replace the flimsy e-stop from the original controller it is a standalone unit so it can be mounted close to the machine this is the main switch that i bought specifically for this project it is ridiculously oversized in both physical dimensions as well as for specifications it is rated at 32 amps which is far more than this little cnc router will ever draw from the grid so it's a bit over the top but since i already ordered it and being too heavy and oversized it doesn't really matter here i decided to use it anyway these are some terminal blocks that i used for building the system i later replaced them with ptfix distribution blocks since these require less space and are just a little bit more professional and flexible more on the installation of these later these are the switches that i selected for the new controller they are part of the eaton m22 series the reason i select these is because they're not very expensive they have a modular design and there are many different switches available in the series i selected a dual on off switch with integrated led and an illuminated selector switch to turn on the vfd separately under the buttons or switches you can place normally open contacts normally closed contacts an led or any combination of these a separate tool is used to mount the switches to the panel but you could also use some pipe wrench pliers this is the vfd that came with the old controller as mentioned earlier this will be reused for the time being i will leave the panel in the vip itself instead of placing it on the outside there's always an option to do that later if needed and here we have the star of the show the ddcs version 3.1 offline cnc controller it has a compact form factor and a relatively small 5 inch display but i think is adequate for the application a number of the buttons have multiple functions based on the menu that you're in on the back there's sort of a breakout board that directly mounts to a large sub-d connector this is where you provide power to the unit and have all of the inputs and outputs on the bottom there is a separate connector for an external start pause and e-stop these are optional in the center we have a 15-pin sub-d-connector for an mpg the final port on the csc controller is a usb port a wire is provided with a panel mount usb plug you can place this in a convenient location and load programs into the controller with a regular usb stick this is the mpg i ordered with the controller in case you're unfamiliar with this term an mpg is a manual called generator these are used to manually move axes on the machine and typically contain a hand wheel and selectors for the axis and step multiplier this model is very basic but it has all of the necessary functionality for manual jogging of the machine since the pulses are directly sent to the cnc controller the response of the machine to your input on the hand wheel feels very direct with the wireless mpg from the old system i always felt like there was some kind of delay if you buy this type of controller from aliexpress you typically have to solder it to a connector yourself these are the stepper drivers i salvage from the old controller they have a ucnc brand name on them but there are stepper drivers from many other brands with the same specifications and form factor so these are likely oem parts and could be similar to the stepper drivers that are just branded differently i'm not sure though the great thing about these stepper drivers is that the settings are printed on the side of the unit so you don't have to look for the manual to see how they are configured the stepper drivers are rated for 5.6 amps but they are actually set to 2.7 amps micro stepping is set to 2 000 pulses per revolution a typical stepper motors has 200 pulses per revolution if we divide 2000 by 200 we get 10 microsteps per full step microstepping is used to make stepper motors run smoother there's a large four pin connector that provides steps and high current to drive the motor next to it is a power input connector which provides power to the stepper driver the unit can run on anything between 24 volts and 50 volts in this case it's powered by a 40 volt power supply which sits nicely in between the upper and lower limits next up is the dip switch for configuring the various settings as mentioned earlier then we have the connector that can be used to enable or disable stepper driver this can be used for example to shut down the unit in case of a failure or an alarm i will not use this feature if the pins on the connector are left open the unit is enabled and lastly there is a four pin connector that is used to provide a signal to the stepper driver with which you can tell the stepper driver how many steps to move the motor and in which direction this is connected to an output port on the cnc controller which generates the step signal this is a stepper driver i bought online from amazon but you can get them from many online stores including the well-known chinese sources as you can see it has the same form factor same 5.6 amp rating and power input range there's one seemingly unimportant difference though and that is the connectors this driver has screw terminals which are definitely recommended if you're building your own cnc controller they are just much easier to install as you can see later on in the video i had many issues with the connectors on the other units so we decided to replace all of them for the new ones with the screw tournaments now it was time to figure out a layout for the new controller cabinet which was harder than i thought there are many different ways to arrange the components inside the cabinet each with their own pros and cons i finally settled on this layout it has a stepper drivers at the top of the cabinet close to the plugs to connect the motors i place the vsd on opposite side of the cabinet since this is the largest source of electromagnetic interference and therefore i would have the lowest chance of messing up step signals from the stepper drivers on the bottom left i have the 40 volt power supply which is providing the power for stepper drivers on the top left there is a smaller 24 volt power supply which powers the ddcs controller and the fan to extract warm air from the cabinet in the center there is a din rail which houses the distribution blocks for the power cables a contactor and a 24 volt power supply used exclusively to power the contactor on the side of the cabinet i place the power switch the mains connector plug and two inlet ports for air the inlet ports are located at the opposite side of where the fan is located in an attempt to maximize air flow over the electronic components here i am checking to see if the controller will not interfere with the other components the wire terminal at the back actually protrudes quite a bit i positioned the controller over the din rail section where the lower components are located so the terminal does not interfere with any of the components also i'm playing around with the location of the buttons i placed them on the left side of the controller as i felt this was the most natural location to be for example haas also has the buttons on this side and i'm sure there's a good ergonomic reason for it there are a lot of things to decide when making your cnc controller when it comes to position of the components after some deliberation i just went with what was the most logical to me at the time hoping i would not find any issues with the choices i made further down the road i measured out what length of din rail i could fit inside the housing and cut it to length i started marking out the location for the cnc controller and other parts that would be mounted on the lid or the side of the cabinet i used painters tape since this is easy to write on with a pencil and to make corrections if needed [Music] a step drill was used to drill out most of the holes these step drills work very well in thin material a standard drill can pull itself into the hole after you break through the material with a step drill the next diameter acts as a natural stop when you punch through the material as a bonus it clears the burst from the holes and leaves a nice chamfer on the front side the back side you will have to deburr yourself for the line filter i used self-tapping screws initially i wanted to use these for most components since they are easy to install and you can remove them without needing access to the back end such as with a nut and bolt however i have less than 10 millimeters of space behind the panel and these screws are too long in this case i just added some washers to take care of that issue for stepper drivers i used regular m4 screws and tap thread directly into the panel the panel is quite thin but since the drivers are not very heavy i think i can get away with this solution before tapping i drilled holes with the 3.3 millimeter drill bit i use the manual tab to create threads inside each of the holes all three tabs in the set were used where each consecutive tab cuts a deeper thread until it reaches its final shape so with all of the holes done and metal chips cleaned off it was now time to mount all of the components power supplies and vfd require rear access to be removed so i hope i don't have to replace these anytime soon here i'm making some of the new wires that will run from stepper drivers to the motor connectors on the outside of the cabinet i could have reused the wires from the old cabinet but these were unshielded and since i experienced lost steps with that controller i decided to use shielded cable wherever possible this is shielded cable with four wires of 0.75 millimeters squared that should be equivalent to around american wire gauge size 18. it helps to prepare the connector by first melting some thin on each of the pins before actually trying to solder your wire in place please ignore my lack of soldering skills it should be noted that each ring tubing gives a nice finish but it's not very flexible so make sure that the cable is long enough and therefore doesn't need to make very tight bends here i am marking out the position for the mains power switch it is positioned roughly in line with the din rail inside the cabinet the mains power connector will be placed on the left side it will be near the bottom when the cabinet is in the upright position i'm planning to hang the controller vertically underneath the table for the cnc controller [Music] this will be a round opening for the fan the round openings for the air inlet and outlet should be around 80 millimeters in diameter i had a hole saw with a 76 millimeter diameter which i considered to be close enough i pre-drilled the center hole to make sure that the hole saw would be properly centered i use an old drilling machine for the hole saw but the problem with the setup is that the drill doesn't have enough power and the rpm's too high so either i am melting the material or the drill seizes up this is not good practice but with a bit of wiggling and applying alternating pressure it still works the finish on the hole is not very good but after some filing i think it's acceptable so these are the holes for the spindle and stepper motors the holes need to be 16 millimeters to fit the connectors the hole for the tool probe here on the top right is 12 millimeters in diameter the opening for the ddcs controller is made primarily with a mini hacksaw this looks like a lot of work but in real time it took only around 10 minutes to cut out the hole some filing was needed to remove the round corners created by the stepper the same approach was used with the rectangular hole for the mains power connector i was a bit on the safe side with the dimensions when cutting the hole with axle it is easier to do some additional filing to increase the size of the pocket than it is to make it smaller when i first mounted the selector switch i noticed that it was at an angle and not pointing straight up what i did not realize at first is that these switches have a notch to make sure that they are not rotated out of position over time i use the small square file to make a recess in the lid behind the on off button i am mounting a bracket with a normally open switch a normally closed switch and an led behind the selector switch i'm mounting a normally open switch and an led i will discuss the wiring of the switches later on the mains connector is fixed with m3 screws i'm using nylon insert lock nuts everywhere in the controller cabinet to prevent a metal nut from coming loose and possibly cause a short circuit somewhere the mains connector has an integrated fuse holder the old cnc controller had an 8 amp fast acting fuse 8 amps at 230 volts would translate into around 1800 watts this might seem a bit tight since the spindle is rated at 1500 watts and the power supply at 400 watts but it has been running without issues with an 8 amp fuse in the old controller so i will use that i would rather have a fuse that blows too soon than one that blows too late that's it for part one check out the written article below for more detailed information if there's anything that you do differently or have suggestions for improvements let me know in the comment section please leave a like or subscribe to the channel if you enjoyed this video and hopefully see you again in part two thanks for watching
Info
Channel: UptimeFab
Views: 122,364
Rating: undefined out of 5
Keywords:
Id: X-DY6iL6NcI
Channel Id: undefined
Length: 31min 4sec (1864 seconds)
Published: Mon Jan 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.