Estimating Footprints from a PCB

teaserSometimes it may be desirable to create a PCB footprint from an existing PCB, perhaps when a part is salvaged from a board or detailed dimensions aren't available.  Measuring the pattern on an existing board using a digital caliper is possible but is tedious and is subject to errors.  This method is adapted from an article on Hack-A-Day: Reverse engineering salvaged part footprints.  I show a method to accomplish this technique using Infanview, a image manipulation program I highly recommend.

The first step is to take a high-resolution picture showing the footprint in question.  This may be done using the macro setting on a camera or using a microscope camera depending on the size of the footprint.  If the board is bare, a standard flatbed scanner may be used to create a great image.  When taking the picture, the camera should be parallel with the board to prevent a skewed image.  For this article, I'll be using a scanned image of my PCD demo board.  The resolution of this picture is about 1200 pixels by 1200 pixels.

Demo Board

The first step is to open the picture in Irfanview.  It will look something like the picture below.  The background might be black instead of white depending on how the program is configured.  Once the board picture is loaded, the paint dialog will be opened.

Irfanview 1

 

Next, the measurement tool is selected from the paint menu.

Irfanview 2

 

With an image from a scanner, the scaling is contained in the image file, so no calibration should be required.  The demo PCB board is 100 mm x 100 mm, so the calibration can be quickly verified.  With the measurement tool selected, move the cursor to one end of the dimension to be measured, press the left mouse button and drag to the other end point.  A dialog box shows the dimension.  The magenta line shows the dimension I measured:  99.66 mm or 3.92" - very close to the actual size of 100 mm.

Infanview 4

The measurements are correct even when the imagine is zoomed in.  Here's a simple check - zoomed in, the dimensions of the 207/15 resistor package were checked.  The measurement on the image is 15.3 mm between the holes.

Irfanview 5

 

If the board image was taken with a camera, the scaling will have to be set.  Right clicking the measurement tool icon will open the scaling dialog box.  Physically measure some dimension on the board and adjust the scale factor until the correct size is shown.  The scaling process is a bit of educated trial and error.

Irfanview 3

 

This is a great way to determine dimensions on an undocumented board and can yield reasonably accurate results which can be used to quickly reverse engineer PCB footprints. Hope you find it useful.


Posted: 1 year 9 months ago by Graham Mitchell #12898
Graham Mitchell's Avatar
I don't have a PCB layout to reverse engineer right now, but I gave this a go out of interest. Great tip Jon, Infranview makes it simple to get measurements etc; nice application of use for electronics!
Posted: 1 year 9 months ago by W4GNS #12899
W4GNS's Avatar
I look forward to looking into Infranview also, if I can manage to stay awake till midnight sometime. Which is the time when I can start serious downloading.


Edit: It's a very small download. 2 Mb
Posted: 1 year 9 months ago by Jon Chandler #12902
Jon Chandler's Avatar
It should go without saying, but...

Resolution is important to this process. The resolution for the demo board I've pictured here is about 1200 pixels across the width. This is ok to measure larger objects on the board. But let's say I want to measure the dimensions of one of the quad flat packs in the lower right corner.

To make decent measurements, I'd need a high resolution picture of that area - taken with a macro lens, through a microscope or maybe with a scanner limited to that area and set to maximum resolution.

As it is in the current picture, the entire area of one of the quad flat packs is about 100 pixels wide, and each pad spans maybe 10 pixels. There's not enough resolution to get good detail in a measurement.
Posted: 1 year 9 months ago by Jon Chandler #12904
Jon Chandler's Avatar
I used a macro lens on my dSLR to take a closeup of the quad flat pack.



Measuring as close as possible with a ruler, from extreme end of one pad to the extreme end of the other was 13 mm.

To calibrate, Irfanview told me this distance was 738 pixels. So

738 pixels / 13 mm = 56.5 pixels per mm.

I defined a new unit called scaled mm, and entered 56.5 as the calibration factor. Measuring across the pads using this calibration yielded a size of 12.98 mm. I think we can call that close enough.

Next I measured one of the pads using Irfanview: 1.54 mm x 0.44 mm

Checking the Eagle library that has this footprint, I found the actual pad size was 1.5 mm x 0.5 mm.

If I had re-created this part using measurements taken from the photo, it would work well. This is a great technique using software I already use frequently.
Posted: 1 year 8 months ago by Jon Chandler #13054
Jon Chandler's Avatar
Of course it goes without saying (sadly, much of what shouldn't need saying seems to!) that this technique is most useful to duplicate an unusual footprint from a circuit board.

If you're designing a footprint for a new component, the data sheet should be the first and ultimate reference. Manufacturers always provide information about recommended PCB layouts. Sometimes you may want to make some customizations, but this is the place to start.

For those rare cases where chip manufacturers don't provide any information on recommended layouts Microchip's Packaging Specifications is almost the Bible on the subject.

Forum Activity

Member Access