Difference between revisions of "Using the CNC mill"
Line 24: | Line 24: | ||
* Start FlatCAM | * Start FlatCAM | ||
+ | * Go to Edit -> Preferences and make sure measurements are set to millimeters. | ||
* Click on [File] -> [Open Gerber ...] | * Click on [File] -> [Open Gerber ...] | ||
[[File:Flatcam.png|thumb|center]] | [[File:Flatcam.png|thumb|center]] | ||
Line 29: | Line 30: | ||
* Now select the file in the Project list and click on [selected] | * Now select the file in the Project list and click on [selected] | ||
[[File:Selected.png|thumb|center]] | [[File:Selected.png|thumb|center]] | ||
− | |||
− | |||
− | |||
− | |||
− | + | To mill a circuit board, we will need to make three separate files, the traces, the holes and the contour. | |
− | + | ||
− | + | <b>TRACES</b> | |
'''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 to go to the Selected tab. |
− | + | Set the Tool Settings to: | |
− | * Tool dia: | + | * Tool dia: 0,5000 |
− | * Passes: 1 | + | * #Passes : 1 |
+ | * Passes overlap: 0,00000% | ||
− | + | and Click "Generate Isolation Geometry" | |
− | + | Here we will set the millings settings. | |
− | * Cut Z: -0 | + | Under Parameters for Tool 1 |
− | * Travel Z: 2 | + | * Cut Z: <b>-0.0800</b> |
− | * End move Z: | + | * Uncheck Multi-Depth (default) |
− | * Feedrate X-Y: 120 | + | * Travel-Z: 2,0000 (default) |
− | * Feedrate Z: | + | * Uncheck Tool Change (default) |
+ | * End-move Z: <b>50,0000</b> | ||
+ | * Feedrate X-Y: 120,0000 (default) | ||
+ | * Feedrate Z: 60,0000 (default) | ||
+ | * Spindle speed: 0 (default) | ||
Click on "Generate CNCJob object" and "Save CNC Code"<br> | Click on "Generate CNCJob object" and "Save CNC Code"<br> | ||
− | + | <HOLES> | |
+ | |||
+ | To drill out the holes, we'll need to import your drill.txt file. Go to Files > Open > Open Excellon and navigate to your drill.txt file. | ||
+ | |||
+ | Go to Project and double click the "drill.txt" under Excellon. | ||
+ | |||
+ | The settings for the drill bit are: | ||
− | + | * Cut Z: -2,0000 (default) | |
+ | * Travel Z: 2,0000 (default) | ||
+ | * Uncheck Tool Change (default) | ||
+ | * End move Z: <b>50,0000</b> | ||
+ | * Feedrate Z: 30,0000 (default) | ||
− | + | Click "Create Drills GCode" | |
− | |||
− | |||
− | |||
− | and | + | If you see huge yellow circles |
+ | , lower the size to 1 if you see huge yellow circles underneath the "CNC Tools Table" and click "Update Plot". | ||
− | + | Scroll down and click "Save CNC Code". <br> | |
− | + | <b>CONTOURS</b> | |
+ | |||
+ | Lastly we want to mill out the shape of the PCB. | ||
+ | |||
+ | Go to File > Open > Open Gerber and navigate to "countour.gm1" | ||
+ | |||
+ | Open the file and double click it to go to the "Selected" tab. | ||
− | |||
Select "Cutout Tool" <br> | Select "Cutout Tool" <br> | ||
Object to be cutout: "contour.gm1"<br> | Object to be cutout: "contour.gm1"<br> | ||
+ | Object kind: Single (default) | ||
− | + | * Tool Diameter: 1 | |
+ | * Cut Z: -1,8 (default) | ||
+ | * Check Multi-Depth: 0,6 (default) | ||
+ | * Margin: 0 (default) | ||
+ | * Gap Size: 2 | ||
+ | * Gaps:4 (default) | ||
+ | (not necessary if your circuit board is taped to the sacrificial layer properly, but if you don't mind breaking some tabs it's a safe option) | ||
− | + | Now select "Generate Freeform Geometry" | |
− | + | Tools Table: | |
− | + | ||
− | + | <b>1,0000</b> | C1 | |
− | + | ||
− | + | Parameters for Tool 1: | |
− | |||
− | + | * Cut Z: -1,8 (default) | |
+ | * Multi Depth: 0,6000 (default) | ||
+ | * Travel Z: 2,0000 | ||
+ | * End move Z: <b>50,0000</b> | ||
+ | * Feedrate X-Y: <b>120,0000</b> | ||
+ | * Feedrate Z: <b>60,0000</b> | ||
+ | * Spindle speed: 0 (default) | ||
+ | * Uncheck Dwell (default) | ||
+ | * Postprocessor: default (default) | ||
− | + | Now select "Generate CNCJob object" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | and click "Save CNC Code". | |
'''Go to "4. Milling the PCB"''' | '''Go to "4. Milling the PCB"''' |
Revision as of 13:04, 1 July 2024
1. Designing the PCB
There are several ways for designing PCB. For example you can use the following softwares:
- Fritzing (easy to use) https://fritzing.org/
- Kicad (more professional) https://www.kicad.org/
Lets start with Fritzing.
All the Fritzing Tutorials
pcb design basic tutorial
Designing a custom shape pcb
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.
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
- Go to Edit -> Preferences and make sure measurements are set to millimeters.
- Click on [File] -> [Open Gerber ...]
- Select the ".gbl" (copper bottom) file
- Now select the file in the Project list and click on [selected]
To mill a circuit board, we will need to make three separate files, the traces, the holes and the contour.
TRACES
First for the traces:
- drag in "copperBottom.gbl"
- Double click on the Gerber file to go to the Selected tab.
Set the Tool Settings to:
- Tool dia: 0,5000
- #Passes : 1
- Passes overlap: 0,00000%
and Click "Generate Isolation Geometry"
Here we will set the millings settings.
Under Parameters for Tool 1
- Cut Z: -0.0800
- Uncheck Multi-Depth (default)
- Travel-Z: 2,0000 (default)
- Uncheck Tool Change (default)
- End-move Z: 50,0000
- Feedrate X-Y: 120,0000 (default)
- Feedrate Z: 60,0000 (default)
- Spindle speed: 0 (default)
Click on "Generate CNCJob object" and "Save CNC Code"
<HOLES>
To drill out the holes, we'll need to import your drill.txt file. Go to Files > Open > Open Excellon and navigate to your drill.txt file.
Go to Project and double click the "drill.txt" under Excellon.
The settings for the drill bit are:
- Cut Z: -2,0000 (default)
- Travel Z: 2,0000 (default)
- Uncheck Tool Change (default)
- End move Z: 50,0000
- Feedrate Z: 30,0000 (default)
Click "Create Drills GCode"
If you see huge yellow circles , lower the size to 1 if you see huge yellow circles underneath the "CNC Tools Table" and click "Update Plot".
Scroll down and click "Save CNC Code".
CONTOURS
Lastly we want to mill out the shape of the PCB.
Go to File > Open > Open Gerber and navigate to "countour.gm1"
Open the file and double click it to go to the "Selected" tab.
Select "Cutout Tool"
Object to be cutout: "contour.gm1"
Object kind: Single (default)
- Tool Diameter: 1
- Cut Z: -1,8 (default)
- Check Multi-Depth: 0,6 (default)
- Margin: 0 (default)
- Gap Size: 2
- Gaps:4 (default)
(not necessary if your circuit board is taped to the sacrificial layer properly, but if you don't mind breaking some tabs it's a safe option)
Now select "Generate Freeform Geometry"
Tools Table:
1,0000 | C1
Parameters for Tool 1:
- Cut Z: -1,8 (default)
- Multi Depth: 0,6000 (default)
- Travel Z: 2,0000
- End move Z: 50,0000
- Feedrate X-Y: 120,0000
- Feedrate Z: 60,0000
- Spindle speed: 0 (default)
- Uncheck Dwell (default)
- Postprocessor: default (default)
Now select "Generate CNCJob object"
and click "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
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
4. Milling the PCB
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!
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
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)
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.