4.7 KiB
HOWTO make SMT Stencils with LASER
This documents how to make solder paste stencils with a LASER using Inkscape. This is the preferred method over using FlatCAM, for now.
Equipment Used
-
LulzBot TAZ 6.
-
J-Tech Photonics 3.8W LASER.
-
Graytex Papers "Clear Transparencies for Color Laser Printers" (P/N 235-8511). 5 mil (0.127 mm), clear.
This assumes the J-Tech Photonics LASER is set up and the TAZ is flashed with Marlin firmware from here: https://code.forksand.com/forksand/marlin-lulzbot-laser
Software Used
-
Debian.
-
KiCAD.
-
Inkscape.
-
J-Tech Photonics Inkscape Plugin.
KiCAD
This HOWTO assumes you already have a KiCAD file ready. You will need to export the paste layers from KiCAD. This process is for one or two layer boards. You could make stencils for more layers, but that is only useful if you have a process to assemble PCBs with more than two layers.
KiCAD Steps
Do thusly:
-
Open your KiCAD
.pro
file. -
Click on "PCB Layout Editor" icon.
-
File
-->Export
-->SVG...
. -
Output directory
: Where you would like the output file to go. -
Under
Layers:
-
Under
Copper Layers:
Uncheck all. -
Under
Technical Layers:
Include the one layer you want to create a stencil for. Example:F.Paste
for the front solder paste layer orB.Paste
for the back solder paste layer. -
Under
Options:
-
Default Pen Size
:0.05 mm
. XXX confirm. -
Print Mode
:Black and white
. -
SVG Page Size
:Board area only
. -
Print Board Edges
: Unchecked. -
Print mirrored
: Unchecked. -
Pagination
:One file per layer
. -
Under
Output Messages
show debug as you like. You canSave...
the file if you want, but it isn't needed. Useful just for debugging. -
Now that everything is set up, hit the
Export
button. This will export a file to theOutput directory
specified above. -
After
Plot
, hit theClose
button. -
Exit KiCAD:
File
-->Exit
.
Inkscape
In these steps, you take the .svg
file exported from KiCAD,
open it in Inkscape, and use a plugin to export gcode.
Inkscape Initial Setup
The first time you do this process, you need to set up the Inkscape plugins. It is only needed the first time.
-
First you need to download the plugins. It is available from upstream here: https://jtechphotonics.com/Downloads/Inkscape/JTP_Laser_Tool_V2_2%20-%20inkscape%209_2%20version.zip
-
If the above URL is unavailable, there is a mirror in this repo here: https://code.forksand.com/forksand/pcba/src/branch/master/equipment/laser/inkscape/jtech
-
For example, it could be done thusly:
git clone https://code.forksand.com/forksand/pcba
cd pcba/equipment/laser/inkscape/jtech
mkdir ~/.config/inkscape/extensions/
cp -p dxf_input.inx dxf_input.py laser.inx laser.py ~/.config/inkscape/extensions/
Inkscape Steps
Steps to generate gcode from an SVG file. Make sure you have installed the plugin the first time as illustrated in steps above.
-
Launch Inkscape.
-
Open the SVG file exported above by KiCAD.
-
Hit
CTRL-A
toSelect All
. -
Hit
Shift-CTRL-G
toUngroup
. -
Hit
Shift-CTRL-G
toUngroup
a second time. XXX check. -
Select everything with
CTRL-a
. This assumes it is ungrouped. -
Copy with
CTRL-c
orEdit
-->Copy
. -
Create a new file with
CTRL-n
orFile
-->New
. XXX Not sure why this is needed, but it works around erroneous gcode exports. -
Paste contents with
CTRL-v
orEdit
-->Paste
. -
Move selected contents to bottom left corner of document: In the task bar set
X:
to0.000
andY:
to0.000
. -
Hit
4
for a decent zoom. -
With everything still selected above, go to:
Extensions
-->Generate Laser Gcode
-->J Tech Photonics Laser Tool
. -
In the
J Tech Photonics Laser Tool
dialog, set values thusly: -
Laser ON Command
:M106
. -
Laser OFF Command
:M107
. -
Travel Speed (mm/min or in/min)
:1000
. XXX confirm. -
Laser Speed (mm/min or in/min)
:500
. XXX confirm speed for transparencies. -
Laser Power S# (0-255 or 0-12000)
:255
. -
Power-On Delay (ms or s)
:0.0
. -
Passes
:1
. -
Pass Depth (mm or in):
1.0
. -
Directory:
Location you want to export the file. Use.gcode
extension. -
Add numeric suffix to filename
: Unchecked. You can check if you want to do different versions each export. -
All Units (mm or in)
:mm
. -
Live preview
: Unchecked. Optional. -
When it is all set, hit the
Apply
button to generate the gcode. -
Hit the
Close
button. -
The generated gcode should show a bunch of blue arrows and similar, showing what has been generated (only in
Live preview
mode ?). -
Inspect newly created gcode file to make sure the values are sane. Not sane values:
G1 X13004. Y-23242.76
. Sane values:G1 X33.0302 Y20.0467
. -
Hit
Close
button. -
File
-->Quit
.