Plotting
Release status: Experimental
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 |
Contents
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 (all of them are available to Linux Ubuntu where the following steps were done/tested):
- 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:
- 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:
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:
- 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:
Hit "TAB" to enter edit mode. Hit "A" to select all vertices. Hit "W" and select "remove doubles" from the menu:
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:
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:
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:
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:
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.
Using cad.py
An alternative tool path generation option cad.py is at http://www.cadsoftusa.com/
- Export traces from Eagle or other circuit board software as an .png image @ 600dpi (Layers - Pads, Vias, Bottom, and Drill Aid). You will probably have to mirror the image with some image software (paint) to plot the bottom layer
- Create tool paths with cad.py
- First chose the png file by clicking the "Input File" button
- Set "in. per unit": 4.06
- Render the image again at this point
- Click "Cam" button
- Click "Output Format" and select file type: ".g(G Codes)"
- Set the following values:
- maximum vector: 0.75
- tool diameter: 0.1666
- tool overlap: 0.309
- contours: -1
- Click "contour" and wait for the paths to be generated. By default the file will be output to the input directory when you click the "save" button
- Run the Mendelize tool http://github.com/metrixcreate/mendelize and the file should be ready for consumption:
mendelize.py -t 1.0 -z 60 -f 1800 ramps1.0mirror.g > ramps1.0mirror.gcode
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.
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
- Staedtler pigment liner of 0.05mm, 0.1mm, 0.2mm, etc can be bought on shops like Staples.
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.