From 7a9395b8fc4b060dcc34a41a1b8da97db256fdf8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 10 Nov 2017 13:40:23 -0800 Subject: [PATCH] Add ufqfpn24 footprint (for MPU9250) This is a 3mmx3mm 24-pin package with 0.4mm spacing and no central pad. The corner pads are beveled by overlapping four pads to preserve process spacing between them. The resulting spacing is about 8.4 mils (0.21mm). Solder mask is set to 0.05mm as specified in the MPU9250 docs. Signed-off-by: Keith Packard --- packages/Makefile | 1 + packages/ufqfpn24.5c | 158 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 packages/ufqfpn24.5c diff --git a/packages/Makefile b/packages/Makefile index b2766f2..16330b2 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -85,6 +85,7 @@ FOOTPRINTS= \ usb_onboard.fp \ u-pdfn-8.fp \ ufqfpn28.fp \ + ufqfpn24.fp \ sot666.fp \ sot323.fp \ sod123.fp \ diff --git a/packages/ufqfpn24.5c b/packages/ufqfpn24.5c new file mode 100644 index 0000000..be2ca92 --- /dev/null +++ b/packages/ufqfpn24.5c @@ -0,0 +1,158 @@ +/* + * Copyright © 2012 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +load "footprint.5c" +import Footprint; + +Footprint::process_soldermask = 0.05; + +real package_pad_width = 0.30; +real pad_outside = 0.25; +real pad_width = package_pad_width + pad_outside; +real corner_pad_width = pad_width; +real pad_height = 0.20; + +/* Required clearance between corner pads on the diagonal */ +real corner_diag_clearance = 0.21; + +/* horizontal/vertical size of corner cut out */ +#real corner_pad_notch = corner_diag_clearance / sqrt(2); +real corner_pad_notch = 0.05; + +real corner_pad_minimum_height = pad_height - corner_pad_notch; +real corner_pad_minimum_width = corner_pad_width - corner_pad_notch; + +real pad_spacing = 0.40; + +real package_width = 3; +real package_height = 3; + +/* outer location of pad */ + +real pad_x_off = (package_width/2 + pad_outside); +real pad_y_off = (package_height/2 + pad_outside); + +real num_pad = 6; /* per side */ + +element_start("ufqfpn-24"); + +real pad_off(int n) { + return pad_spacing * (n - (num_pad - 1) / 2); +} + +real corner(int dx, int dy) { + real x = dx * package_width / 2; + real y = dy * package_height / 2; + real len = 0.4; + + line(x, y, x - dx * len, y); + line(x, y, x, y - dy * len); +} + +/* +corner(-1, -1); +corner(1, -1); +corner(-1, 1); +corner(1, 1); +*/ + +real dot_off = .3; + +line(-package_width/2 - dot_off, -package_height/2 - dot_off, + -package_width/2 - dot_off, -package_height/2 - dot_off); + +rect(-package_width/2, -package_width/2, package_width, package_width) + +for (int pad = 0; pad < num_pad; pad++) { + real pw = pad_width; + real ph = pad_height; + real pwa = 0; + real pha = 0; + + int nstep = 0; + + if (pad == 0 || pad == num_pad-1) + nstep = 3; + + for (int s = 0; s <= nstep; s++) { + + real pad_x, pad_y, pad_w, pad_h; + + if (nstep != 0) { + real ratio_a = s / nstep; + real ratio_b = 1 - ratio_a; + + pad_x = 0; + if (pad == 0) { + pad_y = -pad_height / 2 * ratio_b + ((-pad_height / 2) + corner_pad_notch) * ratio_a; + } else { + pad_y = -pad_height / 2; + } + pad_w = corner_pad_minimum_width * ratio_b + corner_pad_width * ratio_a; + + pad_h = pad_height * ratio_b + corner_pad_minimum_height * ratio_a; + + /* Make sure we don't violate the process minimums */ + if (pad_h < process_trace) + pad_h = process_trace; + + } else { + pad_x = 0; + pad_y = -pad_height / 2; + pad_w = pad_width; + pad_h = pad_height; + } + + /* left (1-6) */ + pad_mm(-pad_x_off + pad_x + pad_w / 2, + pad_off(pad) + pad_y + pad_h / 2, + pad_w, + pad_h, + sprintf("%d", pad + 1), + sprintf("%d", pad + 1)); + + /* bottom (7-12) */ + + pad_mm(pad_off(pad) + pad_y + pad_h / 2, + pad_y_off + pad_x - pad_w / 2, + pad_h, + pad_w, + sprintf("%d", pad + num_pad + 1), + sprintf("%d", pad + num_pad + 1)); + + /* right side (13-18) */ + + pad_mm(pad_x_off - pad_x - pad_w / 2, + -pad_off(pad) - pad_y - pad_h / 2, + pad_w, + pad_h, + sprintf("%d", pad + num_pad * 2 + 1), + sprintf("%d", pad + num_pad * 2 + 1)); + + /* top (19-24) */ + + pad_mm(-pad_off(pad) - pad_y - pad_h / 2, + -pad_y_off - pad_x + pad_w / 2, + pad_h, + pad_w, + sprintf("%d", pad + num_pad * 3 + 1), + sprintf("%d", pad + num_pad * 3 + 1)); + } + +} + +element_end(); -- 2.30.2