Mind Chasers Inc.

We are giving up mils for board design

Tables and a python script to make life a little easier in converting board designs to all metric (mm)

advertisement:

Overview

We decided to give up on inches / mils for circuit board (PCB) design because it's a hindrance to keep going back and forth between mils and mm. Prior to the switch, we were calculating our design rules, trace widths & gaps, board outline and drill holes in mils and everything else in mm. Hopefully, we're leaving some headaches behind, and we'll use the tables and python script below to help us with the conversion. We'll update this page throughout 2018 to document any issues we encounter in giving up the inch.

Base Conversions:

  • 1 inch = 2.540 cm = 25.40 mm
  • 1 cm = 10 mm
  • 1 mil = 0.001" (one thousandth of an inch)

Chip Scale Discretes

No more 0402's and 0603's, it's now 1005 and 1608. Keep in mind that an 0402 is approximately 40 mils X 20 mils ( 0.04" x 0.02")

inch metric L (mm)* W (mm)*
0402 1005 1.0 0.5
0603 1608 1.55 0.855
0805 2012 2.0 1.25
1206 3216 3.2 1.6
1210 3225 3.2 2.5
* nominal

Typical Finished Board Thickness

mils in mm mm rounded
62 mils 0.062" 1.576 mm 1.6 mm
+/- 10%

Some common mils to mm conversions

mils mm mm rounded
3 0.076 0.075
4 0.102 0.10
5 0.127 0.125
6 0.152 0.15
8 0.203 0.2
12 0.305 0.3
15 0.381 0.4
20 0.508 0.5
30 0.762 0.75
50 1.270 1.25

Other fun facts:

  • 1 oz copper (CU) is one ounce over one square foot, which is 1.37 mil thick, 0.0347 mm (35 µm)

conv.py

Provided below is a simple but handy python3 script for converting back & forth between mils and mm.

##############################################################################
#
# Copyright (c) 2017 Mind Chasers Inc.
# All Rights Reserved.
#
#    file: conv.py
#
#    convert between mm and mil
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

import os, sys

INCH_TO_MM = 25.40

def conv_to_mm(mils):
    """ convert mils to mm """
    return 0.001*INCH_TO_MM*mils

def conv_to_mils(mm):
    """ convert mm to mils """
    return (1000/INCH_TO_MM)*mm

if __name__ == "__main__":
    if len(sys.argv) < 3:
        print ('usage: ' + os.path.basename(sys.argv[0]) + '  ')
        sys.exit()

    value = float(sys.argv[1])
    unit = sys.argv[2]
    
    if unit.startswith('mil'):
        print("%.3f" % conv_to_mm(value)  + ' mm')
    elif unit.startswith('mm'):
        print("%.3f" % conv_to_mils(value) + ' mils')
    else:
        print('unit not supported')

References

We update our site daily with new content related to our open source approach to network security and system design. If you would like to be notified about these changes, then please follow us on Twitter and join our mailing list.

Related articles on this site:

share
mailing list:

Please help us improve this article by adding your comment or question:

For enhanced features and capabilities, please sign in or authenticate using a popular third party

your email address will be kept private
previous month
next month
Su
Mo
Tu
Wd
Th
Fr
Sa
loading