Building a DIY CNC machine might be easier that you thought. Especially so if you are capable of building a quadcopter from scratch, it’s should be straight forward enough. Jocelyn Da Prato shares with us how he built his CNC machine at home, for cutting carbon fiber multirotor frames.
It was back in early 2015, when he became serious about brushless quadcopters after flying a few micro quads. There were fewer mini quad frames available back then that fits 5 inches props, so he decided to cut his own carbon fiber frame by building a DIY desktop CNC machine.
If you have any questions, feel free to ask the author here in the forum: http://intofpv.com/t-diy-cnc-6k-cf-beginner-mistakes
What is CNC?
CNC stands for Computer Numerical Control. Basically it’s a spindle (or Dremel) that mill your vector drawing on material by travelling different axis powered by stepper motors. Coordinates and operation commands are sent from a computer.
Electronics in a CNC machine is really similar to that of a multirotor.
The Arduino UNO micro controller board is the Brain of the CNC machine, it receives commands from the computer via a USB cable.
The brain needs a translator to talk to stepper motors, here comes the step motor drivers – Easydrivers. Easydrivers translate signals of directions and steps sent from the brain to the stepper motors that are bipolar for this case (4 wires coupled (2, 2).
You can optionally stack a single driver shield on top of the Arduino, instead of individual Easydrivers for each axis.
Next image show how all is plugged. I’ll not enter in details but you can find many inspirations on the net.
The USB connection should provide enough power for the Arduino UNO, so no external power source is required. But the Easydrivers have to be supplied 12V in order to power up the motors.
Motors that I bought have Red-Blue coupled and Green-Black coupled. You can find these pairs with a simple test by joining the 2 wires with your finger, then try to turn the motor shaft with the other hand. When you are connecting the pair, you should feel an obvious resistance when turning the motor.
Note that my X axis motor wires connections are in reverse compared to the Y and Z motors. That’s because I’m using leadscrew and it’s the only axis that when it rotate clockwise, it goes in the minus, instead of Y and Z rotating in CW will give positive travelling.
CNC Parts list & Cost
This project costed me about $190. I already had the fasteners and MDF (wood sheets) so I saved some money on those. I tried to find all the parts at one place for easier shipping. The quality of the parts is not perfect but they worked fine for me.
- Stepper Motors: 3 x $15.65
- Easydrivers: 5 for $10.69
- Arduino UNO (It’s a cheap clone, but it works)
- Linear rail shaft support: 12 x $2.05
- Linear bearing for 10mm rods: 8 x $4.44
- Linear bearing for 8mm rods: 2 x $3.19
- 8mm rods: 2 x $5.49
- 10mm rods: 4 x $6.49
Firmware – GRBL
Like Cleanflight and Betaflight are the firmware of the flight controllers, you will also need firmware for your CNC machine that you flash on the Arduino UNO (via USB). I chose GRBL because it’s often recommended in Youtube tutorials and well supported in the community.
I used the dedicated tool Xloader.exe to upload it to the Arduino board, but the Arduino IDE should do the same job too.
Before building you CNC machine structure, you should familiarize your choice of “sender” software. The “sender” software sends the G-Code commands to the Arduino, such as what coordinates the drill should move to, and how fast it should move, etc.
There are many sender software options out there, I am using Universal-G-Code-Sender, because it’s free and it’s easy to use.
Testing your electronics
Before moving on, we should first test the electronics.
It could also be useful to get to know the capability of your hardware, for example to find out how many steps you stepper motors need to complete one revolution (360°). Generally speaking one step does 1.8°, but it could be different on yours.
You could also try to invert the motors polarity (swapping simply the pairs). But be careful, I burned 2 Easydrivers when swapping my motor wiring while the easydriver was powered on. Learn from my mistakes, and always turned off all electronics before playing with the wiring.
It’s important to know exactly where you are going before starting creating structure parts and assembling them. I did a rough plan on 3dsmax that I perfected afterwards to measure all pieces needed. I used MDF (Medium-density fibreboard) 3/4 and 1/2, wood glue and nail gun.
Generally with this type of structure found on internet, the Y axis leadscrew normally travels underneath the bed (left), mine is on the behind (right).
The parts of the build are simple with only a few pieces. It’s easy to troubleshoot, I can remove everything and put them back in within minutes.
Electronics in a box with a fan to prevent dust getting in.
It’s important to cut your material with a “buffer” layer underneath. I used 1/2 MDF sheet.
There are 2 mistakes in this design which I learned from.
Mistake 1: these Y bearings are too close, I should improve my build by adding more space in-between them and adding a second motor for Y axis.
Mistake 2: I used some aluminium rope coupler to hold my leadscrew to the motor shaft. I should use real shaft coupler instead.
Calibration & Tests
Some people calculate the exact diameter of leadscrew they use and the distance in-between screw thread with the revolution of their motors. For me it was simple, when my CNC has been built, I dropped a ruler on the bed, traveled forth and back finding the exact number to enter for the calibration of step/mm. It’s important, because when you create G-Code, you entered coordinates in mm or inches (by default GRBL is in mm).
When you comfortable with the accuracy and can go forth and back multiple time reaching the same positions, you’re ready to draw. Mount a pen and type some coordinates traveling away from your start and going back to precise positions. That’s my first drawing in G-Code. You can clearly see the oscillation in some diagonal, that was my problematic Y.
1 – Create your design
You have to obtain vector 2d shapes. Many software can provide tools for you to draw in splines; Illustrator, Autodesk « CAD » series, etc…. Because my experience in game, I’m using 3dsmax to visualize in 3d my whole build with all components. Than I’m extracting from the 3d edges many splines that are 2d vectorial shapes. Before exporting them in SVG, STL or DXF, I’m placing them in the X+ and Y+ fitting on a « helper » area that represent my raw material. You can move your parts and create reference material area in a CAM software too.
2 – Generate G-Code in a CAM software
CAM stands for “Computer-aided manufacturing”. A CAM software is there to program the milling operations base on paths and create G-Code that the firmware will run. Generally you can either create basic shapes in-software or import your vector drawing. There’s many available, I found CamBam easy to use.
It’s simple as selecting path, adding to it a type of operation and setting some informations as the traveling rate, engraving bits diameter, etc.… I used mostly 2 types of operations: Profile (will contour inside or outside a path) and Pocket (will remove all the material inside of a closed shape). On each operations you can specify the target depth and how much passes to mill reaching this depth. On hard material, as 6K CF of 3.1mm, I milled my pieces in 4 passes of -0.825mm each with a 2mm diameter bit, targeting a depth of -3.3mm. To hold the pieces in place you can add “holding tabs”, they are bridges to keep pieces attached to the material, not having them floating completely.
Once the operations are assigned, you can generate G-Code. Generally it creates a text file, with sometimes different file extension, but you can edit it manually. Depending if you’re sending only operation at a time (chunk of G-Code), you should consider milling the holes inside of a piece before cutting its contour to hold the stability of the material as long you can. I have a Dremel not wired with my Arduino Uno, so I cleaned the code a little bit by hand to get only the essential (G1 and G3 operations). When you’re familiar you can linked your spindle on your electronic and manage different cutting rate base on different operations.
3 – Mill you parts
Now you have to send “live” the G-Code to the firmware. I use Universal-GCode-Sender as many others. First I placed my Dremel at my 0. 0. 0. wanted (for me left-down corner of my material) and touching the material with practically no pressure. When the 0. 0. 0. is set I switch my Dremel at ON by hand and send the G-Code separately for each operations. There’s more tiny steps to do, but it’s pretty much it.
Some helpful tips
Start cheap, build cheap, and try it, cut some stuff. Than ask yourself if you want or have to invest on a solid CNC seriously.
Buy a used Dremel first, it will cut at low rate. You will see later if you go more pro.
If you use a Dremel, and the bit holds in place by pressure, tighten it with plier. 2 times my bit slacked and plunged to my material digging in my table.
Axis is inverted (want motor to spin inverse). Swap the pairs of motor wire simply (as we do in quad), but keep them in pair.
Most importantly, remember that carbon fiber dust is really dangerous for your health. For your health and safety, always take precautions such as wearing proper mask and/or milling underwater. Using only hoover like shown in the video is not recommended. One good thing to do is installing a ventilation system with enclosed case.
Mistakes that I did
My goal was to create from scratch a CNC, I know you understand we like to build! But also doing it for cheap for my first one. I ordered mostly new parts from Banggood. Electronics were clean and functional. Drill bits were fine too, even after 6K CF cutting. But the bearing are rolling as if they were plunged in sand. Also these bearing are not tight enough, I lose accuracy. That was the most relevant mistake. But also I could benefit of more stability by extending more the bearings on my Y axis. I should consider buying another stepper motor to get 2 motors for the Y close to the linear bearing as many other do instead of only one at the center.
8mm diameter rods were perfect straight. But all my 10mm diameter rods arrived bent, from let say 0.4mm to 0.7mm. Banggood refund me only 10$. I’ll let you judge if it’s acceptable, I’ll not share my opinion here. On my side, my fault was to think that 10mm rods are enough solid to hold my build. The answer is no. The Dremel and all the Z axis set were banking, giving an imprecision of 1mm on the Y. I had to close-up a little more the support to reduce the dynamic bending by the Dremel set weight.
At the end, seeing this cost, I think I could have build a similar CNC with a similar accuracy with drawer rails, and for cheaper. But building its own rail added more build time. I was a bit impatient. I’m still satisfied with the time it took to me and what I can cut. Cutting at the center render nice pieces. You should consider ordering these fully supported railing instead.
Or adding 2 motors for the Y
Best setup is ?
If money is not a constraint to you, I suggest strongly to go with better railing system that is supported all the way long. Or simply buy a real CNC kit as X-Carve, Shapeoko or Stepcraft.
Frame and build
All CF weight 77g (no fastener). The whole build with nano-tech 45C 1000mAh is at 316g
I’m actually flying 3S, will move to 4S when 3S will start to be boring!
- Arms + Center: 3.1mm 4 x 4 inches 6K: $6.99
- Top plate: 2mm 200x300mm 3K sheet found on ebay, unlisted now, but you can find similar ones : ~ $20
My LOS 200 Mini Quad Parts list
Not the most expensive parts, but enough to have a lot of fun!
- Naze32. 24.60$
- BlHeli 20A Oneshot. 4 x 9$
- PDB with 5v BEC. 2$
- SunnySky 2204 2300kv. 4 x 9.90$
- KingKong 5045 bullnose unbreakable. 10 pairs for 5$ (cheap props for good quality seriously!)
- 3S Nano-Tech Turnigy 45C 1000mAh. 11.30$
Planning is the key. I planned to build my CNC to do my own frame because I love creating but also to be able to get spare parts when I need them. You know what, all my predictions happened, maybe because I’m describing my own future, haha. I already replaced broken arm due to a solid crash, but this frame is really tough tho, survived to many other ones!
Testing the frame cut by myself:
Author: Jocelyn Da Prato Blog on DIY and Quads: http://drones-xp.blogspot.ca/