From: Keith Packard Date: Sun, 16 Feb 2014 19:22:14 +0000 (-0800) Subject: Add package for a soldered-in-place lipo X-Git-Tag: telelco-v3.0~801 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=8d079e3e32e96cd4cff4da6e9450f37018b9974f;p=hw%2Faltusmetrum Add package for a soldered-in-place lipo This provides two solder pads 4mm square to attach a lipo battery to Signed-off-by: Keith Packard --- diff --git a/packages/Makefile b/packages/Makefile index b6212e5..b492ce2 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -63,7 +63,8 @@ FOOTPRINTS= \ g6z1fe.fp \ W3011A.fp \ DIODE-SMA.fp \ - 2512.fp + 2512.fp \ + lipo-15x24.fp .5c.fp: nickle $*.5c > $@ @@ -96,3 +97,6 @@ clean: $(CLEANDIRS) soic-16.fp: soic.5c nickle soic.5c 16 > $@ + +lipo-15x24.fp: lipo-pad.5c + nickle lipo-pad.5c 15 24 > $@ \ No newline at end of file diff --git a/packages/lipo-pad.5c b/packages/lipo-pad.5c new file mode 100644 index 0000000..fb8c143 --- /dev/null +++ b/packages/lipo-pad.5c @@ -0,0 +1,47 @@ +/* + * Copyright © 2014 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; + +/* Battery geometry */ +if (dim(argv) < 3) { + File::fprintf(stderr, "Usage: %s \n", argv[0]); + exit(1); +} + +File::sscanf(argv[1], "%f", &(real battery_width)); +File::sscanf(argv[2], "%f", &(real battery_height)); + +/* Size of solder pad */ +real tab_height = 4.0; +real tab_width = 4.0; + +/* inset from edge of battery to tab solder pad */ +real tab_off = 1.0; + +/* Spacing between solder pads */ +real tab_space = 7.0; + +element_start(sprintf("lipo-%fx%f", battery_width, battery_height)); + +pad_mm (-tab_space/2, 0, tab_width, tab_height, "-", "2"); +pad_mm (tab_space/2, 0, tab_width, tab_height, "+", "1"); + +rect (-battery_width/2, -tab_height/2 - tab_off, battery_width, battery_height); + +element_end();