You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pcba/HOWTO/laser-solder-paste-stencil-...

9.9 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.

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.

J-Tech Photonics has some documentation about this process using an ancient printer, Replicator G software (!), and proprietary PCB software. See here:

https://jtechphotonics.com/?p=473

Note, from that blog post:

  • "We will then need to shrink the pads and holes by about 2 mills to allow for the spot size of the laser beam on the stencil material when processing." This step is not being done below. XXX

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 or B.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 can Save... 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 the Output directory specified above.

  • After Plot, hit the Close 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.

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 to Select All.

  • Hit Shift-CTRL-G to Ungroup.

  • Hit Shift-CTRL-G to Ungroup a second time. XXX check.

  • Select everything with CTRL-a. This assumes it is ungrouped.

  • Copy with CTRL-c or Edit --> Copy.

  • Create a new file with CTRL-n or File --> New. XXX Not sure why this is needed, but it works around erroneous gcode exports.

  • Paste contents with CTRL-v or Edit --> Paste.

  • Move selected contents to bottom left corner of document: In the task bar set X: to 0.000 and Y: to 0.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): 600. 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.

LASER

Setup

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

The build plate should be a 6mm thick (XXX check number) aluminium plate on top of the printers' bed. The printers' heatbed and glass should be removed.

Make sure there is very good ventilation.

  • Perhaps add a gcode header/footer to the file.

  • Copy the new .gcode file to SD card. Such as:

sudo mount -o uid=1000 /dev/sdc1 /mnt
mkdir /mnt/awesome/
cp awesome.gcode /mnt/awesome/
sync
sync
sync
sudo umount /mnt
sleep 5 # make sure the SD card has time to write before removing
  • PUT ON PROTECTIVE EYE WEAR!

  • Power off LASER.

  • Disable LASER by removing key.

  • Power off printer.

  • Insert SD card into printer.

  • XXX Tape transparency and paper together? XXX

  • Place the transparency on top of THREE blank sheets of paper. Position the transparency in landscape mode, unless portrait mode is needed. Bottom left of transparency should be in front left corner on printer.

  • Secure the transparency/paper sandwich to the aluminium plate and bed. Use three large paper clips and/or tape.

  • Slowly move toolhead to position where you want the bottom left corner of the stencil to begin (e.g. X=0, Y=0 of the stencil). It is probably best to have a margin of 50mm around the edges (XXX number). Make sure the LASER will be past the paper clips and tape holding the transparency in place.

  • Power on printer.

  • Make sure the Z height of LASER toolhead is good with jig. Jig should be 40mm tall (XXX check number). It is presumed the LASER has good focus at the toolhead jig height.

  • If Z height needs adjustment, in printer LCD, go to Z movement and move to the correct height. (XXX menu sequence).

  • BE SURE TO PUT ON PROTECTIVE EYE WEAR!

  • Turn key on LASER to enable.

  • Power on the LASER via the power switch.

  • If fan on the LASER PCB doesn't start, press RESET button on PCB.

  • NOTE, LASER WILL TURN ON IN NEXT STEP!

  • In printer LCD, go to print from SD card, and print the gcode file generated above.

  • Time to cut depends greatly on board complexity, but in general it's less than 30 minutes.

  • Power off LASER.

  • Disable LASER by removing key.

  • Power off printer.

  • Remove paper clips.

  • Remove stencil.

  • Compare stencil to PCB.

Issues

In general the process works, but not perfect yet.

  • Fine details got burnt/melted away.

  • In general, too much burn marks.

Brainstorms

Things to do/consider:

  • Develop test gcode with lines/boxes, squares etc. at different speeds and passes that creates a test sample sheet.

  • Test running feedrate faster.

  • Test running feedrate faster, with two or more passes.

  • Increasing feedrate may not matter if in details it has to go far slower any way due to acceleration curves.

  • Test with laser at lower power setting.

  • Test with laser at lower power setting and multiple passes.

  • Engrave text on sheet saying what is what.

  • Find good gcode renderer.

  • Different transparency material.

  • Different transparency thickness.

  • Different lower layer (e.g. not paper).

  • Shrink pads in KiCAD before export.

  • Cut two pieces of mylar at same time.

  • Use 7 mil mylar.

  • Pololu's stencils: "Our stencils are made from 3-mil or 4-mil mylar with a low-power CO2 laser. The finest pitch we can handle is approximately 0.5 mm, and we strongly recommend that fine-pitch stencils be cut from the 3-mil mylar."

  • Use raster instead of vector processing of gcode. Using raster will cut/burn away the whole section, instead of leaving dangling rectangles. This would entail using raster2gcode instead of the J-Tech Inkscape plugin.

  • Use 2-4 mil Kapton film instead of mylar. Sample: McMaster P/N 2271K2.

  • Use paper instead of mylar.

  • "The secret to cutting mylar stencils is to stack two 7mil sheets together and cut them at the same time! Unlike Kapton stencils, the Mylar will melt if exposed to large amounts of heat." juanjchong.com

  • Use finer focus lens on LASER.

  • Blogger with good results used this mylar: 3M PP2200 mylar transparency film. Same blogger came up with aluminium soda pop can stencil technique here: https://lowpowerlab.com/2013/02/11/diy-smd-metal-stencils-the-definitive-tutorial/

  • Post-processing, scrape off melted protrusions with razor blade.

  • Hackaday comments: "Covering both sides of the Mylar with masking tape and getting the power/speed right means I can get perfectly usable stencils." "I just use thin cardboard. then spray it with clear varnish. No melting there."

References

Various sources of info.