Difference between revisions of "Using the CNC mill"

From Interaction Station Wiki
Jump to navigation Jump to search
(changes made by werner)
m
Line 5: Line 5:
 
* Fritzing (easy to use) https://fritzing.org/
 
* Fritzing (easy to use) https://fritzing.org/
 
* Kicad (more professional) https://www.kicad.org/  
 
* Kicad (more professional) https://www.kicad.org/  
 +
 
Lets start with Fritzing.
 
Lets start with Fritzing.
 +
 
[https://fritzing.org/learning/ All the Fritzing Tutorials] <br>
 
[https://fritzing.org/learning/ All the Fritzing Tutorials] <br>
 
[https://fritzing.org/learning/tutorials/designing-pcb/ pcb design basic tutorial] <br>
 
[https://fritzing.org/learning/tutorials/designing-pcb/ pcb design basic tutorial] <br>
Line 15: Line 17:
  
 
===2. Generating the G-code===
 
===2. Generating the G-code===
In this step you have to generate G-code with the Gerber files. G-code or sometimes called nc-code (numeric controll code) tells the CNC mill when to turn on the spindle or to which position it should move.     
+
 
 +
In this step you have to generate G-code with the Gerber files. G-code or sometimes called nc-code (numeric controll code) tells the CNC mill when to turn on the spindle or to which position it should move.    <br>
  
 
We will use FlatCam (http://flatcam.org/)  to generate the G-Code.
 
We will use FlatCam (http://flatcam.org/)  to generate the G-Code.
 
[http://flatcam.org/manual/introduction.html The Flatcam manual] <br>
 
[http://flatcam.org/manual/introduction.html The Flatcam manual] <br>
 +
 
* Start FlatCAM
 
* Start FlatCAM
 
* Click on [File] -> [Open Gerber ...]
 
* Click on [File] -> [Open Gerber ...]
Line 26: Line 30:
 
[[File:Selected.png|thumb|center]]
 
[[File:Selected.png|thumb|center]]
 
   
 
   
settings flatcam:
+
'''settings flatcam:'''
 
* cut Z: -0.1 mm
 
* cut Z: -0.1 mm
 
* feedrate: 30 mm (is slow try 90)
 
* feedrate: 30 mm (is slow try 90)
*
+
 
 +
<br>
 
Go to Edit -> Preferences and make sure measurements are set to millimeters.
 
Go to Edit -> Preferences and make sure measurements are set to millimeters.
Make three separate files, traces, holes and contour
+
Make three separate files, traces, holes and contour<br>
  
First for the traces:  
+
'''First for the traces:'''
  
drag in "copperBottom.gbl"
+
* drag in "copperBottom.gbl"
 +
* Double click on the Gerber file
  
Double click on the Gerber file
+
'''Settings for V-bit (big one):'''
  
Settings for V-bit (big one):
+
* Tool dia: -0,7
Tool dia: -0,7
+
* Passes: 1
Passes: 1
 
  
Click "Generate Isolation Geometry"
+
'''Click "Generate Isolation Geometry"'''
  
Settings:
+
'''Settings:'''
Cut Z: -0,05
 
Travel Z: 2
 
End move Z: 5
 
Feedrate X-Y: 120
 
Feedrate Z: 30
 
  
Click on "Generate CNCJob object" and "Save CNC Code"
+
* Cut Z: -0,05
 +
* Travel Z: 2
 +
* End move Z: 5
 +
* Feedrate X-Y: 120
 +
* Feedrate Z: 30
  
Then, for the holes, drag in "drill.txt" and double click on "drill.txt" under Excellon.
+
Click on "Generate CNCJob object" and "Save CNC Code"<br>
  
Settings for 2mm mill bit (DGSHAPE PT 1-20):
+
Then, for the holes, drag in "drill.txt" and double click on "drill.txt" under Excellon.<br>
  
Cut Z: -2
+
'''Settings for 2mm mill bit (DGSHAPE PT 1-20):'''
Travel Z: 2
 
End move Z: 5
 
Feedrate Z: 30
 
  
and underneath
+
* Cut Z: -2
 +
* Travel Z: 2
 +
* End move Z: 5
 +
* Feedrate Z: 30
  
Drill Tool dia: 2
+
and underneath <br>
  
Click Create Drills GCode, lower the size to 2 if you see huge yellow circles (I had this problem) underneath the table and Update Plot. Save CNC Code when you're done.  
+
* Drill Tool dia: 2
 +
 
 +
Click Create Drills GCode, lower the size to 2 if you see huge yellow circles (I had this problem) underneath the table and Update Plot. Save CNC Code when you're done. <br>
  
 
And lastly, for the contours, import the "contour.gm1" and double click it.  
 
And lastly, for the contours, import the "contour.gm1" and double click it.  
Select "Cutout Tool"  
+
Select "Cutout Tool" <br>
  
Object to be cutout: "contour.gm1"
+
Object to be cutout: "contour.gm1"<br>
  
Settings (DGSHAPE PT 1-20):  
+
'''Settings (DGSHAPE PT 1-20):'''
  
Tool Diameter: 2
+
* Tool Diameter: 2  
Cut Z: -1,8
+
* Cut Z: -1,8  
Select Multi-Depth: 0,6
+
* Select Multi-Depth: 0,6  
Margin: 0
+
* Margin: 0  
Gap Size: 2
+
* Gap Size: 2  
Gaps:4 (not necessary if tapes properly, but if you don't mind breaking some tabs it's a safe option)
+
* Gaps:4  
 +
(not necessary if tapes properly, but if you don't mind breaking some tabs it's a safe option)
  
Select "Generate Freeform Geometry"  
+
'''Select "Generate Freeform Geometry"'''
  
Settings:
+
* Settings:
Cut Z: -1,8
+
* Cut Z: -1,8
Multi Depth: 0,6000
+
* Multi Depth: 0,6000
Travel Z: 2
+
* Travel Z: 2
End move Z: 0,5
+
* End move Z: 0,5
Feedrate X-Y: 60
+
* Feedrate X-Y: 60
Feedrate Z: 60
+
* Feedrate Z: 60
  
Select "Generate CNCJob object" and Save CNC Code.
+
'''Select "Generate CNCJob object" and Save CNC Code.'''
  
Go to "4. Milling the PCB"
+
'''Go to "4. Milling the PCB"'''
  
'''Flatcam 8.991''' Overview
+
'''Flatcam 8.991''' Overview <br>
There is a good, concise tutorial for this Flatcam version here [https://www.youtube.com/watch?v=--Cb11heuHc Flatcam single layer pcb tutorial]
+
There is a good, concise tutorial for this Flatcam version here [https://www.youtube.com/watch?v=--Cb11heuHc Flatcam single layer pcb tutorial]<br>
  
[[File:Flatcam overview.png|700px]]
+
[[File:Flatcam overview.png|700px]]<br>
  
 
===3. Using Mods===
 
===3. Using Mods===
Line 112: Line 119:
  
 
[https://fabacademy.org/2021/docs/tutorials/week06_electronic_design/eagle_english_workflow.html how to prep a file in eagle]
 
[https://fabacademy.org/2021/docs/tutorials/week06_electronic_design/eagle_english_workflow.html how to prep a file in eagle]
 +
<br>
 +
 
===4. Milling the PCB===
 
===4. Milling the PCB===
 +
 
[[File:Srm20.png|800px|center]]
 
[[File:Srm20.png|800px|center]]
 
Using the Vpanel software to run the machine <br>
 
Using the Vpanel software to run the machine <br>
  
Whenever you use a new bit, calibrate the Z value for the new bit. You do this by installing the bit and its socket with the wrenches in the box and a Allen wrench. The V-shaped bit is used for milling out the traces and the mill bit for the holes and contours. The V-shaped bit needs the big socket and the mill bit the medium sized one.  
+
Whenever you use a new bit, calibrate the Z value for the new bit. You do this by installing the bit and its socket with the wrenches in the box and a Allen wrench. The V-shaped bit is used for milling out the traces and the mill bit for the holes and contours. The V-shaped bit needs the big socket and the mill bit the medium sized one. <br>
  
You calibrate the bit bit installing it. Going all the way down, as far as you can and undoing the screw inside the socket to loosen up the bit. It will drop down as far as it can. Tighten it again, and press the "Z" button on the right (at Set Origin Point)". You can do the same for X/Y axis if you want the script to start at a specific point.
+
You calibrate the bit bit installing it. Going all the way down, as far as you can and undoing the screw inside the socket to loosen up the bit. It will drop down as far as it can. Tighten it again, and press the "Z" button on the right (at Set Origin Point)". You can do the same for X/Y axis if you want the script to start at a specific point.<br>
  
When the CNC is calibrated, select the "Cut" button on the bottom right and Add your .NC file. Press output to start the Milling. Mill your traces first, then your holes and then the contours for the best stability and do all of these individually so you can switch bits in-between.  
+
When the CNC is calibrated, select the "Cut" button on the bottom right and Add your .NC file. Press output to start the Milling. Mill your traces first, then your holes and then the contours for the best stability and do all of these individually so you can switch bits in-between. <br>
  
Good luck!  
+
Good luck! <br>
  
 
[[File:Vpanel01.png|700px]]
 
[[File:Vpanel01.png|700px]]
Line 131: Line 141:
  
 
As mentioned,  when using Kikad or Eagle it is relatively easy to export each layer as a .svg or .png file, when using Fritzing and having a through-hole component, we will use a slightly more bulky pipeline. In Fritzing it is all very straight forward if you have only surface mount components, but gets complex to export an image file with just holes. <br>
 
As mentioned,  when using Kikad or Eagle it is relatively easy to export each layer as a .svg or .png file, when using Fritzing and having a through-hole component, we will use a slightly more bulky pipeline. In Fritzing it is all very straight forward if you have only surface mount components, but gets complex to export an image file with just holes. <br>
 +
 
Thus we go through a slightly more complex pipeline of two more pieces of software.<br>
 
Thus we go through a slightly more complex pipeline of two more pieces of software.<br>
 +
 
We will export gerber files from Fritzing<br>
 
We will export gerber files from Fritzing<br>
 +
 
[[File:Fritzing export gerbers.png|600px|frameless]] <br>
 
[[File:Fritzing export gerbers.png|600px|frameless]] <br>
 +
 
Then we will use a gerber viewing software (Gerbv [https://gerbv.github.io/]) or gerberlogix (https://www.easylogix.de/products_detail.php?prog_id=1) to view our
 
Then we will use a gerber viewing software (Gerbv [https://gerbv.github.io/]) or gerberlogix (https://www.easylogix.de/products_detail.php?prog_id=1) to view our
 
* bottom copper .gbl file  
 
* bottom copper .gbl file  
 
* our contour .gml file  
 
* our contour .gml file  
 
* our drills .txt file  
 
* our drills .txt file  
 +
 
<br>
 
<br>
 
We will then export each layer we need as separate image files (.png or .svg)<br>
 
We will then export each layer we need as separate image files (.png or .svg)<br>

Revision as of 10:27, 11 April 2024

Warning Warning: Don't mill printed circuit boards made of "glass fiber epoxy resin" (FR4). Small pieces of milled glass fiber should not be inhaled. It may cause health problems.

1. Designing the PCB

There are several ways for designing PCB. For example you can use the following softwares:

Lets start with Fritzing.

All the Fritzing Tutorials
pcb design basic tutorial
Designing a custom shape pcb

Pcb.png

That looks already quite good. After you finished the PCBs you have to export it as a "Extender Gerber (RS-274X)"-Format! Select the folder where you would like to save it.

Gerber.png

2. Generating the G-code

In this step you have to generate G-code with the Gerber files. G-code or sometimes called nc-code (numeric controll code) tells the CNC mill when to turn on the spindle or to which position it should move.

We will use FlatCam (http://flatcam.org/) to generate the G-Code. The Flatcam manual

  • Start FlatCAM
  • Click on [File] -> [Open Gerber ...]
Flatcam.png
  • Select the ".gbl" (copper bottom) file
  • Now select the file in the Project list and click on [selected]
Selected.png

settings flatcam:

  • cut Z: -0.1 mm
  • feedrate: 30 mm (is slow try 90)


Go to Edit -> Preferences and make sure measurements are set to millimeters. Make three separate files, traces, holes and contour

First for the traces:

  • drag in "copperBottom.gbl"
  • Double click on the Gerber file

Settings for V-bit (big one):

  • Tool dia: -0,7
  • Passes: 1

Click "Generate Isolation Geometry"

Settings:

  • Cut Z: -0,05
  • Travel Z: 2
  • End move Z: 5
  • Feedrate X-Y: 120
  • Feedrate Z: 30

Click on "Generate CNCJob object" and "Save CNC Code"

Then, for the holes, drag in "drill.txt" and double click on "drill.txt" under Excellon.

Settings for 2mm mill bit (DGSHAPE PT 1-20):

  • Cut Z: -2
  • Travel Z: 2
  • End move Z: 5
  • Feedrate Z: 30

and underneath

  • Drill Tool dia: 2

Click Create Drills GCode, lower the size to 2 if you see huge yellow circles (I had this problem) underneath the table and Update Plot. Save CNC Code when you're done.

And lastly, for the contours, import the "contour.gm1" and double click it. Select "Cutout Tool"

Object to be cutout: "contour.gm1"

Settings (DGSHAPE PT 1-20):

  • Tool Diameter: 2
  • Cut Z: -1,8
  • Select Multi-Depth: 0,6
  • Margin: 0
  • Gap Size: 2
  • Gaps:4

(not necessary if tapes properly, but if you don't mind breaking some tabs it's a safe option)

Select "Generate Freeform Geometry"

  • Settings:
  • Cut Z: -1,8
  • Multi Depth: 0,6000
  • Travel Z: 2
  • End move Z: 0,5
  • Feedrate X-Y: 60
  • Feedrate Z: 60

Select "Generate CNCJob object" and Save CNC Code.

Go to "4. Milling the PCB"

Flatcam 8.991 Overview
There is a good, concise tutorial for this Flatcam version here Flatcam single layer pcb tutorial

Flatcam overview.png

3. Using Mods

Alternatively we can use Mods (web based software from Fab Academy) to generate paths from .SVG or .PNG files
When using Kikad or Eagle it is relatively easy to export each layer as a .svg or .png file, when using Fritzing and having a through-hole component, we will use a slightly more bulky pipeline.

Mods project is a module based software with a web interface that already has a SRM-20 preset
Here is a good in depth tutorial how to use it but bare in mind that the interface has changed a bit and you may find differences
Here is an even longer tutorial including the finishing and soldering of a board

how to prep a file in eagle

4. Milling the PCB

Srm20.png

Using the Vpanel software to run the machine

Whenever you use a new bit, calibrate the Z value for the new bit. You do this by installing the bit and its socket with the wrenches in the box and a Allen wrench. The V-shaped bit is used for milling out the traces and the mill bit for the holes and contours. The V-shaped bit needs the big socket and the mill bit the medium sized one.

You calibrate the bit bit installing it. Going all the way down, as far as you can and undoing the screw inside the socket to loosen up the bit. It will drop down as far as it can. Tighten it again, and press the "Z" button on the right (at Set Origin Point)". You can do the same for X/Y axis if you want the script to start at a specific point.

When the CNC is calibrated, select the "Cut" button on the bottom right and Add your .NC file. Press output to start the Milling. Mill your traces first, then your holes and then the contours for the best stability and do all of these individually so you can switch bits in-between.

Good luck!

Vpanel01.png

5.Trough-hole pcb with Fritzing for Mods

As mentioned, when using Kikad or Eagle it is relatively easy to export each layer as a .svg or .png file, when using Fritzing and having a through-hole component, we will use a slightly more bulky pipeline. In Fritzing it is all very straight forward if you have only surface mount components, but gets complex to export an image file with just holes.

Thus we go through a slightly more complex pipeline of two more pieces of software.

We will export gerber files from Fritzing

Fritzing export gerbers.png

Then we will use a gerber viewing software (Gerbv [1]) or gerberlogix (https://www.easylogix.de/products_detail.php?prog_id=1) to view our

  • bottom copper .gbl file
  • our contour .gml file
  • our drills .txt file


We will then export each layer we need as separate image files (.png or .svg)

Gerbv

And then last, before we can go to Mods we will use Gimp or Photoshop to convert images to black and white and also do some editing if we have a ground pour. Only then, we will move to Mods.