7
\$\begingroup\$

Basically, I'm building a electronics project, where Gerbers are supplied for me to fabricate at a PCB house. However, I want to add my own logo and a few personal touches to the silkscreen before printing.

(BTW, the license for the design allows people to modify it for personal use)

Is it possible to remove or add elements to the silkscreen without the use of expensive Gerber software (which I can't afford)? Also, I've heard that Gerber files are ASCII human readable and small edits can be done directly on a text editor. Is that really doable?

\$\endgroup\$
1
  • \$\begingroup\$ Hmm... has anyone tried this? It can convert a PDF (which I can generate from a SVG, which can be produced from a gerber) to gerber. Messy but looks promising. swannman.github.io/pdf2gerb \$\endgroup\$
    – user25603
    Dec 12 '13 at 22:03
6
\$\begingroup\$

The correct way to modify Gerber files is normally go back to the original CAD files that generated the Gerber files in the first place. Then use that software to modify the design to your requirements and re-generate the outputs. This process does require that you also have access to both the original CAD data files and the use of the CAD program itself.

If the originator did not release the original CAD files this may have been done for proprietary reasons.

So there are a number of other possibilities for you to directly modify the Gerber files. Keep in mind that these procedures are highly discouraged because of the confusion that can occur in environments where both the CAD files in various versions coexist with the Gerber files.

One method is to use a Gerber Editor tool. These are tools that can take in the existing Gerber file data and allow small changes to be made to the gerber design. Typically these tools are extensions of the various free Gerber Viewer tools that you can download off the web (such as ViewMate and GC-Prevu). Unfortunately as you have already found these upgraded tool versions are not free.

The other method is to directly edit the Gerber data files. If you open the Gerber file, for example the SilkScreen layer, in a text editor you will notice that it is a regular text file with a format that you can quickly deduce by inspection. You can add additional lines to this file to make more draw, flash and move commands. If you do this it is very important to make sure to follow the proper syntax and to use one of the free viewers to review the work that you do.

I would discourage this direct edit technique though and propose another approach instead. First study the existing Gerber file format with a viewer. Note the coordinate system origin and figure out an area of coordinates within which you want to add your additional details. Then download and install one of the free PCB layout CAD software packages that are able to produce Gerber output. Two examples of CAD programs that can do this are DesignSpark and Eagle. Then use the program that you select to design the items (logo, texts and lines) that you wish to add. Add them the in the add-on CAD layout at coordinates that match to what you learned from the study of the original Gerber files. Once they are designed, use the free CAD program to plot out Gerber data for the layer(s) that contain the data that you wish to add. Now using a text editor open both this interim add-on Gerber and the original Gerber file. Block copy the new data and paste it on at the end of the original Gerber file. Make sure that the data formats are exactly the same and if not go adjust the plot settings in the free CAD package and replot the add-on Gerber data. Once again test the results of your work with one of the free Gerber viewer tools.

\$\endgroup\$
1
  • \$\begingroup\$ Excellent answer, except for one note: Eagle 8 has direct gerber import option (I'm not sure about earlier versions). It takes a lot of time but it's there. \$\endgroup\$ Sep 30 '17 at 23:27
4
\$\begingroup\$

The Gerber File Format Specification is freely available and it is indeed an ASCII format that could be edited using a text editor. While human readable it's a vector format so everything on the silkscreen will be formed by a large number of line segments. As you already have the Gerber files I'd recommend opening with a text editor and referencing the specification and a print-out of the layer see if you can follow it.

One risk you would run is doing something in a non-standard way that happened to look OK in your Gerber viewer but wouldn't be interpreted properly by the manufacturer. Another thing you could do is ask the PCB fab for a quote on making the changes. Many have reasonable rates for those sorts of changes and it shouldn't take long for someone experienced who has the right tools. Maybe you could just send them a mock-up of the changes made as a regular image and ask what formats they prefer for the logo.

\$\endgroup\$
3
\$\begingroup\$

I have successfully used Cenon (http://www.cenon.info) to open, modify, and rewrite the silkscreen Gerber files for PCB production. Cenon is free and available for Mac OS X, Linux, Free BSD, and other unix-like platforms. Cenon requires Ghostscript to read PDFs (also free software and available from the Cenon site for convenience--if you already have Ghostscript, you don't need to replace it.)

First a caution... I would not recommend doing this for the electrical layers as your edits will not be checked against the design rules and you will break the link between the CAD files and the CAM files used for production. But sometimes you just need to tweak something that can't be edited easily in CAD software. In my case, logotype creation in Eagle is basically not practical. The drawing tools are too rudimentary and purpose-built for PCB layout, not general vector graphics.

Here is the process I use to add my logo to a PCB bottom silk layer Gerber file:

  • Create logo using a vector editor (I used OmniGraffle, but Adobe Illustrator or a free vector tool like Inkscape should also work) and save as a Vector PDF.
  • Open the bottom silk Gerber file (my CAM job names it bottomsilk.ger) into Cenon.
  • Import logo PDF file onto a new layer (there's a selection for that in the import dialog).
  • Select everything on the logo layer and "scale relative" the X-axis by -100% (on the Transform Scale panel). This mirrors the image so it conforms to the way the CAM house will expect it. You may need to lock the bottom silk layer (click the pencil next to the layer in the layers inspector) so you won't select anything on that layer by accident.
  • Drag the logo into desired position or use the Cenon tools to more precisely place your logo. (I used the Transform Align tool to align the right edges of objects on both layers.)
  • You can also add new text or other markup.
  • Save the composite image as "Gerber" file type in the Save As... dialog. (You will likely need to rename it since Cenon always uses ".gerber" as the file extension.) Preserve the original bottomsilk.ger file in case things don't go according to plan.

I hope this is helpful.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for your explanations! Unfortunately my silk layer is afterwards way off... some offset in x and y axis. I also tried to re-center the cross in Cenon. But nothing helps... Any ideas how to solve? \$\endgroup\$
    – salocinx
    Feb 8 '18 at 19:31
  • 1
    \$\begingroup\$ M. Abel solution worked for me, but I wanted to add an update to address @salocinx question, but don't have enough karma to add comment. I had the same problem but was able to resolve by performing "select all" and then manually dragging (move) the entire drawing down to the bottom left corner of Cenon window. After this, everything was lined up correctly. \$\endgroup\$
    – veggiebenz
    Mar 16 '18 at 15:10
3
\$\begingroup\$

For basic editing you can use the open-source tool gerbv. It lets you delete items from a gerber layer as well as merge 2 layers together which is usually enough for most tasks. To delete things from a layer, just select it in gerbv and press the delete key. To add things to a layer:

  • Create a new Gerber file with your favorite tool, for simple things on a silkscreen layer a simple tool like Fritzing does the job
  • Make sure the PCB size matches the original
  • Add you new stuff
  • Save it as Gerber
  • Then go back to gerbv
  • load the new Gerber layer
  • make sure only the orginal and the new layer is visible
  • Go to File -> Export -> RS-274x Merge (Gerber)
  • Export (ignore messages)
  • Load layer back in to check result
\$\endgroup\$
1
\$\begingroup\$

As another answer said, its best to use the original CAD program. For example, Fritzing lets you add logo and text to the silkscreen (human readable artwork.)

If you just want to delete elements, for example from the paste mask layer, a gerber viewer app like gerbv lets you delete elements (but not add elements.) A use case is: you use SMD soldering but don't want solder paste on all lands because you want to hand solder them.

\$\endgroup\$