Open Pcb File In Eagle

Eagle contains a built-in text editor that can be used for writing/editing SCRIPT and ULP files, but you can use any text editor that allows you to choose the file extension when saving your file. Eagle script files have a.scr file extension, which can create an issue when using Windows and an external text editor. Opening a Project and Explore EAGLE is packaged with a handful of nifty example PCB designs. Open one up by expanding the 'Projects' tree. From there, under the 'examples' folder open up the 'arduino' project by double-clicking the red folder (or right-clicking and selecting 'Open project').

  1. Open Pcb File Online
  2. Pcb File Open
  3. Open Pcb File In Powerpoint
  4. Open .pcb File In Eagle
  5. Open Pcb File In Eagle Point

A quick guide to using and personalizing Eagle configuration script files to tailor settings to your needs.

Hello, Can Altium files be imported into Eagle Pro? (I am referring to Altium schematics, PCB files and library files) Also, is the import process perfect, and no discrepancies are produced whatsoever?, the imported Altium files, when converted, will not even need checking over? Afaik, Gerbers can't be loaded back into Eagle PCB layout designer. When Gerbers are generated from an Eagle layout (from the BRD file), a lot of information is left out from the Gerbers. There are Gerber Viewer and Gerber Editor programs, which allow to edit Gerber files. They work independent of the software from which a Gerber was generated.

FavoritedFavorite1

Let's talk about Eagle Configuration Scripts: how to use them, and why using your own can make your Eagle experience more enjoyable and efficient.

Let me preface this by saying that there is more I do not know about Autodesk's EAGLE PCB Design Software than there is that I do. That said, this is just a quick explainer, and there will be plenty left unsaid about using Eagle scripts.

If you are new to Eagle or unfamiliar entirely, check out these tutorials to help you get started:

What is a Configuration Script?

Put simply, it's a file used to configure an instance of Eagle with specific settings when opened.

When an instance of an Eagle editor is opened, Eagle accesses a configuration script file (eagle.scr). The configuration script contains a series of commands written in human readable text that change the settings for any instance of an Eagle editor workspace when opened. These include: BOARD Editor, SCHEMATIC Editor, LIBRARY Editor, DEVICE Editor, PACKAGE Editor and SYMBOL Editor. By changing the set of commands within the configuration script, the user can customize the settings of any of the aforementioned Eagle editors without the tedium of having to manually change the settings every time you open up an instance of Eagle.

Perhaps the most valuable feature of a personalized configuration script is the ability to setup a hotkey assignment map and workspace that caters to how you use Eagle. Whether you are designing schematics, designing boards, designing both or just reviewing designs, you can tailor the configuration of Eagle to allow you to work more efficiently.

Eagle is distributed with a default configuration script; it sets some default layers to be used, sets the unit(s) of measure, sets the grid spacing and calls some .ulp files, plus a few more things. Check it out below:

This default Eagle configuration script by no means makes Eagle unusable, but you are stuck with some pretty basic configuration settings. We have a SparkFun Eagle Settings GitHub repository, which includes an Eagle configuration script that provides a good starting point for understanding how these scripts are used, and for personalizing your own.

If you are new to GitHub, below are a couple tutorials explaining what it is, and how it is used:

Below is a simple demo configuration script to use as an example. Let's quickly break down some of the script so that you can get started making or modifying your own!

Anatomy of a Configuration Script

The configuration script is broken into a section for each variation of an Eagle editor, and each type is denoted by an editor-specific label. These labels instruct Eagle to run only the portion of the script that is between the editor type label being opened and the next editor label. This means the user can customize unique configuration settings for each editor type, most importantly hotkeys.

Eagle Editor Script Labels
Editor TypeEditor Label
SchematicSCH:
BoardBRD:
LibraryLBR:
DeviceDEV:
SymbolSYM:
PackagePAC:

The portion of the script that lies above all labels is considered global. These instructions will run for any editor type opened, and will run before the instructions under the editor-specific label are run. Instructions under an editor label will supersede any global instructions that were run prior to the editor label.

To add a comment to your script, insert a pound symbol (#) followed by the text for your comment. Each new line of comments will require a new preceding pound symbol. A comment can live on the same line as a command, assuming it is stated after the command.

Eagle Commands

Eagle utilizes a built-in set of text commands that tell it to do anything from setting a layer's color to setting default wire widths. These commands can be used in place of any of the toolbar buttons, and the command structure and syntax is standardized within Eagle. Conviniently, the commands that can be entered into the command line field of an editor workspace are identical to those that are used to populate an Eagle configuration script.

  • As a side note - To utilize a command in a workspace, simply enter the command into the Eagle command line field with proper syntax and press enter. It should be said that some commands are specific to a certain type of editor, for example, a command specific to the schematic editor may return an error if entered into the command line of a board editor. This is also true of commands in a configuration script.

Lets look at a basic Eagle command used under the BRD: label in the above demo configuration script, and discuss the syntax and function. Checkout the command:

Grid inch 0.05 on;

This command tells Eagle to configure three settings:

  • inch - sets the unit of measure to be used for the grid to inches
  • 0.05 - sets the grid spacing to 0.05 units
  • on - sets the grid to be visible to the user

The command is 'Grid,' and the parameters are: 'inch,' '0.05' and 'on.' The semi-colon ';' tells Eagle that there are no more parameters. Remember, this command lives under the BRD: label, which dictates that this command will only be used when opening an instance of the board editor.

You can easily chain together parameters for one command by listing them separated by a space, and terminating the command by adding the semi-colon at the end. Here's another example:

DISPLAY 1 16 17 18 19;

This tells Eagle to make layers 1, 16, 17, 18 and 19 visible to the user. It's pretty intuitive. Interestingly, one could design an entire schematic with a string of text using Eagle's built-in commands.

Writing and Editing a Configuration Script

Eagle contains a built-in text editor that can be used for writing/editing SCRIPT and ULP files, but you can use any text editor that allows you to choose the file extension when saving your file. Eagle script files have a .scr file extension, which can create an issue when using Windows and an external text editor. Windows views a .scr file as a screensaver file, which means users may have trouble opening this file with a text editor. To fix this, go into the default apps setting menu (WINDOWS 10) or Program settings (WINDOWS 7) and set the default app for .scr files to whichever text editor you prefer.

Another point to take note of is that the configuration script file must be named 'eagle.scr', and must live in the directory that is specified in the Directories: Scripts field.

Setting the Directory for your Configuration Script

To change/set any of the directory paths that Eagle uses to look for files, open up an instance of the Eagle Control panel, click on Options in the menu bar and click once more on Directories... in the drop-down. This will open the directories window, which houses the fields to set the file paths to the directories that contain files that you and Eagle want to use together. The Scripts field is where you set your configuration script file path.

For a detailed list of built-in Eagle commands, command descriptions and command usage examples, check out the Editor Commands section of the Eagle help utility, and for more information about Eagle scripts, check out the SCRIPT sub-section of the the Editor Commands section.

Eagle has a great built in HELP utility; it's an invaluable resource for novice and expert users alike. The HELP utility can be found on the far right of the menu bar on any main Eagle workspace window or the Eagle Control Panel.

Now go create your own Configuration Script!!!

...and be sure to let us know about your experiences using Eagle configuration scripts, plus any of your own tricks and tips, in the comments below.

Overview

Prototyping a circuit board in this way is a good idea so you can be sure that things are working before sending your PCB off to a fabricator. This method is also a good way to do low run or one off testing PCBs.

G-Code is made up of some simple commands that tell a CNC mill how to move so that your designs come out correctly. This is also called a Tool Path. PCB-GCode is an add-on for EAGLE that lets you create a Tool Path in G-Code so that it can be made by a CNC Mill like my Shapeoko 2. Though there are many ways to create G-Code for PCBs, I will focus on EAGLE and PCB-GCode because they are rather easy to use and the software is free for making basic PCBs

Software Used:

  • EAGLE (Freeware version)
  • PCB-GCode (Utility for EAGLE)

EAGLE is free to use for making small PCBs. We will assume that you already have EAGLE installed and that you know how to use it for creating a PCB design. If this is not the case, I recommend checking out any one of the many tutorials that people have made for EAGLE like this one.

Adding PCB-GCode to EAGLE

Once EAGLE is installed, PCB-GCode will have to be added to the User Language Programs list so it can be used.
Note: These instructions are for EAGLE 7.2.0 running in Windows 7, but they should work for other configurations as well.

  1. Open EAGLE.
  2. From the Control Panel window, click Options.
  3. Under Options, click Directories.
  4. Add ;$HOMEeagleexternal_usr-lang-progpcbgcode to the end of what is already in the User Language Programs field. Note: Do not delete any other text unless you know what you are doing or you will loose access to other resources and libraries in EAGLE.
  5. Click on the OK button.
  6. Now click Yes to let the program create a new folder for this directory.
  7. Close EAGLE and open the Documents folder on your computer.
  8. Open the eagle folder.
  9. Open the external_usr-lang-prog folder.
  10. Now place all of the files from the PCB-GCode Zip file into the pcbgcode folder. (See Figure 1)

Setup PCB-GCode

Open pcb file online

Now that PCB-GCode is installed, we need to set up a few things so that it can easily generate G-Code that works with your CNC Mill. The settings I will be recommending are what I found to be the best for the Shapeoko 2, but they should work with any other CNC Mill that uses generic G-Code.

  1. Open your EAGLE file, then click the ULP icon. (See Figure 2)
  2. Navigate to the pcbgcode folder located in Documentseagleexternal_usr-lang-prog.
  3. select the pcb-gcode-setup.ulp file and click Open.
  4. The first time pcb-gcode-setup.ulp is opened, you will be asked to select a default G-Code profile.
  5. I selected generic.pp for my CNC Mill. (See Figure 3)

  6. Click Accept when done.

PCB-GCode is now ready to be used for generating G-code from your design.

Adjusting the Settings

The default settings the PCB-GCode uses may work for many CNC Mills, but I think they are set a little high and I did not have much luck with them. Lowering the feed rate reduces the stress on the carbide milling bits so that they stay sharp and it will make very clean edges around your traces. We also just want to take off the copper layer without going too deep into the broad. Here are the settings I have found to work the best with my Shapeoko 2 using a carbide engraving bit, drills, and a 0.0625 inch end mill.

Generation Options

These are basic settings for what types of Tool Paths you want to create and how detailed they should be.

  • The Top Side and Bottom Side setting will depend on whether you will be making a single or double sided PCB. We will get more into that later.
  • Show preview is always good to have checked so you can see that everything turned out how you expected it to. I like to keep the Width and Height of the preview window at 800 x 600.
  • Generate milling is used for cutting the PCB outline. The one issue that I have with this option is that it cuts all the way through the carrier board using just one pass. This puts a huge amount of stress on the end mill resulting in jagged edges, misalignment, and broken bits unless you go really slow. If you have any other way to cut out the final PCB, I would go with that. I will have more info on other options later in the tutorial. When I do use this option, I set a depth of -0.064 inches or about 0.002 in over the measured thickness of my carrier board. Alternately, you can use this option to draw symbols in the PCB by setting the depth to -0.005 inches.
  • Generate text is used to engrave text onto your PCB. Only text that uses the Vector font and is on Layer 46 Milling will be included in the G-Code. I have this option checked and set to a depth of -0.005 inches.
  • Spot drill holes will make small marks wherever a hole will be drilled after the trace isolation cuts are made. This helps the drill bits get nice and centered when drilling the holes. Do not set the depth for this very high or you will damage your bits. I have this option checked and set to a depth of -0.015 inches.
  • Prefer climb setts the overall direction that the CNC Mill should move in for milling. I do prefer to have my mill do climbing cuts and that is why I have this option checked.
  • Isolation lets you control how the software will outline each of your traces. These settings depend heavily on the tip diameter of the end mill or engraving bit that will be used to outline your traces. We will talk more about this later on.
    • Single pass only dose one outline around your traces. This potion should only be used if you are using a larger diameter end mill or if you are really good at soldering components without getting solder everywhere.
    • Minimum lets you set the smallest amount of space that your end mill or engraving bit can cut. I have this set to 0 inches to ensure that every trace is outlined at least once to isolate it.
    • Maximum sets the maximum spacing that you want cut around each trace. This will determine how many times the CNC mill will outline each trace. I set this option to 0.015 inches to give me just enough room to easily solder things.
    • Step size tells the software how much space your want between isolation passes. If you are using an end mill, this should be about 40% of the tip diameter of your bit. 0.004 in. Engraving bits can use a step size equal to the flat diameter of the bit because it is tapered and that makes the cuts wider as it goes deeper into the carrier board.

Machine

These settings control how fast the CNC Mill will cut, details about your cutting tools, and the units of measurement you wish to use.

  • Z Axis lets you set some standardized milling depths.
    • Z High sets the safe height for the mill to move around without running into anything like your clamps. 0.5 inches is a safe bet for this.
    • Z Up is the safe height for movements from one cut to the next. I set this to 0.1 inches.
    • Z Down sets the cutting depth for the trace isolation. This should be set to go just bellow the copper layer. I use -0.007 inches.
    • Drill Depth should be set to about 0.005 inches below the thickness of your carrier board. So if your carrier board is 0.062 inches, you would set this option to -0.067 inches.
    • Drill Dwell tells the machine how long it should wait before pulling the drill bit back out of a newly drilled hole. About 1 second is good to get a cleanly drilled hole.
  • The Tool Change options don’t work so well, but I put 0 in for Position X and Y and 1 inch for Position Z.
  • Spindle is used to set the time it takes for the spindle to get to full speed once it is turned on. If your CNC Mill dose not automatically turn your spindle or router on and off, don’t worry about this setting.
  • Units tells the software what unit of measurement you want to use for everything. I left it on Inches, but you can use whatever you like best so long as you remember the difference between 0.5 Inches and 0.5 Millimeters.
  • Feed Rates lets you set the optimal speed that your CNC Mill will move while cutting and drilling. This is very important to prevent your bits from braking and getting clean cuts. I have found that it is better to start these settings low if you are not sure what works best, then increase the speed if necessary. The Shapeoko 2 does not handle the stress of high feed rates that well so the following settings should work for any other CNC mill.
    • Etch settings are used for the trace isolation outlines.
      • X Y: 20 in/min
      • Z: 10 in/min
      • Spindle rev/min: 30000
      • Tool Dia.: 0.007 in
    • Drill sets the drilling speed.
      • Z: 20 in/min
      • Spindle rev/min: 30000
    • Mill settings are used for cutting out the PCB when finished. You may remember that I do not recommend using the Milling option unless you have no other way to cut your final PCB down to size. If you need to use this option, go very slow because it will put a lot of stress on your end mill.
      • X Y: 2 in/min (Yes, that is 2 inches per minute and that is still fast for my preference.)
      • Z: 5 in/min
      • Spindle rev/min: 30000
    • Text is basically the same as Etch, so I use the same settings.
      • X Y: 20 in/min
      • Z: 10 in/min
      • Spindle rev/min: 30000
    • Stencil settings can be used to cut out thinner sheets of plastic to use as a mask for solder paste. Though I have not used it, this would probably work well with the same settings as Etch.
      • X Y: 20 in/min
      • Z: 10 in/min
      • Spindle rev/min: 30000
      • Tool Dia.: 0.007 in
    • Click on the ? buttons if you really want to know what the Misc options are, but the are not important for what we are doing.

GCode Options

I have found that PCB-GCode puts some rather long notes into the G-Code that it generates. This results in errors whenever I try and send the G-Code file to my CNC Mill. Un-checking all of the NC File Comments options will fix this issue.

Unfortunately, the G-Code file for drilling still gives me an error due to a long notation at the top of the file. This is easy to fix and we will go over that in the Troubleshooting section.

Under Other Options, I only check the Do tool change with zero step and Use simple drill code options. The Format should be set to N%05d by default.

File Naming can be changed if you really want to, but I would just leave it alone.

Prepping Your EAGLE File

Wire Placement

The spacing between your wires and pads are dependent on how small of a milling bit you are using. If you are using an end mill with a 0.8 mm diameter tip, then all of your wires and pads should have at least 0.8 mm of spacing between them. This gets a little tricky when you are dealing with an engraving bit, because the cut widens as it goes deeper, but I would not worry about it unless you need a fine pitch. I tend to go with a 20° engraving bit with a 0.2 mm tip. Soon I will try to do a 0.4 mm pitch using a 10° engraving bit with a 0.1 mm tip and I will update this tutorial on how that goes.

To ensure that I get everything spaced correctly, I use the Design Rule Check (DRC) to let me know if my traces are to close.

  1. Open your EAGLE file, then click the DRC icon.
  2. Click the Clearance tab.
  3. To ensure that all of your traces get isolated, change all of the values to the diameter of your milling bit. For example; I use an engraving bit that cuts at about 0.3 mm and that means I will change all values to 0.3 mm. (See Figure 4)
  4. Now click the Apply button.
  5. Click the Check button to look of DRC errors.
  6. If you have any errors, they will show in the DRC window.
  7. Double click an error from the list to show you where it occurs in your design.
  8. Fix or Approve your errors before running PCB-GCode to create the tool paths.

G-Code for Single Sided PCBs

Top side or Bottom

There are two ways that you can design your PCB for a single sided board. You can design your traces from the top or from the bottom. Most of this depends on how you want to mount your components. Through-hole components are easier to solder on if you put them on the non copper side so that the pins stick out through the copper. Service mounted components can only be placed on the copper side.

This is where you may have to think a bit about your design. but no matter what you do, always keep your wires set to all Top or all Bottom. Components that use the green drilled Pads or Vias will automatically trace on the Top and Bottom of the PCBs.

So if you are using through-hole components, you may want to do all of your wire connections using Bottom wires. Also be sure that you mirror any text that you want etched as well so that is shows up in the right place.

Creating the G-Code

Open Pcb File In Eagle

Now we are ready to create the G-Code for this PCB.

  1. First, click the ULP icon at the top of your EAGLE file.
  2. Navigate to the pcbgcode folder located in Documentseagleexternal_usr-lang-prog.
  3. select the pcb-gcode-setup.ulp file and click Open.
  4. Check-mark Generate Outlines and Generate drills for the Top or Bottom side depending on how your PCB was designed.
  5. Don’t forget to check-mark the Generate milling, Generate text, and Spot drill holes if those options are used in your design.
  6. When done, click Accept and make my board.
  7. A preview of the trace outline will display.
  8. Type the letter C to see the outlines more clearly.
  9. Inspect the preview to be sure that everything looks good.
    Note: if there are gaps between your outlines, try adding a box to define the outside edges of your PDB.
  10. Type the letter Q to close the window.
  11. Click the OK button on the popup window to see the next preview.

Generate Outlines and Generate drills show up on the same preview. Other options like Generate milling and Generate text will display a preview for the top, then one for the bottom. The G-Code files are saved to the same location as your EAGLE file.

Know your starting point

Open Pcb File Online

The key difference between doing a Top or Bottom PCB is the point of origin. This is the point where the CNC Mill will start at. The point of origin is represented by a small + made of dotted lines. Most programs use a point of origin that is in the bottom left corner. This works out perfect if you designed your PCB with all Top wires. However, the point of origin is moved to the bottom right corner if your PCB was designed with Bottom wires.

The simple way to deal with this change in the point of origin is to start the Bottom wire PCB in the lower right corner of your CNC Mills work aria. Though this will work, if you really need to start in the lower left, there is a way to know how far over you will need to move for the new point of origin.

Open Pcb File In Eagle

If you have Show preview enabled in the Generation Options of PCB-GCode, you will notice something that looks like a red + with a circle on it. This is known as a registration mark. The registration mark shows you where the point of origin is and the two sets of red numbers tells you the exact distance that mark is from point 0.000, 0.000. You may notice that in figure 5, the registration marks are on opposite sides and the numbers are not the same.

So if I were to start our CNC Mill at the bottom left corner, or X 0.000 and Y 0.000, I would use the CNC software to move the X axis to 0.811. One I am there, you can reset that new position as X 0.000 and Y 0.000 by using the Reset Zero button from your CNC Mill software.

We will go over this again in a tutorial about setting your CNC Mill up and running the code.

As for the cutting your PCB free of the larger board, I would create that tool path with a program like VCarve or free software like Easel. Just be sure that everything lines up with your point of origin from your EAGLE file.

G-Code for Double Sided PCBs

Two sided PCBs work out the same way as the single sided boards except that the registration mark is more important so that the top milling lines up perfectly with the bottom. You will want to run all of the G-Code for the Top first, then flip the PCB over to run all of the Bottom G-Code. For this type of board, I would recommend adding a set of holes that can be used to align the board properly when it is turned over. Just be sure that the holes you drill will be in the same place even when the PCB is flipped. I suggest placing these holes on all 4 corners of the PCB.

We will get into more about lining up your PCB in a tutorial about setting your CNC Mill up and running the code.

Troubleshooting G-Code Errors

The most common error that you will encounter has to do with long comments that appear at the beginning of the Drill files.

This error is easy to fix with the help of a text editor.

Pcb File Open

  1. Locate and open the (your file name).top.drill.tap file using a text editor.
  2. The comments are enclosed with parentheses ().
  3. You can remove all of the comments from this file, but the long comment on line 4 is the most likely one to give you trouble.
  4. Save and close the file.
  5. Now open (your file name).bot.drill.tap and repeat the process.

Open Pcb File In Powerpoint

Eagle

All of the other files will run smoothly. However I would suggest, if you understand G-Code, that the following code be added just after the last Z movement.

This will bring the CNC Mill back to your 0, 0 position so you are ready to load the next G-Code file.

Open .pcb File In Eagle

You can also add G21 to the very end to switch back from Inches to MM (the software default)

Open Pcb File In Eagle Point

For more about G-Code, have a look at these resources: