Arduino CNC Foam Cutting Machine (Complete Guide)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

LINK

Făcută acum câțiva ani din polistiren extrudat, ăla roz, apoi vopsite bucățile și lipite. Momentan nu mai am foam cutter :(

👍︎︎ 2 👤︎︎ u/seekidz 📅︎︎ Jan 28 2020 🗫︎ replies
Captions
hello Dan here from how to mechatronics calm and in this video we will learn how to build an Arduino CNC foam cutting machine [Music] this is a typical DIY CNC machine because it's made out of simple and cheap materials some 3d printed parts and it has an Arduino as a controller instead of bits or lasers the main tool of this machine is a hot wire or a special type of resistance wire which gets really hot when current flows straight the hot wire melts or vaporizes the phone when passing through it and so we can precisely and easily get any shape we want I said easily because building a CNC machine is actually not that hard if you are a beginner and thinking about building your first DIY CNC machine just stay tuned because I will explain how everything works I will show you the entire process of building it starting from designing the machine connecting the electronics components programming the Arduino and also explain how to prepare your shapes make G codes and control the Machine using free open-source programs so let's dive into it before we start I would like to give a shout out to jlc PCBs for sponsoring this video jlc PCB is a manufacturer of high quality PCBs which are used in many industries for prototyping as well as DIY projects once you have your PCB design ready simply upload the Gerber file review your PCB in the Gerber viewer select the properties that you want and order your PCB at a reasonable price if it's your first order from jlc PCB you can get up to 5 PCBs for only $2 to begin with here's the 3d model of this machine the base construction is made out of 20 by 20 millimeters t-slot aluminum profiles I chose these profiles because they are easy to use we don't have to drill any holes or something when assembling and plus they are reusable we can easily disassembled and use them for other projects the motion of each axis is achieved by using linear bearings sliding on a 10 millimeter smooth rods I use two rods for each axis the sliding blocks might look a bit weird but they are designed in a way that they can be easily treated printed as a single part while having multiple functions so for example the ex sliding block accommodates the two linear bearings it holds the y-axis rod it holds the pulley for the y-axis belt as well as it has handles for attaching the x axis belt for driving the sliding blocks we are using NEMA 17 stepper motors using a shaft coupler a simple threaded rod two pulleys and two belts we can evenly drive the two sliding blocks on each rail at the same time here we can also notice that we have a third stepper motor which enables the machine to make 2.5 D or 3d shapes and we will explain how that works a bit later in the video overall in terms of construction and rigidity the design is probably not that good but my point here was to make a functional machine with minimum parts possible and still be able to get the job done nevertheless you can find and download this 3d model as well as the STL files which are used for 3d printing on the website article the link to it is in the description of the video for 3d printing the parts I used Mike reality CR 10 3d printer which is actually a really good 3d printer with a reasonable price there is also a link to this 3d printer in the description in case you want to check it out note that some of the 3d printed parts need a bit of post-processing or the supporting material should be removed before using in some cases I also hate to use a rasp to remove the excess material I guess due to a bad support settings in the slicing software anyway now I have all the materials ready so I can start assembling the machine the t-slot aluminum profiles ahead were 16 centimeters long so according to the 3d model I cut each of them to size using a metal handsaw then using the corner brackets I assembled the base frame next time installing the shaft clamps for the x-axis you see working with this load profiles is so easy we just need some m5 bolts and T slot nuts for attaching all kind of things to them next time inserting the shaft road through the clamps well have inserted we also need to add the x-axis sliding block we just put the two bearings in it and then insert them on the shaft now we can slide in the shaft to the other side and using a four bolt and a nut we can tighten the shaft in place I repeated this process for the other side too next we need to install the y-axis for that purpose first we need to insert the rods into the x-axis sliding block place them flush with the bottom of the part and secure them using infrared sand bolts then we can insert the y-axis sliding blocks these sliding blocks use just a single inner bearing on top of the y-axis rods we need to attach the mounting brackets which will connect the two y-axis rods with a t-slot profile on the top again we are using the same method for securing them to the rods for attaching the t-slot profiles to the mounting brackets first I added three in five bolts and t-slot nuts on them then I just lit the profile in and fasten the bolts so with this we hit the main construction built and we can freely move in both the X and the y-axis next time attaching the legs on the base frame again it's so simple to do that using the T's load profiles once the legs are secured I am going to insert the first stepper motor for the x axis in this case I am using twin team leaders spacer nuts in order to distance the motor shaft so I'm able to place a belt pulley near the leg later on okay so next I have a simple six millimeters threaded rod which will drive the two belts at the same time so first I cut it to size place the bearing with six millimeters inner diameter on the opposite leg of the stepper motor and pass the threaded rod through it then I insert it and not for securing the rod to the bearing and tooth tooth pulleys for the belts for connecting the threaded rod to the stepper motors I'd really printed a shaft coupler with a five millimeter hole on the stepper side and six millimeter hole on the road side the shaft coupler has slots for inserting m3 nuts and then using m3 bolts or grub screws we can easily secure it to the motor shaft and a threaded rod next we need to position the police in a line with the sliding blocks handles and also secure them with the grub screws on the opposite side of the machine we can insert the two idler pulleys I used some aim five bolts and nuts for that purpose okay so now we are ready to install the gt2 belt for the x axis first I insert it and secure the belt to the sliding block with a help of a zip tie then I pass the belt around the tooth pulley on the other side around the idler pulley cut it to the appropriate size and again secure it to the other side of the sliding block using a zip tie I repeated this process for the other side as well when securing the other side we must make sure that the two sliding blocks are on the same position on the x axis for that purpose we can simply move them to the end of the rails and so we can tighten the belt and secure it with a zip tie with this the x axis sliding mechanism is done next with the same method we will assemble the y axis mechanism [Music] for securing the Bell to the sliding block again we use zip ties here the sliding block has only one handle and in order to secure the belt first izip tied one end of the bell then i stretch the belt to be tied enough and then with another zip tie I caught both ends of the belt now I can just remove the previous zip tie and cut off the excess belt as mentioned earlier when securing the belt on the other side we must make sure that the two sliding blocks are on the same position on the y axis with this the y axis mechanism is also done next I will attach one mortise load profile across the x axis this profile will serve for attaching the third stepper motor to it as well as for placing the foam pieces on it with the third stepper motor we can make the 2.5 D or actually three-dimensional shapes with this machine like for example the chess piece okay so next we need to install the resistance wire this wire needs to be able to withstand high heat while maintaining uniform temperature across its length that's usually a nichrome wire or a stainless steel fishing wire which are actually inexpensive and easy to get in order to work properly the wire needs to be tensioned between the two towers or the sliding blocks and here's how I did it I attached m5 bolts on both sliding blocks and added some small extension Springs to them then I simply attach the wire to the springs attention the wire as much as the springs allowed the wire needs to be tensioned like this with Springs because when it will get hot it will extend its length and so the springs will be able to compensate for that next we can connect the resistance fire with electrical wires we will use the DC power so the polarity here doesn't matter it's just important a current to flow through the wire in order to get hot here make sure your electrical wire is thick enough in order to support current rows of around 3 to 5 amps in my case I am using 22 gauge wire but I would suggest 20 or 80 wire just for sure initially I attached the electrical wire between the two nuts and so the current could pass from the coil to the resistance wire this actually didn't work really well and I will show you why in a minute I conducted the wire to the handles of the sliding block in order to stay neat and away from the hot wire next time installing the CNC machine n stops or limit switches these micro limit switches have three connections ground normally open and normally closed connection initially I connected them to normally open connection but after conducting some tests I switched to normally closed connection because in that way the machine works more stable the problem is the electrical noise generated while the CNC machine works which falsely triggers the switches like they are pressed and causes the machine to stop working there are several solutions for this problem but more on that on the website article next we can connect the cables to the stepper motors and then see how to connect all the electronic components of course the brain of the CNC machine is on a Reno board along with it we also need an Arduino CNC shield 3a 4988 stepper drivers and a DC to DC converter for controlling the temperature of the hot wire I really printed a stand for the electronics components which I secured it to one side of the t-slot profile using impulse first I secured the Arduino board to the stand and then inserted da Arduino CNC short on top of it next we need to select the resolution at which the stepper driver will drive the motors using some jumpers in my case I chose 16 step resolution by adding three jumpers to each driver and so the steppers will have smoother movements when placing the drivers make sure their orientation is correct the small potentiometers can be an indicator for that which should be oriented to the bottom side of the shield I continued with securing the DC converter in place then I connected the three stepper motors to the Arduino shield as well as the two limit switches to the X plus and y plus and stop pins for powering the machine I will use 12 volts 6 amps DC power supply the Arduino syncytial can actually work from 12 to 36 volts and also the particular DC converter that I use can work with the same voltages on the input of the DC converter I added a switch so I can turn on and off the hot wire separately on the output of the DC converter I simply connected the two wires from the two ends of the resistance wire finally we can connect and power the Arduino to the USB port and power the Arduino since issued and stepper motors through the DC power plug here's a circuit diagram of how everything needs to be connected alright now it's time to test the machine whether it works properly and I will start with the hot wire you can see here I have 0 volts at the DC converter input and once I turn on the switch I get 12 volts on the input then on the output of the DC converter again I have 0 volts but as we start turning the potentiometer we can adjust the output voltage from 0 to 12 volts and so the current flow through the hot wire and ultimately its temperature the best way to test at what voltage you should set the output of the DC converter is by trying to cut through some foam pieces the hot wire should be able to cut through the foam without much resistance and bending however after the initial testing you can see what happened to my hot wire it extended due to the heat and the springs which should have compensate for that didn't do their job actually the springs lost their functionality due to overheating because with this configuration the current was flowing through them as well so I replaced the old springs with new ones and now I bypass them by connecting the electrical wires directly to the resistance wire with the help of some elevator clamps okay so next we need to give life to this machine and actually make it a real CNC machine for that purpose we need to upload a firmware to the Arduino which Pancho's the motion of the machine the most popular choice for DIY CNC machines is the grbl or the herbal firmware it's open-source and we can freely download it from github com once we download it as a zip file we can extract it copy the herbal folder and past it into the Arduino library directory then we can open the arduino ide and from file examples herbal choose the herbal upload example now we need to select the arduino board that we are using arduino uno in this case select the comfort to which our arduino is connected and finally upload this sketch to the arduino once uploaded now the arduino knows how to read g codes and how to control the machine according to them next we need some kind of interface or a controller which will communicate and tell the arduino what to do again i am choosing an open-source program for that purpose and that's the universal g code center i downloaded the 2.0 platform version to run the program we need to extract the zip file go to the bin folder and open any of the executable UGS platform files this is actually a java program so in order to run the program first we need to install Java Runtime environment we can also download this for free from its official website so once we open the universal G code sender program first we need to run the setup wizard in order to configure the machine here we just need to select the proper port and connect the program to the arduino once the connection is established we can check the direction of moving of the motors by clicking the buttons I chose the positive movements to go from home position where the limits features are located to the other side next we need to calibrate the steps of the motors in order to achieve correct and accurate movements as we select at 16 step resolution on the drivers and the motors have 200 physical steps that it will take 3,200 steps in order the motor to make full 360 degrees movement now depending on the transmission type or in this case the size of the pulleys we need to calculate the number of steps the motors needs to do so the machine moves 1 millimeter the default value here is set to 200 steps per millimeter so once we click one of these move buttons the motor will make 250 steps now in reality using a ruler we measure the actual movement of the machine and we enter that number here in the program according to this the program will calculate and tell us what value we should change and update the steps per millimeter parameter in my case that's 83 steps per millimeter as for the z axis I set it to 400 steps per millimeter or that means a value of 1 limiter for the z axis we'll make a rotation of 45 degrees next we need to check whether the limit switches work properly depending whether we have connected them normally open or normally closed we can also invert them here just like I said before normally closed connection work better for me anyway here we need to notice that we need to turn off the z axis limit switch as we don't have one in our machine if we don't turn it off we won't be able to home the machine in order to do that we need to go to the herbal folder in the yard we know library and edit the config dot H file here we need to find the humming cycle lines and comment the default set for 3 axis CNC machine and uncomment the setup for two axis machine now we need to save the file and reload the Gerber upload example to the arduino know that you should probably restart the programs again in order the changes to be applied to the programs alright so next we can try to home the machine using the try homing button when clicked the machine should start moving toward the x limit switch and once pressed it will start moving the y axis if needed we can change the limit switches directions at the end of the setup wizard we can set the soft limits which actually limit the distance the machine can travel in each direction in my case dates 45 by 45 centimeters okay so now the program is ready to work before each use you should always home the machine and then you can do anything you want first I would suggest to play around and test the job controller or manually move the machine around also at this point you should try to cut some foam pieces in order to find out what feed rate or speed of movement will be most suitable for you so you should play around with both the hot wire temperature and the feed rate in order to figure out what will get you the most clean and precise cuts on your foam pieces finally what's left in this video is to take a look how to prepare the drawings so the CNC machine can make shapes out of them for that purpose we need a vector graphics software and again I chose an open-source one and that's Inkscape you can download it from its official web site for free I will show you two examples how to prepare a jig code for a CNC machine using Inkscape so first we should set the page size to the size of our working area and that's 45 by 45 centimeters for the first example I downloaded an image of the yard we know logo and import it into the program using the trace bitmap function first we need to convert the image to a vector format now in order to be able to cut the shape with the hot wire we need to make the shape to be a continuous pad that's because the hot bar is always present in the working area it cannot be raised like for example a bit or turned off in case of a laser while traveling from one to the other letter or shape so therefore using simple rectangles I connected all separate pieces together we do that by selecting the pieces and then use the union function on the other hand the inner closed loops need to be open and we can do that using the difference function so once we have our drawing ready we can use the g-code tools extension to generate the g-code first we need to generate the orientation points then we can scale our model to the desired size next we need to go to the tools library and with this define the tool that we are using for the CNC machine we can select a cylinder as the wire obviously has a cylindrical shape here we can change the parameters like the diameter of the tool I seal it to one millimeter as well as the feed rate the other parameters are not important at this time finally now we can generate the g-code for this shape using the path to g code function the g code is simply a set of instruction that the herbal or the Arduino can understand and according to them drive the stepper motor so now we can open the g code in the universal decode center program and should a visualizer window we can see the path that the machine should go through however we can notice here the yellow lights which represent an empty travel or travel through air in case of using bit or a laser as mentioned earlier in this case the Hotwire cannot move on these travels because the buyer would cut through the material and ruin the shape here we can actually notice that we didn't have a single pad for the entire shape because we forgot to open the closed areas inside the logo so now we can simply go back to the drawing make these closed areas open and then generate the J code again one more thing to mention that it's good idea to select your own starting point we can do that by double-clicking the shape select a node and then select break pad at selected node now if we open the new g code we can see that the pad starts from the letter a goes through the whole shape and ends back at the later a for securing the foam pieces to the CNC machine i made this simple holders which have entry bolts that penetrate the foam and hold it in place okay so now I will show you one more example of how to make a three-dimensional shape we will make a square pillar shape which needs to be cut on four sides ninety degrees from each other I got the pillar shape with the trace bitmap method as shown earlier now we can draw a simple rectangle as big as the pillar and we will subtract the pillar from the rectangle we will delete one of the sides as we need only one profile part of the pillar so this is the actual pad that the CNC machine should make and after each passing we need to rotate the third stepper motor 90 degrees in order to do that when creating the orientation point we need to set the z-depth to minus 8 millimeters then in the tools parameters we need to set the depth step to a value of 2 millimeters now after generating the g-code we can open it in the g-code Center and we can see that the machine will do 4 passes on the same pad at 2 millimeters depth difference in case of a CNC router that would mean that each time the bit will get 2 millimeters deeper to cut the material but here as shown earlier we set the z-axis to rotate 45 degrees with each millimeter or 90 degrees for 2 millimeters this temper motor travel anyway here we also need to modify the g-code a little bit by the folder generated g-code after each passing moves the z-axis to a value of 1 millimeter which in case of a CNC router it means that it raises the bit when an empty travel is performed actually we could leave the g-code unmodified but it will make unnecessary movements of the z-axis or rotate the foam piece for no reason therefore after each iteration of the code we just have to modify the z-axis value to stay at the same place without moving back to the value of 1 millimeter for mounting the foam piece for making the 3d shape we use this platform which contains m3 bolts that gets tucked into the foam piece and they hold it while it's being shaped before running the g-code we need to manually bring the hot wire near the foam piece the distance from the center to the hot wire should be as much as we want our shape to be deep in case we want the exact dimension like in the drawing we need to measure the distance from the origin to the center of the shape in the drawing then we need to click the reset zero button in the controller in order to tell the program that it should start from here instead of the home position and that's it now we just have to click the play button and the CNC machine will make the 3d shape so that's pretty much everything for this tutorial I hope the explanation was clear enough and that you will be able to make your own CNC machine of course for more details full list of components needed for this project 3d model files and links to all software that I use you can check the website article also feel free to ask any question related to this project in the comment section both on the website article and here on youtube thanks for watching and see you in the next one
Info
Channel: How To Mechatronics
Views: 1,186,393
Rating: 4.9450641 out of 5
Keywords: Arduino, CNC, Foam Cutter, Hot wire, Styrofoam, Arduino Project
Id: oIKEYM-lMWQ
Channel Id: undefined
Length: 26min 53sec (1613 seconds)
Published: Sun Jan 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.