Introduction: My First CNC ( Fails, Wins and Future )
First thing: Its gonna be long and might be boring a bit because i tried to explain pretty much everything
Second thing: Story part is totally optional to read and each step has it own story :P
CNC: Computer Numerical Control
Tools Required ( I have tried to mention every component used but please go through the steps too to avoid missing any components )
CNC controller tools
- Soldering iron
- Soldering wire
- One sided copper clad PCB board
- PCB etching solution
- Single row male and female headers
- Motor drivers ( 3 for 3 axis CNC and i used a4988 )
- Arduino UNO
- Glaze paper
- 100uf 25v capacitors
Tools/parts for CNC motors
- Wires to handle 2-3 amp of current ( It depend upon the motors amps )
- Paint ( Optional )
- 4 pin male and female headers
Tools/parts required for frame/structure of CNC
- 2x4 feet ( Plexiglas ( I used 4 mm thick ))
- 4 metal square tubings ( I used 1" one and iron ones # cheapest )
- Screw driver set
- Cutting tool like Table saw / circular saw / jig saw or even hand saw will do
- Threaded rods n nuts
- Ball bearings
- Loads of nut n bolts
- Loads of screws n nuts
- Super glue or acrylic welder
FAQ ( Expected )
Q. Why u havent mentioned the exact amount of things required like screws n nuts etc ?
A. I haven't completed it 100% yet thats why and also because you might save or need extra for what CNC machine size you are working on. I would say buy a box that contain 100 pieces or more. They always come in handy and it would cost more to go again n again to go to market to buy screws for diff projects.
Q. How many ball bearings will be required and what dia threaded rods should be used ?
A. The way i made it, required 8 bearings per axis ( total 24 ). I used 12mm threaded rod and they are enough.
* English aint my native language
Story ( Optional )
First thing first. I cant afford a CNC machine by any means at the moment ( i am talking about the Pre-built ones ). But if i could, i would have gone with x-carve ( I really wish i had seen x-carve before i started my project i could have save some money and time and would have build something better then i have )
I love CNCs. I started making one only because i found dirt cheap stepper motors in a junk yard ( aprox 2.6$/ motor and these were NEMA 17 ). At that time i knew what a CNC is but have absolutely no knowledge about torque, power, Voltage or controller of a stepper motor. So i brought em home n did hours n hours of reading to get the basics. I tested em with Arduino UNO directly first and was happy that all three of em were spinning at-least.
Step 1: Motors and Their Reconditioning
If you are buying used motors from a store or from a junkyard here are some of the steps that can help in testing and making em run for long time.
- Make sure that the rotor rotates by hand. If it doesn't then most likely the motor is already dead. ( If the rotor doesn't rotate and power is given then it will die most probably anyways reason high current n heat resulting in damaging the coils ) this trick is if u are buying it from a junkyard with a 50 50 chance that it will work or not.
- If it rotates the second thing to check are the coils. So here's how i check if the coils are okay. I short all the motor wires ( off course the one that are outside that require driver or deliver power to motor )and then try to rotate the rotor by hand if its hard to move with shorted wires it means that the coils are good ( or at-least there is above 70% chance that the motor is alive )
If u have bought the motor from a junk yard i will really recommend to take it apart oil it n clean it just to make sure that rust or dirt aint stressing the motor.
- Most of the stepper motors are really easy to open like the one i bought had 8 screws that i had to un-screw to take it apart.
- Once opened clean all the dirt, check if the bearings are spinning fine give it some oil and close it back.
- Also you can paint the outer shell for aesthetics or to prevent it from rusting just in case its in bad shape.
- Dont forget to change the motor wires too as u dnt know their internal condition ( I am taking about wires not the winding here )
The one i bought were in really bad shape aesthetically. So i took em apart clean them with WD-40 clean the bearings # made em silky smooth n applied some fresh paint on the outer shell. I also change the wires and made em bipolar by simply not soldering the tap wires. Now when i learnt about the stepper motor drivers i was in deep ___ as my motor stickers were already torn off and i didnt know anything about their model, voltages and currents. So i spent weeks googling. 2 of them were exact same motors one was a bit different. I visited the junkyard again and found 2 digits of the model. By long search finally found model of one of em. Then for the remaining 2 that were of the same type i found their model by searching on google for their stock wires colors. << I m not lying i literary spent more then 2 weeks to finally know what i had in my hand.
The silver one is the motor in the pics i started with and ended with that blue motor ( all 3 look the same BTW )
Step 2: Selecting a Motor Driver and Adjustments
Its a crucial step in any CNC build and you cant compromise here even for 0.1 ohm ( means accuracy is really imp )
- Now depending upon the stepper motor current you have to select a stepper motor driver IC.
- A4988 and DRV8825 are the 2 best options here keeping in mind cost effectiveness and vast help that can be found on world wide web regarding these 2.
- A complete guide on A4988 n DRV8825 Its a must read. And please pay attention to the Current sense resistors (Rs) section. ( This guide isnt written by me but its the best out )
Dont remove the motor from the driver when the motor is spinning
Dont use either of the drivers at max potential without proper cooling ( heat sink and fan )
Dont put the drivers in wrong direction in a shield or PCB or be very careful while wiring your driver.
I first ordered the DRV8825 but then i thought i should save some money in buying A4988 as my motors max draw 1.7A. Its very close to max limit of 2A for an A4988 but with heat sink and cooling i can get away with that. I got 3 A4988 for around 9$. ( Heat sinks are mostly given free with em ).
I emphasized on Current sense resistor section because i was calculating my vref wrong for a week or so. Because i bought the driver from a website that stated that its original and original has a 0.2 Ohm Rs while the one shipped were some Chinese remake that have an Rs value of 0.1 Ohm. So i was putting em in great stress though these survived :D
One more thing i tried multiple times to test the motors on full stepping. But they were skipping steps and i was un-able to find the reason. I tried adjusting Vref so many times. Finally i switched to half stepping that solved the issue.
Step 3: Stepper Motor Driver Shield
Now instead of 16 wires going from every stepper driver to the arduino UNO one should either buy a shield or make one. There was none available near me or affordable enough thats why i made my own. But if u can get a cheap one surely go for that.
Making a PCB at home is really fun
- I designed my pcb in EasyEDA ( an online free to use software with huge component library and easy to use )
- Printed it on a glaze paper
- Ironed that printed paper on the copper board ( ironed 3-4 min to make sure each and ever circuit line is transferred)
- Put it in warm water and peeled the glaze paper.
- Then i put it in the ferric chloride solution to etch
- In the last step i used petrol to clean of the black printer ink.
- Drilled holes with a 1mm drill bit
- Placed and soldered the components
I tried to put the circuit on single side but its impossible. So used jumper wires. Also i changed some of the pins too, to make the circuit fit on single side. Later i found that the GRBL software doesnt allow remapping of all the pins so the end result PCB had some more jumper wires then i thought of.
I really recommend to use jumper wires instead changing the pin numbers/re-mapping. Remapping the GRBL pins is really hectic.
After you Arduino shield is ready burn in the GRBL code into your Arduino UNO and you will be ready to go.
In the step where u use iron to transfer the ink from paper to copper board, if u see that after peeling some circuit line is missed you can use permanent marker to draw that line and it will mend your circuit just fine.
If the transfer step doesnt work out well you can repeat that step by cleaning it with petrol and using a newly printed glaze paper circuit.
Once the board is completed make sure to test it. ( Its really a fun step too, that feeling when every thing is going according to plan )
Glaze paper is much cheaper and it can be inserted into more printers as compared to the PCB sticker type paper. The PCB sticker wasnt going in my friends's printer as its a bit thicker and more slippery too. Glaze paper results are included and i think it came out perfect.
I really enjoyed making this PCB it was a great learning experience.
Step 4: Testing
Now before moving onto structure its really important to check motors and their accuracy. Here are some steps that can help you do that.
- First add a sticker to the motor shaft like in the picture. It will help you determine if after doing a cnc job it comes back to its initial position or not.
- Place all the motors with the stickers facing in same direction ( for simplicity )
- Make a simple 2D object ( a square or a circle ) using a software like Easel ( free online carving software ) or flatCAM ( Free PCB manufacturing software ) and then generates its gcode .
- Using chilli pepper or GRBL controller send that gcode to your Arduino UNO to begin the cnc job.
- Your motors will start spinning and if they stop at exact same orientation at which they started you are ready to go to next step.
- If the motors stop at some different angle then your motor must be skipping steps. In case of step skipping heres what u can do.
- Make sure your motor drivers vref is set right and the motors are getting enough current
- Make sure you are not setting the feed rate too high in GRBL settings
- And if you are still having the issue you can try half step mode ( like me )
How to find your machine steps per mm ?
I went to this site put my data in and voila Calculator ( you can also see pic for reference )
Motor step angle: Its mostly 1.8 degrees i dnt know what other are but it is mentioned on motor's spec sticker
Driver microstepping: I have mine set at half so i selected half
Leadscrew pitch: Its the dsitance between the two adjecent thred peaks ( mine is 1.75 )
Pitch presets: you dont need to change it if you know your Leadscrew pitch
Gear ratio: 1:1 ( as i am coupling directly my shafts and rods )
It took a lil time to learn FlatCAM. I personally found it really difficult and non user friendly but its free sooo...
On the other hand Easel is really easy. Like i told before my motors were skipping steps in full step mods and the problem was solved using half steps and i am still unable to find the real cause of that.
Step 5: The Rail Gliders
First thing the idea isnt mine it has been on the internet from years now. Two surfaces at 90 degree angle holding the bearings make a pretty cheap and perfect glider. ( I hope i am using the right term here, i call the metal tubing rails and these thingies gliders that glide over those rails :P )
The 4 pics in this slide say it all
I salute to the person who invented these. The regular rails and linear bearing things are too too expensive.Those smaller bearings were around 0.65$ a piece and the bigger ones were .5$ a piece from a local hardware store. Later i found a store that gave me those smaller ones 0.4$ a piece and they were of better quality too so do some digging before buying :)
Step 6: Frame Y Axis Part 1
Y axis is the one i went for to start my frame. Working with Plexiglas is fun and with a good super glue or acrylic welder you can get such good strong results that will surprise you for sure. I used my own table saw ( Circular saw to table saw ) to cut all the acrylic. It isnt that much fun due to extreme noise and all that Plexiglas powder flying every where. ( BTW the testing cut i did in this Circular saw to table saw video was for my CNC machine, so from that you can get an idea how long i have been working on my CNC )
So here are the steps that i took
- First i cut all the pieces. Now i had 1 inch iron tubing so i made holders according to that u will have to make according to your own rails.
- Actually i cut two strips of Plexiglas. One was a lil more then 1 inch to make tubing holder and one was around 3 inch wide. Then i cut those strips down to adequate pieces that can be seen in the pix.
- After that i glued all the parts together.
- Then i sanded one side of the tube holder to make sure that its all flat and square. ( pic 5 )
- Glued the tubing holder with the base making sure its nice and square ( pic 6 )
- The tubing holder came really nice and strong. Just added a little foamic sheet to sit it tight and safe.( pic 8 ) The finished base and tube holder joined together can be seen in the last pic on this slide.
- Drilled 2 holes on each tube holder so that i can secure the tubing nice and tight. And then i number the tubing and base just to make sure that i put it back right every time. ( pic 9 and 10)
- Make it sure your 90s are perfect 90s. The things that should be square with each other must be kept square for rigidity and accuracy.
- If you are gluing 2 Plexiglas pieces together after putting the glue on join those pieces and keep them in place as quickly as possible. The quicker the stronger as super glues dry really fast.
I bought that circular saw basically so i can get nice and square cut for my CNC. But of course i had so many other uses of it too. My First cut went awful, thats when i decided to convert my circular saw to table saw. This CNC project has gone thru so much breaks. Finding the right parts here is really challenging and also due to some budget issues. Though i did multiple small projects in those breaks to keep eating junk food and continue my CNC build.
The response, number of views and the digits near the heart on my Circular saw to table saw insturctable kept me going and it motivated me a lot to keep uploading stuff :)
Step 7: Frame Y Axis Part 2
So i cut a total of 7 more strips of Plexiglas. 4 were to hold those 4 bases/pillars together that i built in last part and 3 pieces were to make a y axis glide.
Now Plexiglas is a flexible thing and as length increases the end point can be bend more and more. So i had to join those strips at 90 degree to make em strong and less flexible.
So the 4 strips i had were joined in pairs of two for the base.
The 3 strips were joined like shown in pic 4 to give glide rigidity.
Then i attached the glides bearing thingy at its ends ( pic 8 and 9)
- Now to join those plexi pieces at 90 degree you will need a flat surface big enough that u can put those parts together in right orientation.
- After that put tiny drops two at the edges and one in the middle and make sure the 2 strips that you are joining at 90 angle are well arranged.
- When the glue dries check once again that the pieces are like the way u wanted and then you can drop in there more glue to join them strong.
- When drilling holes to join two pieces of Plexiglas together i apply a lil amount of glue to hold those part together so i can drill easy and join them at the angle i wanted em too. Look at the video for reference.
At this point i was really satisfied that i had reduced the flexibility by great amount. But i was totally unaware of the consequences that the remaining flexibility will have.
Step 8: Frame Y Axis Part 3 ( the Upgrade )
Now the problem with my current gilders was that the inner bearings were too close to each other. And if the force was applied near the edges it was twisting my hole Y-axis glide thingy. Instead of moving linearly. So i did two things to solve this problem.
- Change the design a bit and moved the inner bearings to the outer side like show in the video.
- Also increased the horizontal distance between the two bearings to make em more stable.
- Drilled one side holes of the Y-axis frame base a lil wider like shown in the pics so that i can adjust the tension of the bearings. ( Meaning i can increase or decrease the parallel distance between those two parallel rails of Y-axis by a few mm ) So if i increase the distance the rails will be wide apart to keep the glider tight and play free. << i dnt know i think i am not explaining it good enough :(
Yes thats a door ( the last pic ). Our kitchen door fell apart due to termite attack few days back so i used it as a flat surface while joining the Y-axis frame together to make sure that every base pillar was at the right height.
Step 9: Y Axis Threaded Rod Bearing Holder and Cheap Shaft Coupler
The bearing holder
First 5 pictures on this slide will give u exact idea how it was made.
- I used old rubber tubes lying around to make one. Inserted a thin one in the wider one and voila.
- I had to put that 8mm inner diameter tube in warm water so that i can inser my 12mm threaded rod in it.
- The other 5mm diameter tube went pretty smooth and tight on the stepper motor shaft. Look at the test video if the pix dont do the justice.
The Testing ( I was happy and surprised )
Step 10: X Axis Pillars
- For X axis pillars cut 4 strips, 2 wide and 2 thin.
- Glued one wide and one thin to avoid flexing.
- Drilled 2 holes and mounted them on the Y axis glides as shown in the pix
- Then made small "V" shaped holders for my X axis square metal tubing aka rails.
- Glued those small V shaped holders in the right place making sure that on both pillars they are exact same height and depth
- Then temporally taped my metal rods in the place like shown in the pics so that i can drill easily and perfectly.
- Again i marked my rails with numbers so that when ever i disassemble and reassemble my machine i put each and every thing in its respective place.
This pillar idea seemed right but this was my first big mistake. But dont worry i got things done right later :P
Step 11: X Axis Gliding Thingy
- This x axis gliding thing will act as a base for z axis too.
- Cut the Plexiglas pieces and then marked the bend location. First i measured and marked with a pencil.
- Then as in the bending process i had to remove the Plexiglas safety wrap before heating, i engraved the pencil marks with an old compass needle.
- Made the respective bends and drilled some holes to assemble all the parts together
I was really happy that i learnt a new thing and that was bending Plexiglas on stove. I tried to make a video but this job really requires two hand thats why i couldn't film and do the job at the same time. Basically u just keep moving in rhythm the piece to be bend in flames. Once it gets soft you can bend it in any shape using a mould or simply at 90 degrees. Sounds dangerous and difficult but its easy and safe believe me. And if u bend it wrong you can re-heat and re bend to. Just dont hold it in flames for too long or it will melt or bubble.
Step 12: X Axis Threaded Rod and Motion Assembly
Now to place the threaded rod between the x axis horizontal rails i did the following
- Disassembled one of my motor so that i can mark the exact holes for the stepper motor mounting and shaft.
- Then i reassembled my motor and attached it in place and with the help of a couple attached threaded rod to it.
- On the opposite side i needed to make the bearing holder piece. For that i bent a piece of Plexiglas and attached another piece of Plexiglas to it the only way to explain it is watch the video.
- Temporally to hold the rod in exact place i used multiple tape pieces that can be seen in pic 5. By exact place i mean parallel to rails all the way and at same depth too.
- Then used hot glue gun to glue the bearing in place. Later i added more glue to strengthen it
- then to secure this bearing holder in place i drilled a hole thru it all the way into the lower rail and screwed it.
- To make glide thing to move as the rod rotates i made a u shaped nut holder and attached it to the Z axis base frame or what ever you want to call it. look at the video in the next step for reference.
Told you so many already now i want to sleep.
Step 13: Testing of X Axis
Yea it moves :D
Step 14: Reinforcing
Now i talked about one mistake in step 10 and that was that the pillars were swinging a bit. Now for 2D drawing and 3D printing it aint that much of an issue but when it will come to routing i needed every thing to be stiff and hard so i reinforced my X-axis to remove flexing to almost zero.
Those pieces of wood are heavy and strong and were lying around for years in my house so at last the proved to be useful. Again i cut them on my table saw :D
Step 15: THE FINAL 2D Drawing Test
Well being honest the results are not acceptable apart from that pen skipping the drawing if u look close you can see that the angled lines in the drawing are not perfect thus the circles and arcs will be or are bad as well.
Reason Wobble. Those cheap threaded rods arent perfect and i took them to a hardware store to get them straight and it worsen the results as that so called pro engineer make them wobble even more. Resulting in wobbling and bad angled lines n arcs.
As far as straight lines are concerned they are some what acceptable but in round shapes as the machine wobbles alot and both axis wobble differently too, so the sync motion is really disturbed resulting in staircase rather then a slide kind of line.
Mistakes i did but you should avoid
1. Although Plexiglas is easier to cut, join, drill and handle its flexible and that makes it worst material for a CNC router but for 3D printer or laser engraver or a CNC machine in which u dont stress the axis its the best. I would say go with wood or those iron tubes for making your whole machine.
2. Keep the height of X-axis pillar as small as possible, it will make it more stable and avoid flexing.
3. Dont go for threaded rods unless you are sure they are straight. Wobbling will ruin your accuracy and heat up your motors as well.
4. To make motors look clean i attach wires to motors keeping in mind where they will be going. Like Z motor got the longest wire and Y-axis motor got the shortest. But as i will be changing design in upgrade a bit i think i will have to change their length as well. So i would say better attach 4 inch wires to all the motors and then ad connector to it. Later you can make any size jumper cable to hook um up with your
I will be back with the second version of this very same machine or you can say an upgraded version of this machine. I am not going to give up to make it better stable and accurate while keeping the cost as low as possible.
Current total amount spend is around 65 USD($) up til this far. Nothing was bought from online stores.
For you #reader
Dont hesitate in correcting me
Dont hesitate in asking any question
Dont hesitate in liking and sharing
Dont hesitate in giving an advice
Next page only contains extra snaps
Step 16: The Extra Snaps
We have a be nice policy.
Please be positive and constructive.