Skip to content

A Basic Process for PCB milling on the Snapmaker 2.0

License

Notifications You must be signed in to change notification settings

tommy-vaux/Snapmaker_2_PCB_Milling_Process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snapmaker 2.0 PCB Manufacturing Process

Disclaimer

USE THIS PROCESS AT YOUR OWN RISK. It is a process I have developed for my own use, PCB milling on my Snapmaker 2.0 A250 as a beginner at CNC milling with limited experience working in Altium Designer. I am open to any additions or suggestions for improvement of this process, but this process is provided as-is with no guarantee of support, warranty or compatibility with current or future hardware or software revisions. This process worked for me, but there are no guarantees it will work for you.

NOTE: This process was originally developed in 2021 and hasn't been tested on later versions of Luban, FlatCAM or Altium.

Requirements

Required Hardware

  • Snapmaker 2.0 with CNC module & wasteboard. This process may work for other CNC mills too but it has not been tested as such.
  • Snapmaker CNC bits and any bits required for the drilling portion of milling your PCB. In this example we use the Snapmaker V-Bit for isolation routing.

Required Software

  • Snapmaker Luban (tested on version 3.15.1) - sends the gcode to the mill.
  • Altium Designer or EasyEDA (for creating and exporting PCBs) - other software that can generate gerber and excellron files may also work - tested on version 21.0.9
  • FlatCAM (FREE PCB manufacturing software) : http://flatcam.org/ - tested on version 8.994 Beta

Useful Links

  • All of the CNC Gcode used for my project (the cutout, drill and isolation routing) have been included in this project for troubleshooting purposes.
  • The tutorial video by Garage Factory SD which I used to learn the basics of Snapmaker PCB milling. This guide is a combination of what I learned from this video and my own experience: https://www.youtube.com/watch?v=1Ctp3FackBE
  • The Specs of Snapmaker's CNC Bits https://shop.snapmaker.com/products/cnc-bits-5-bits
  • Download FlatCAM: http://flatcam.org/download
  • I would recommend a simple script editor for working with the Gcode, such as Visual Studio Code, Atom or Sublime Text. Not necessary but can make reading the gcode easier.

Part 1: Exporting Altium Designer PCB designs

In order to export a PCB design from altium designer, select the PCB design you would like to export, then go to File -> fabrication outputs -> Gerber X2 Files.

Do the same for NC drill files, using File -> fabrication outputs -> NC Drill files.

This will generate a Camtastic file visually showing the output. The files will be found in the following folder:

Generated -> CAMtastic! Documents

Right clicking on this and selecting Explore will open the location of these exported files in Explorer. Alternatively these can be found in the following folder:

[Project Folder Name]/Project Outputs for [Project Folder Name]

The files from this directory should be opened with FlatCAM.

Example PCB Project

Example PCB Project Image

Part 2: Generating CNC Jobs

Opening Files

  • Open the bottom or top traces Gerber file using File -> Open -> Open Gerber in FlatCAM. The file will have a .gbr file extension.
  • Open your NC Drill file using File -> Open -> Open Excellon in FlatCAM. The file will have a .txt file extension.

Generating Geometry

Make sure for each that only there are only 2 significant bits on all Gcode/CNC commands exported. This can be modified as a setting within FlatCAM. Below are the settings for each type of file to generate the correct CNC Gcode.


Traces

Generate using Isolation Routing in FlatCAM.

Trace geometry should be generated with the following settings if using the Snapmaker V-bit.

Diameter (tip): 0.2mm
Length: 32mm
Angle: 30 degrees

Cut Depth: -0.2mm
Travel-Z: 2
Feedrate X-Y: 120
Feedrate Z: 60
Spindle Speed: 0

End move Z: 15
End move X/Y: None

Drill

Generated using Isolation Routing. Drill parameters used in working final V1 power supply design mill, where a Gerber was used. Use NC drill files instead if possible.

Diameter: 0.4mm

Cut Depth: -1.8mm
Multi-Depth: 0.6mm (ON)
Travel-Z: 2
Feedrate X-Y: 120
Feedrate Z: 60
Spindle Speed: 0

End move Z: 15
End move X/Y: None

UPDATE: In newer versions the "Drilling Tool" can also be used drill files

Cutout

Generate using the Cutout tool in FlatCAM

Diameter: 0.8mm

Cut Depth: -1.8mm
Multi-Depth: 0.6mm (ON)
Travel-Z: 2
Feedrate X-Y: 120
Feedrate Z: 60
Spindle Speed: 0

Part 3: Modifying CNC Gcode ready for use on the Snapmaker 2.0

NOTE: the gcode .cnc files generated by FlatCAM are NOT valid .cnc files for the Snapmaker 2.0 by default, they need to be modified.

Step 1: Remove Auto-Generated Header

Remove everything in the FlatCAM gcode .cnc code up until the command M03. The following MUST BE REMOVED:

(G-CODE GENERATED BY FLATCAM v8.994 - www.flatcam.org - Version Date: 2020/11/7)

(Name: PCB1_Copper_Signal_Top.gbr_iso_combined_cnc)
(Type: G-code from Geometry)
(Units: MM)

(Created on Tuesday, 19 January 2021 at 13:31)


G01 F120.0

M5
G00 Z15.00
G00 X0.00 Y0.00
T1
M6    
(MSG, Change to Tool Dia = 0.4000)
M0
G00 Z15.00

Step 2: Insert Snapmaker 2.0 Header

In place of the auto-generated header, fill in the values in this template and paste it into the top of the generated gcode .cnc file.

NOTE: Determining Min & Max X & Y is IMPORTANT because it is used to enable the Run Boundary feature on the Snapmaker 2.0, a crucial test to ensure the mill will not crash into the mounts.

;Header Start
;header_type: cnc
;renderMethod: line
;file_total_lines: INSERT_TOTAL_LINES_AFTER_PASTING_GCODE
;thumbnail: INSERT FULL ASCII ENCODED .PNG FILE HERE FOR THUMBNAIL ON MACHINE - a generic one can be found in the appendix. NOT REPLACING THIS TEXT WILL CAUSE THE SNAPMAKER TOUCHSCREEN TO CRASH.
;estimated_time(s): [Time in seconds. Insert your guess depending on the complexity of the job here (see appendix for more info). The machine will adjust based on progress through the program anyway.]
;max_x(mm): INSERT_MAX_X
;max_y(mm): INSERT_MAX_Y
;max_z(mm): 0
;min_x(mm): INSERT_MIN_X
;min_y(mm): INSERT_MIN_Y
;min_z(mm): 0
;work_speed(mm/minute): INSERT_WORK_SPEED
;jog_speed(mm/minute): INSERT_JOG_SPEED
;power(%): 0
;Header End

Part 4: Send the data to the Snapmaker and start milling

Open the G-Code file you have just created in Snapmaker Luban. You can do this in the window shown below, in the top right corner of the software.

Insert Image here

Snapmaker Luban will now show you a preview of this G-Code in the main window. Make sure everything looks good, and Note the Location of your Work Origin relative to your milling position, It may NOT be in the centre. Next connect to your snapmaker over WiFi and send this G-Code to it. Open the file on the printer and follow the guided process, and start your milling process!

Make sure to first set your work origin high over your bed, then run the boundary check, making sure the cnc head or bit will not collide with any clamps or other items on your bed. Repeat this process at lower levels until you are 100% sure your head will not collide with anything. Once satisfied, set the work origin at the correct height using the calibration card, then start the milling process.

When Changing a bit, remember to move to work origin first, then set a new work origin in the same X & Y Plane but move it up enough to remove the bit. You can then change the bit, then re-calibrate the work origin with the new bit on the Z-axis. It may also be worth writing down the X & Y values of the work origin before moving it so it remains aligned between drilling steps if the head is moved and the work origin lost.

Output after all 3 stages

Finished Product Photo

Appendix

Choosing Bits

I would recommend being very conservative with milling depths and speed to ensure you do not break your CNC bits. The V-bit is excellent for traces, but I would recommend aquiring drilling bits for the holes and a more accurate square end bit for cutting the board out than the bits included with the Snapmaker or the 5 CNC milling bits Snapmaker sells. As the collet is a standard size any bits that will fit in an ER-11 Collet should work.

Predicting Milling time

Milling a PCB only takes a few minutes, even if you are doing it quite slowly. Doing the traces on a 10cm or so 1-sided board only takes approximately 10 minutes with the V-bit, even at slower speeds. Every stage my milling process took approximately 10 minutes or so, not including swapping out the bits between stages.

Revisions

Version 1.0 - 25/4/21 - initial version
Version 1.1 - 16/5/21 - changed trace specs for isolation routing
Version 2.0 - 16/5/21 - added disclaimer, required hardware and software
Version 3.0 - 5/6/21 - Added sending to Snapmaker, Appendix, example Gcode and Project Start/Finish images. Tested Process.
Version 4.0 - 20/10/23 - Minor changes, improvements based on feedback.