Plotting

From RepRap
Revision as of 13:52, 24 July 2010 by Casainho (talk | contribs) (Added images and info about the steps needed to Gerber -> 3D mesh STL.)
Jump to: navigation, search
Crystal Clear action run.png
Plotting

Release status: Experimental

Plotting-emc2.png
Description
Plotting drawings on flat surfaces with RepRap, like plotting on paper or printed circuit boards.
License
unknown
Author
Contributors
Based-on
Categories
CAD Models
External Link


Introduction

By plotting using one RepRap 3D printer like Mendel, one can draw designs on a flat material like paper or copper printed circuit boards (PCB). By plotting on copper, RepRap empower us to make our own PCBs.

<videoflash type="vimeo">13521005|640|480</videoflash>

What is needed

  • draw the electronic schematic and after the PCB on any program like KiCad. Export the Gerber files;
  • use a software to convert the Gerber files to GCode files that RepRap understands (see next topics), in this case for plotting;
  • install one pen on RepRap pen holder (see next topics) and start plotting.

Software tools

There are a few approaches (1, 2, 3) but Skeinforge seems to be the most advanced tool to generate the plot paths.

Using Skeinforge

Skeinforge don't open Gerber files, but open the 3D STL files. If we create a 3D object from the Gerber files and export to STL file, we will be able to use Skeinforge.

To create a 3D object from Gerber file, we need the following Free Software tools:

  • Gerbv - to view Gerber file and export as PNG file
  • Inkscape - to import PNG file, create paths and export as SVG file
  • Blender - to import SVG file, create 3D mesh and export STL file
  • Skeinforge - to open the STL file, generate the plot paths, simulate the plotting and export GCode file
  • EMC2 (optional) - to open the GCode file and simulate the plotting
  • RepRap host, RepSnapper, etc - programs to open the GCode file and controlling your RepRap, doing the plotting.

Next are the steps needed to use generate plotting paths from Gerber files.

  • Gerber to SVG -- Export the gerber file as SVG using Gerbv:

Plotting-gerbv.png

  • SVG to PNG -- Import the SVG file using Inkscape, finally export to PNG file with 600DPI.
  • PNG to SVG paths -- Import the PNG file with Inkscape. Select the image and hit "SHIFT + ALT + B" to execute the Trace bitmap. De-select Smooth box and click on update button and finally on ok:

Plotting-inkscape trace bitmap.png

Delete the PNG you imported before and leave just the paths. Select all the paths with paths tool (F2). Hit (CTRL + '+') for union all the paths. Finally export as SVG:

Plotting-exporting paths svg.png

  • SVG paths to 3D mesh STL -- Import the SVG file with Blender. Zoom to see what was imported, should be small. Hit "ALT + C" to convert curves to mesh:

Plotting-curves to mesh.png

Hit "TAB" to enter edit mode. Hit "A" to select all vertices. Hit "W" and select "remove doubles" from the menu:

Plotting-remove doubles.png

Now let's extrude on Z axis by one unit. Hit "A" until all vertices are selected. Hit "E" to start extruding and "Z" to constrain on Z axis, finally hit "1" to extrude by one unit:

Plotting-extrude 01.png

Plotting-extrude 02.png

Now you should have a non-manifold mesh! You can verify by hiting "A" until all vertices are un-selected, then go to Select menu and choose Non-manifold - Blender will highlight any non-manifold vertice.

Now hit "N" and verify that the measures of X and Y are incorrect. We need to change them to the correct values. I verified on KiCad the X and Y values and just apply them on Transform properties menu:

Plotting-scale x y.png

Hit "TAB" to leave edit mode and now you have a correct size 3D object that should be almost equal from your initial gerber file:

Plotting-blender.png

Now export to STL file.

  • STL to GCode -- With Skeinforge open the STL file and start the convertion to GCode. You can use some extruding profile and tweak it to get the best results.
  • Simulation using EMC2 (optional) -- Although Skeinforge also do simulation, EMC2 can help you see in real time the plotting path. It's important to simulate at least until you get a correct tweaked profile for plotting.

EMC2 can be builded on recent Linux Ubuntu versions on simulator mode - see this page.

When you load the GCode, EMC2 may give errors because of custom M codes from RepRap, just make a copy of the GCode file, remove with a text editor the M codes and open again the file. Here the simulation happening:

Plotting-emc2.png

If you are happy with the final GCode file, then you may go ahead and load it with your RepRap software of choice like RepRap host, RepSnapper, etc.

Pen

Permanent ink pens

Fine-Tip Red Color Staedtler Lumocolor Permanent Marker 318-2

The Fine-Tip Red Color Staedtler Lumocolor Permanent Marker 318-2 is the best for this purpose.

Fine-Tip Red Color Staedtler Lumocolor Permanent Marker 318-2.

One pen that works well on most etchants is the staedtler lumocolor permanent marker. The red color is best (the ink is also used in the marker for chemical lab glassware).

It only resists strong etchants without fail if the pen is fairly fresh, so it may be best to get the refill station so you always have a "new" pen at low cost. - via Homebrew_PCBs

Pigment ink pens

This pigment ink should resist to the etchant just like the people that are printing PCBs with Epson printers which have his DureBrite pigment ink that resists to etch acid.

Workflow:

  • plot the design on PCB;
  • put PCB on oven for a few minutes to dry the ink very well;
  • etch the PCB.

Pen holder

See Category:Toolheads.

For developers

If you are looking on information to know and understand about RS274X (Gerber) files, see this page.