Author Topic: Inches, mils, or millimeters?  (Read 1841 times)

0 Members and 1 Guest are viewing this topic.

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1554
  • Country: us
Inches, mils, or millimeters?
« on: March 21, 2022, 12:55:44 am »
Almost all PCB and schematic capture programs allow you to set units to inches, mils, or millimeters. Which one is the best choice nowadays?

I’m in the US, where we routinely use Imperial units, but I’m fully conversant in metric as well. A lot of components are laid out on 0.1” (100 mil) centers, so common grid sizes are 100mils, 50mils, etc., which results in grids like 2.54mm and 1.27mm in metric.

I think I prefer mils. Are there any drawbacks in 2022 to using mils instead of mm?
Complexity is the number-one enemy of high-quality code.
 

Offline KaneTW

  • Frequent Contributor
  • **
  • Posts: 703
  • Country: de
Re: Inches, mils, or millimeters?
« Reply #1 on: March 21, 2022, 01:00:46 am »
I use mm for layout, mils for schematics. Latter primarily because of Altium idiosyncrasies.
 
The following users thanked this post: jusaca

Offline Feynman

  • Regular Contributor
  • *
  • Posts: 163
  • Country: ch
Re: Inches, mils, or millimeters?
« Reply #2 on: March 21, 2022, 09:26:32 pm »
Metric all the way for layout. Imperial in schematics for historic reasons. But since this is convention only and thus has no fabrication implications the units in schematics really don't matter too much.
« Last Edit: March 21, 2022, 09:31:04 pm by Feynman »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 11655
  • Country: de
Re: Inches, mils, or millimeters?
« Reply #3 on: March 21, 2022, 09:31:16 pm »
One more point for metric:
One can express 100 mil as 2.54 mm exact, but 1 mm = 39.3700787 mil. So chances for rounding errors are higher.
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 2160
  • Country: us
Re: Inches, mils, or millimeters?
« Reply #4 on: March 21, 2022, 10:18:36 pm »
I use mils for layouts, both for schematic and PCB.  Many board houses (maybe all) convert drill diameters to metric.  A typical drill will bore a hole to something like ±0.001" to 0.002" (0.002" ≈ 0.05 mm). As Eagle (and probably most others) convert to 6 decimal places, whether one uses mils or metric really doesn't matter in practice; although, the displayed values may seem strange.  Metric drills are probably used by the board houses, and I would defy anyone to measure a whole in FR4 after plating and tell me whether it was drilled by equally precise metric or roughly equivalent imperial drills or visa versa.

In other words, use what you're used to and make your component footprints to match.  For manufacturer recommended footprints, you will usually see them in both metric and imperial units.  If you actually calculate them, you will see there is rounding.  A potential problem may occur when routing both metric and imperial components on the same PCB.  Many years ago, EAGLE would recognize an intended connection but consider it an overlap.  It fixed that problem.  More recent editions automatically snap to the center of a pad if you are anywhere near close.  I think that change occurred on or before version 6.0.  (Sorry, I don't remember when.)

As a practical matter, I keep a function key (F5) assigned to swap from imperial to metric grid with a single keystroke.  The alternate grid, which is usually finer but doesn't need to be, is fine enough such that swapping back and forth makes no discernable difference nor does it result in DRG errors.
 

Offline aduinstat

  • Contributor
  • Posts: 11
  • Country: us
Re: Inches, mils, or millimeters?
« Reply #5 on: May 04, 2022, 10:39:14 pm »
I like metric more. The IC footprints are nearly all in mm anyway (except for the occasional oddball American part).
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1521
  • Country: gb
Re: Inches, mils, or millimeters?
« Reply #6 on: May 05, 2022, 06:18:10 pm »
I do a lot of work needing clearance and creepage to meet safety requirements. These tend to be specified in metric so metric layout is the I go.

I used to think it didn't matter, but I had a layout engineer who did the conversion and rounded the results incorrectly. We had to re-spin the board due to rounding errors :(
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 2317
  • Country: nl
Re: Inches, mils, or millimeters?
« Reply #7 on: May 06, 2022, 12:56:00 am »
I prefer to put all THT parts on a 2.54mm grid on the PCB because it's compatible with matrix board and the pitch of common connectors such as IDC. Such a coarse grid also makes it easy to line up such parts which makes the PCB looks neater.

For all the rest I use rounded metric units in whole millimeters wherever possible.

I do have a design where I want to stay compatible with ad-hoc replacement boards in matrix format and in that project I have also placed the mounting holes on the same 2.54mm grid, so you can easily use the existing holes in the matrix board as a starter for an M3 mounting bolt. But I'm an European and this is a clear exception.

Some time ago I was experimenting a bit with the altium importer in KiCad, and I noticed some weird off-center behavior of a big 0.5mm pitch STM32 (It was one of the Nucleo boards, files came from the ST website). I'm not sure what was going on, but my best guess is that altium is simply not capable of a higher resolution than 0.0254mm, (which some probably call a "mill" ) and this is close to 5% of the pin pitch and is very noticeable. Or maybe altium has a special "high resolution mode" that can be set wrong. KiCad uses 32 bit integer nanometers as it's internal units and that should be plenty for any PCB project and even small enough that rounding errors don't matter. (Gerber output is usually in a lower resolution).

Maybe you can join:
https://usma.org

They've been lobbying for the Metric system for only a short 106 years (and counting).


 

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 545
  • Country: ca
Re: Inches, mils, or millimeters?
« Reply #8 on: May 09, 2022, 05:51:01 am »
I use mm and round as much as possible.  Specially with dimensions that will be used elsewhere for example mounting holes. I put extra effort into rounding those so it's a bit easier for mechanical design.

If I use thousands of an inch, I call them thous.  Mils sounds like an abreviation for millimeters.
 

Offline tepalia02

  • Regular Contributor
  • *
  • Posts: 102
  • Country: bd
Re: Inches, mils, or millimeters?
« Reply #9 on: May 11, 2022, 01:38:57 pm »
I used proteus and I preferred th. There are many other challenges faced by PCB designers. It’s never a simple errand to design a circuit board. The relationship between layers, parts, or hardware, must be appropriately managed. I think this is a good write-up for PCB designers.

https://pcbtracks.com/challenges-faced-during-pcb-designing/
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8439
  • Country: us
    • SiliconValleyGarage
Re: Inches, mils, or millimeters?
« Reply #10 on: May 11, 2022, 01:45:29 pm »
when making a footprint : switch to the units used making the part. a dip package pinpitch is 100 mils. a qfn pinpitch is 0.5mm ( or other metric value)
when doing the pcb design it doesn't matter anymore.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: eugene

Offline Feynman

  • Regular Contributor
  • *
  • Posts: 163
  • Country: ch
Re: Inches, mils, or millimeters?
« Reply #11 on: May 11, 2022, 09:19:04 pm »
This post by Tom Hausherr might be helpful for some people who are currently facing the "metric vs imperial" decision:
https://www.pcblibraries.com/forum/metric-pcb-design-tips_topic3103.html
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 428
  • Country: us
Re: Inches, mils, or millimeters?
« Reply #12 on: May 12, 2022, 12:09:05 am »
When laying out PCBs, as with every other task in life, the best system of units to use is the one that makes the job at hand simplest. When laying out PCBs, I typically switch back and forth between mm and mils, usually depending on packages and connectors, sometimes for reasons that won't help answer the question. I do tend to prefer one over the other, but again telling which won't help answer the question.

Use whichever the job suggests. If it doesn't suggest either, then use whichever you prefer - or both in the same board!. If you truly have no opinion, then adopt Tom Hausherr's. His opinion is as good as any other; no better but no worse.
90% of quoted statistics are fictional
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf