Olimex advice - adjusting drill sizes

Update: 18th June 2009

I don't think I can recommend olimex any longer. Please see the main page for more information.


Here's a procedure you can use for adjusting your drill sizes in an existing design done using 'Eagle' - I use it to make the drills 0.1mm bigger as Olimex require the drill sizes you give to be before plating, whereas the standard Eagle libraries give the sizes required after plating.

  1. Open eagle and load your design
  2. Go to the schematic view (important: this won't work if you do it from the board view)
  3. Select 'File' -> 'Run'
  4. Select the 'exp-project-lbr.ulp' from c:\Program Files\EAGLE-4.15\ulp\.
  5. Click 'open'
  6. Ensure 'multiple libraries' is selected
  7. Click 'Collect data' (takes a little while to run)
  8. When 'Collect finish' appears, you will have a <your-filename>.scr in c:\Program Files\EAGLE-4.15\ulp\project\<your-project>.
  9. The file contains a script to recreate the eagle libraries - included a lot of lines that look like 'Change Drill 1016.000000;' - this means a 10mm drill, and you can now go through this file and change the drills.

    I use a perl script:

    #!/usr/bin/perl -w
    
    while (<>)
    {
        if (/^Change Drill (.*);/)
        {
            my $origdrill = $1;
            my $drill;
            
            $drill = int(($origdrill + 50)/100)*100 + 100;
            # special case - use 3.3mm where we'd use a 3.4mm
            $drill = 3300 if ($drill == 3400);
            $drill = "$drill.000000";
            # print STDERR "Drill $origdrill $drill\n";
            s/\Q$origdrill\E/$drill/
        }
        print;
    }
    

    The above script will output a file with the drill sizes all changes to be 0.1mm bigger, except for any 3.3mm drills which will be left alone.

  10. Now go back to eagle select 'File' -> 'Script', select the script file you just changed and click 'Open'
  11. The script will now create new lbr files using your new drill sizes.
  12. Now go to the Eagle control panel
  13. Select 'Options' -> 'Directories'
  14. Change the 'Libraries' directory to be your project directory, which is where the new .lbr files have been created.
  15. Go to the board view
  16. Select 'Library' -> 'Update all'.
  17. After a short delay, you should get a message advising you that the board has changed and you should rerun the DRC.
  18. Rerun the DRC and check your board.

[Olimex advice home]

Joseph Heenan, joseph@heenan.me.uk