Instructables - Build Your Own Cnc Machine

Transcription

FoodLivingOutsidePlayTechnologyWorkshopBuild your own cnc machineby gaby35b2 on February 17, 2015Table of ContentsBuild your own cnc machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1Intro: Build your own cnc machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2Step 1: Materials for the estructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2Step 2: Stepper motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2Step 3: Chip A4988 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3Step 4: Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3Step 5: The main drawer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3Step 6: The goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4Step 7: The head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Step 8: Place the stepper motors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6Step 9: The conexions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6Step 10: Control the arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8Step 11: Software and operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Step 12: Program arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . nc-machine/

Intro: Build your own cnc machinein this tutorial i'm going to show you how to make your own CNC machine. For this you can buy all the materials in local dealers, and electronic shops.CNC is a computer controled machine,and can cut, engrave and carve, in all kind of materials.Step 1: Materials for the estructurewe need a lot of materials for this proyect, then i only put here all you need for the estructure, in the other steps i tell you what materials you need. Im going to tell theexpenses here in spain, but think maybe the materials in your countri has diferent prices.1. Wood for the estructure, i use DM playwood.2. 3 stepper motors. 1,5 gr/cm3. Rotative tool like dremel4. Threaded rod5. Nuts and bolts.6. Tools.Step 2: Stepper motor.The stepper motor is a device that converts a series of electrical impulses in angular displacements , which means that it is able to advance a number of degrees (steps )depending on the order that you'll be . The stepper motor is a highly accurate motor as its shaft rotates from 1.8º to 1.8º which means that for 360 to give 200 steps. Thisgives them incredible precision , which transferred to the CNC provide an ability to make very small and delicate parts , but also can make big own-cnc-machine/

Step 3: Chip A4988chips A4988The Pololu A4988 chip are some electronic drivers that are used to control stepper motors, to decide the rotation direction and speed of these . The engines will beconnected to Arduino, I guess , you know perfectly well that is, if not in Ikkaro can find information about this board. Do not need to know much more about these chips,but if you want to deepen can inform you all in the manufacturer's website , and this other link you can download the datasheet of the A4988 .Step 4: CostscostsWell as I guess it's a question all you will be doing here I leave the list price .3 Chips A4988 - 45 (15 each)Arduino UNO - 26 (now the Leonardo goes for 20 )3 Stepper Motors - 36 3 per ebay1 PCB - 5Wood DM - 30 Milling - 50 (mine is brand but there are 20 )Threaded rods and nuts - 0.50 ATX - 20 / 50 ( I kick an old computer )Total - 200 approx.Step 5: The main drawerFirst, let's cut the boards that form the main drawer of the machine within which the electronics are placed and this , the router will work materials .The measures of this drawer are fully customizable and each of you can choose based measures , depending on the size of the pieces that want to mold . Note that whatwe measure the drawer is the maximum area on which the machine can work . All dimensions of the machine are customizable and can use this tutorial as a guide butthe size of your CNC is up to you .Once we have built the base of the machine, we will give a " rails " ( can be seen in the photo above ) for the main spindle to roll forward and backward. These guides arejust two strips of wood are glued to the two opposite sides of the drawer. Finally it should be something like this :About the guides we just put it rolls the main section of the machine, which moves in the direction of the axis X , and on this head that moves in direction of the axis Y andZ will meet But we will see a little wn-cnc-machine/

Step 6: The goalNow with two wooden planks we build a kind of structure in the form of goal , as shown in the picture, but considering that on the table is horizontal to do with slots to runthe wheels of the main spindle. This is the image of the structure:Below , the head structure , carries a strip which connects the two walls for stability and allows the threaded rod to pass through it to move . ( Do not be alarmed by thewiring already 'll explain in the next article and see that n-cnc-machine/

Step 7: The headWith what we have so far the machine should have already taken shape . Focus on the head then that is where the router , which goes up and down . This is the trickiestpart of the whole process and this piece must be perfect to prevent movement or pitching machine when running.We take three planks and unite to form a box of three walls , within which the router is placed. This box shall bear two covers , top and bottom , with the top, with a holefor the motor shaft to pass through it and the bottom , with a hole to fit threaded rod and stick to its axis of rotation . Within this table and in the vertical direction must bethree guide rods as the image , so that the central piece is moved along the Z axis , but recommend two router tables to hold two parts and not to pitch , because whenwork will put pressure on the tip of the router and this could be diverted c-machine/

Step 8: Place the stepper motors.Once the entire structure is built proceed to place the stepper motors.The placement of the motors must be done carefully to avoid pitching of these . First make a hole in each of the tables in a suitable measure to pass the motor shaft . Weintroduce the shafts into the holes and threaded rods connected to them. The connection of the threaded rod I leave to your imagination , but my system was put on theshaft a metal taco, of those used for hanging ceiling lamps, they have a threaded inlet and smooth , as meteis the shaft in the smooth rod in the thread. These items besold in hardware stores. Here I leave a detail of the joint rod engine :The threaded rods for the X axis will cut measure that has as main drawer depth to the Y axis, the cut of the measurement between the two side boards that hold thehead and the Z axis is short compared to the height of your head .Step 9: The conexionsIn this part we will see how to install the hardware environment necessary to control the machine.Materials 3 Chips A4988 Pololu Robotics 1 Arduino UNO 1 Power Supply ATX 1 Fan (optional) 1 PCB 3 stepper motors (elegid the model to suit you) Welder Tin FluxAs I explained in the first part of the tutorial Pololu A4988 chips are some drivers stepper motors, which means the signals sent by Arduino controlled -own-cnc-machine/

The first thing we have to do is ask and we will design the PCB, I bought this in dx.com and she soldered components.All electronics should look like in the picturesLeave a picture of the PCB without fan (I decided on wires instead of tracks, sorry)I leave a picture of how they should go all connectionsThe source that we use is an ATX (source computer) with which we can feed from the chips to the engines and the router. I chose an ATX as it is the cheapest and alsothe you can draw from an old computer. To operate NEED jumper on, there are several videos on youtube that explain the process.The source has different voltage outputs to connect all the electronics to the same ATX and so only use a socket on the wall.The voltages of different power outputs shown is the following image:I leave a description of chip voltages and utility of each pin: VDD - Power input chip 3.3 V / 5 V cables or orange red ATX. (You can choose between the two voltages even recommend 3.3 V) GND - Tierra del A4988. It connects to the land of the ATX, ATX black cables. VMOT - Power input for stepper motors. 7 V / 36 V (voltage depends on the motor and must match the engine, as it is this voltage which will be passed to the engine tomake it move.) GND - is the engine ground. This must be connected to the land of the A4988 !!!. RESET - Resets the chip to return to initial conditions. And switching between Stand-bye and Enable modes.In this connection are:IMPORTANT: To prevent malfunction of the machine all the lands must be connected, ie the land of the A4988 must be connected to the stepper motors and the land ofArduino. No problem that the voltages are different, although the chip is 5 V and 12 V motor can be interconnected lands together. Yes, this works if the source is anATX, have not tested if it is dangerous to other sources so if usais an ATX, do not conectéis anything together and Try before. Although for me the best option is an ATXas it is the most economical and powerful I found.Once all the A4988 are plugged in to the power and motors are connected to the A4988, can proceed to connect the cables Arduino wn-cnc-machine/

Step 10: Control the arduinoControl of A4988 by ArduinoArduino control chips using digital output pins. Each chip, we use 3 digital inputs (STEP, DIR and RESET), and therefore will require, 3 digital outputs Arduino. Whenarduino STEP send a pulse to the motor advance one step. If DIR receiving a signal, the motor will rotate in a clockwise, if received, to the contrary. The RESET pin isused to reset the chip.The pins that we will use our Arduino are: Pins 2, 4 and 7 for STEP pins for A4988 Pines 3, 5, and 6 for the DIR pin chips Pines 9, 10, 11 for the RESET pin of our A4988Then I leave a scheme chip connections:As can be seen using the DIR pin Arduino PWM outputs, and others simply use normal outlets, so it is not mandatory to follow this scheme but simply connect the PWMDIR and others where you want.Optionally we can put a fan or heatsink to chips because if the engine is more than 1 Amp the A4988 chip gets hot and can burn. For engines less than 1 Amp this is -your-own-cnc-machine/

Step 11: Software and operationFirst I will explain the operation of this.We make a 2D drawing or a 3D object using a software design, vector in the case of 2D drawings, as Inkscape or 3D such as Blender.Once we have what we want the machine to machine, we had another program from the drawing creates a code called G Code, which has all the instructions for themachine moves to the right coordinates to create the figure or taxed or PCB or whatever you to be modeled.The third step is to send the code to the machine, ie send from your computer to Arduino, which interprets thanks to the Firmware that carries within and moves enginesproperly. To do a program called Txapu CNC and explain its operation is used.Lets start with the tutorial explaining how to create the G code through a .svg file previously created in Inkscape (.svg file creation is irrelevant in this tutorial youtube butthere are thousands of examples of how to draw with Inkscape) as you can make drawing with Corel Draw or Adobe Flash or any program that allows the vector design.The program that we use is PyCam, free and available for Windows and Linux. This software allows us to spend all our 2D drawings and 3D models G code Very intuitiveand simple and also has a 3D viewer for real-time simulations of our models.Let's make a brief introduction of how to use it:Pycam Download Link: (For beginners download and run only the first file)http://pycam.sourceforge.net/download.htmlTo open .svg files must be installed two programs, Inkscape and PstoeditLink Inkscape:http://inkscape.org/download/?lang esLink to Pstoedit:http://www.pstoedit.net/The first is to open a new file:Then select the Task tab and select the desired options, in my case I want to tax in a table the text shown on the screen so I select "Gravure"Now chop "Generate Toolpaths" and hope to finish.When everything is ready go to the "Toolpaths" tab and there "Export all" and keep the G code generated where we want to save it.Now we open the file with Txapu CNC G code.Now to send the code you just created our CNC.To do Txapu CNC'll use a program that is only available for Linux, so as I said earlier you ought to install it, I recommend Ubuntu as it is the distribution of Linux easier touse and more followers. Install Ubuntu is simple and again on Youtube there are thousands of tutorials.Link to download Txapu nc-.Once you send the file Txapu CNC CNC start working with -cnc-machine/

Step 12: Program arduinoIn this final section we will see how to program Arduino, so that interpret the G code that sends the computer and move the stepper motors.Arduino must carry within it a Firmware, which as I mentioned, acts as an interpreter of G. Code This firmware can be downloaded from this ontraptor/trunk/firmware/?view tarand now we will see how to program to suit the needs of our machine such as speed, measures acceleration .Proceed to see how to program the microcontroller:Well, once downloaded the firmware that I have left on the link, you ought to open it with the Arduino, which is downloaded from herehttp://arduino.cc/en/Main/Softwareif what ye have not already installed.To open the downloaded firmware, open from Arduino IDE file with this name: "reprap new firmware" All other files automatically open when you open this.As you will see the files are distributed each in a tab.We only modify data in two of them, one tab "rsteppercontroller" in which we modify the Bitrate. In the picture we see the yellow which is the part that must change, and ifthe value is different from 19200 to 19200 you must change it.Now for the INIT tab and it will speed changes, steps per revolution and output Arduino digital pins.Setting steps per millimeterWhat does this mean ?, they are the necessary amount of steps you should take the step by step so that the threaded rod engine speed 1 mm. This is characteristic ofeach rod and hence you must measure. Do turn the rod and gives METER few laps to move 1 mm. The part of the image you see yellow is what must change. The valueto be set is the number of turns of the rod multiplied by 200 that are the steps the engine around.Note: 2 values, one for steps per inch and the other for millimeter steps are observed. Inches can leave them as is, because they will not influence the code.FeedratesNow let's look at feedrates, ie, the "speed" with which the A4988 alimetarán engines. This is adjusted depending on the engine, motors and engines need 100 need 1000,in my case, the engines need between 90 and 250, depending on the speed at which the motors rotate QUEREIS.How to check which one is right Feedrate for your engine?With CNC Txapu you test to spin the motors using the manual control, varying slowly Feedrate in TxapuCNC, if the engine makes a noise like a jet airplane, you aregoing through a lot with the Feedrate, I bajadlo !!!. If the engine sounds like a ratchet, is not enough, I upload it !!!.PinsIn this part of the programming of the chip, we will assign Arduino digital pins to the pins of the A4988. All this is as simple as writing the Arduino pin number you want toassign to the pin of the n-cnc-machine/

For example, X STEP PIN is pin A4988 Chip STEP controlling the motor axis X, then assign the Arduino pin number corresponding to this pin, for example 4, but canassign you want, keeping in mind that PWD pins are for DIR pins of the A4988.Extruders pinsIn these last lines of code, assign contacts to an extruder, if we use one, since this tutorial is geared to using a milling machine, but also the user can decide whether toplace an extruder instead of a router and So this is part of the code, so definais the pins corresponding to the extruder. (As I said before, in case you want to add a).With all this, and with great sorrow, here, just the tutorial "How to make a homemade CNC milling machine 3 n-cnc-machine/

-machine/

Related InstructablesArduino CNC byJohnnieTDIY CNC RouterPlans : How toBuild byMakeItWithJasonCHEAPARDUINO CNCbysiemenwautersCNC Stomp PadProject CNCProgramming G-CodeProgramming CNC PlasmaCutting ctables.com/id/Build-your-own-cnc-machine/Make Your OwnGRBL CNCPendant byrawkstar320Build A CheapHandcraftedCNC Mill byASCAS

-machine/ Step 8: Place the stepper motors. Once the entir