Main Content

stackUp

Create PCB stackup definition

Since R2021b

Description

Use the stackUp object to create a printed circuit board (PCB) stackup definition to import Gerber files. A Gerber file is a set of manufacturing files used to describe a PCB. A Gerber file uses an ASCII vector format for 2-D binary images.

Creation

Description

s = stackUp creates a default PCB stackup object with five layers. Specify Gerber files as inputs to the second and fourth layers. Specify dielectric material objects as inputs to layers one, three, and five.

example

Properties

expand all

This property is read-only.

Number of layers in the stackup, returned as a positive scalar.

First layer in the stackup definition object, specified as a dielectric object.

Example: s = stackUp; d = dielectric('RO4725JXR'); s.Layer1 = d;

Second layer in the stackup definition object, specified as a character vector or string. The file should be saved as a GTL, GBL, or GBR file.

Example: s = stackUp; s.Layer2 = 'antenna_design_file.gtl';

Note

The Gerber file must be imported to the MATLAB® workspace before setting this property.

Third layer in the stackup definition object, specified as a dielectric object.

Example: s = stackUp; d = dielectric('RO4725JXR'); s.Layer3 = d;

Fourth layer in the stackup definition object, specified as a character vector or string. The file should be saved as a GTL, GBL, or GBR file.

Example: s = stackUp; s.Layer4 = 'antenna_design_file.gbl';

Note

The Gerber file must be imported to the MATLAB workspace before setting this property.

Fifth layer in the stackup definition object, specified as a dielectric object.

Example: s = stackUp; d = dielectric('RO4725JXR'); s.Layer5 = d;

Examples

collapse all

Create a PCB stack up definition object using default properties.

S = stackUp;

Set the thickness of the dielectric Air in layer 1 to 0.1 mm.

S.Layer1.Thickness = 0.1e-3;

Import a top layer Gerber file to layer 2.

S.Layer2 = 'interdigital_Capacitor.gtl';

Create a PCBReader object using the stackUp object, S.

p = PCBReader('StackUp',S);

To update the Gerber file, convert the PCBReader object to a pcbComponent object.

pcbcapacitor = pcbComponent(p);
pcbcapacitor.FeedDiameter = 0.001
pcbcapacitor = 
  pcbComponent with properties:

              Name: 'interdigital_Capacitor'
          Revision: 'v1.0'
        BoardShape: [1x1 antenna.Rectangle]
    BoardThickness: 0.0061
            Layers: {[1x1 dielectric]  [1x1 antenna.Polygon]  [1x1 dielectric]  [1x1 dielectric]}
     FeedLocations: [0 0 2]
      FeedDiameter: 1.0000e-03
      ViaLocations: []
       ViaDiameter: []
      FeedViaModel: 'square'
         Conductor: [1x1 metal]
              Tilt: 0
          TiltAxis: [0 0 1]
              Load: [1x1 lumpedElement]
        SolverType: 'MoM'
        IsShielded: 0

View the PCB component in the Gerber file.

show(pcbcapacitor)

Figure contains an axes object. The axes object with title pcbComponent element, xlabel x (mm), ylabel y (mm) contains 6 objects of type patch, surface. These objects represent PEC, feed, FR4.

Version History

Introduced in R2021b