Introduction to Gerber Standard
The Gerber format, also known as RS-274D, is a widely used standard for describing the printed circuit board (PCB) artwork in the electronics industry. It was developed by the Gerber Systems Corp., a subsidiary of Ucamco, and has become the de facto standard for PCB design files. The Gerber format is used to describe the copper layers, solder mask, legend, and drill data of a PCB design.
What is RS-274D?
RS-274D, or Standard Gerber with separate aperture tables, is a specific version of the Gerber format. It is an ASCII-based format that uses a series of commands to describe the PCB Artwork. The format consists of two main parts: the main file and the aperture file.
- Main File: The main file contains the commands that describe the PCB artwork, such as the coordinates of the traces, pads, and other features.
- Aperture File: The aperture file, also known as the aperture table, defines the shapes and sizes of the apertures used in the main file. An aperture is a shape, such as a circle or rectangle, that is used to create the PCB artwork.
Advantages of Using RS-274D
There are several advantages to using the RS-274D format for PCB design:
- Widely supported: RS-274D is supported by most PCB design software and manufacturing equipment, making it easy to share and manufacture PCB designs.
- Human-readable: The ASCII-based format is human-readable, which makes it easier to debug and modify the PCB artwork if needed.
- Compact: RS-274D files are relatively small compared to other PCB design formats, which makes them easier to store and transfer.
- Reliable: The format has been in use for decades and has proven to be reliable for describing PCB artwork.
RS-274D File Structure
Main File
The main file in RS-274D format consists of a series of commands that describe the PCB artwork. Each command is represented by a letter or a combination of letters, followed by parameters that specify the details of the command. Here are some of the most common commands used in RS-274D:
Command | Description |
---|---|
D01 | Draw a line |
D02 | Move without drawing |
D03 | Flash an aperture |
G01 | Linear interpolation |
G02 | Clockwise circular interpolation |
G03 | Counterclockwise circular interpolation |
G04 | Comment |
M02 | End of file |
Each command is followed by X and Y coordinates that specify the position of the drawing or movement. The coordinates are expressed in integers, with the decimal point omitted. For example, the command “D01X1000Y1500” would draw a line to the coordinate (10.00, 15.00).
Aperture File
The aperture file, or aperture table, defines the shapes and sizes of the apertures used in the main file. Each aperture is identified by a unique code, called the D-code. The D-code is referenced in the main file to specify which aperture to use for a particular drawing command.
The aperture file typically starts with the command “%ADD”, followed by the D-code and the aperture definition. The aperture definition specifies the shape and size of the aperture, using a specific format for each type of aperture.
Here are some common aperture types and their formats:
Aperture Type | Format | Example |
---|---|---|
Circle | C,diameter | %ADD10C,0.5* |
Rectangle | R,width,height | %ADD11R,0.5X0.8* |
Obround | O,width,height | %ADD12O,0.5X0.8* |
Polygon | P,diameter,num_sides,rotation | %ADD13P,0.5X6X0* |
In the above examples, the asterisk (*) at the end of each line indicates the end of the aperture definition.
Creating RS-274D Files
To create an RS-274D file, you’ll need to use PCB design software that supports the format. Most modern PCB design tools, such as Altium Designer, KiCad, and Eagle, can export PCB designs in RS-274D format.
When exporting a PCB design to RS-274D, you’ll typically have the option to specify the following settings:
- Output directory: The directory where the RS-274D files will be saved.
- File name: The name of the main file and aperture file.
- Units: The unit of measurement for the coordinates in the file (e.g., inches or millimeters).
- Precision: The number of decimal places to use for the coordinates.
- Aperture table format: The format of the aperture table (e.g., separate file or embedded in the main file).
Once you’ve specified these settings, the PCB design software will generate the RS-274D files, which can then be sent to a PCB manufacturer for fabrication.
Reading and Interpreting RS-274D Files
Reading and interpreting RS-274D files requires some knowledge of the format and the various commands used. Here are some tips for reading and interpreting RS-274D files:
- Use a text editor: RS-274D files are ASCII-based, so they can be opened and viewed in any text editor.
- Understand the commands: Familiarize yourself with the most common commands used in RS-274D, such as D01, D02, and D03.
- Pay attention to coordinates: The coordinates in RS-274D files specify the position of the drawing or movement commands. Make sure to note the unit of measurement and the precision used.
- Cross-reference with the aperture table: The D-codes used in the main file refer to specific apertures defined in the aperture table. Make sure to cross-reference the D-codes with the aperture definitions to understand the shapes and sizes being used.
- Use a Gerber Viewer: There are many free and paid Gerber viewers available that can display RS-274D files graphically, making it easier to visualize the PCB artwork.
Frequently Asked Questions (FAQ)
-
What is the difference between RS-274D and RS-274X?
RS-274D and RS-274X are both versions of the Gerber format, but RS-274X is a more recent and advanced version. RS-274X includes several enhancements over RS-274D, such as the ability to include the aperture table within the main file, support for custom apertures, and improved coordinate precision. -
Can RS-274D files be used for other types of files besides PCBs?
While RS-274D is primarily used for describing PCB artwork, it can also be used for other types of vector graphics, such as logos or text. However, it is not commonly used for these purposes, as there are other vector graphics formats that are more suitable. -
How do I convert an RS-274D file to another format?
To convert an RS-274D file to another format, you’ll need to use a Gerber file converter. There are many free and paid Gerber file converters available online, such as GerberLogix and CAM350. These tools can convert RS-274D files to other common PCB design formats, such as ODB++ or IPC-2581. -
What is the maximum precision supported by RS-274D?
RS-274D supports a maximum precision of six decimal places for coordinates. However, most PCB manufacturers typically only require a precision of three or four decimal places. -
Can RS-274D files be edited manually?
While it is possible to edit RS-274D files manually in a text editor, it is not recommended. RS-274D files are complex and require a specific format and syntax. Editing them manually can easily introduce errors that may cause problems during PCB Fabrication. It is better to use a PCB design tool to make any necessary changes to the design and then re-export the RS-274D files.
Conclusion
RS-274D, or Standard Gerber with separate aperture tables, is a widely used format for describing PCB artwork in the electronics industry. It consists of a main file that describes the PCB artwork using a series of commands and an aperture file that defines the shapes and sizes of the apertures used in the main file.
RS-274D has several advantages, including wide support, human-readability, compactness, and reliability. Creating RS-274D files typically involves using PCB design software to export the design in the appropriate format, while reading and interpreting RS-274D files requires some knowledge of the format and the various commands used.
While RS-274D has been in use for decades, it has largely been superseded by the more advanced RS-274X format. However, RS-274D remains an important part of the PCB design and fabrication process, and understanding how to create and interpret RS-274D files is an essential skill for anyone working in the electronics industry.
No responses yet