├── .gitignore ├── README.md ├── generate.py ├── requirements.txt ├── table.py └── templates ├── Aluminum Electrolytic Capacitors - SMD.lib ├── Beads.lib ├── Chip Resistor - Surface Mount.lib ├── EEPROM.lib ├── Ferrite Beads.lib ├── HF Inductors.lib ├── Inductors SMD.lib ├── Light Emitting Diodes LED.lib ├── Multilayer Ceramic Capacitors MLCC - SMDSMT.lib ├── Schottky Barrier Diodes SBD.lib ├── Switching Diode.lib ├── TVS.lib ├── Tantalum Capacitors.lib ├── Zener Diodes.lib └── template.dcm /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 98 | __pypackages__/ 99 | 100 | # Celery stuff 101 | celerybeat-schedule 102 | celerybeat.pid 103 | 104 | # SageMath parsed files 105 | *.sage.py 106 | 107 | # Environments 108 | .env 109 | .venv 110 | env/ 111 | venv/ 112 | ENV/ 113 | env.bak/ 114 | venv.bak/ 115 | 116 | # Spyder project settings 117 | .spyderproject 118 | .spyproject 119 | 120 | # Rope project settings 121 | .ropeproject 122 | 123 | # mkdocs documentation 124 | /site 125 | 126 | # mypy 127 | .mypy_cache/ 128 | .dmypy.json 129 | dmypy.json 130 | 131 | # Pyre type checker 132 | .pyre/ 133 | 134 | # pytype static type analyzer 135 | .pytype/ 136 | 137 | # Cython debug symbols 138 | cython_debug/ 139 | 140 | #VSCode 141 | .vscode 142 | 143 | # generated library files 144 | export/ 145 | 146 | # LCSC Library Files 147 | JLCPCB* 148 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JLCPCB/LCSC SMT Parts library to KiCad Library Converter 2 | 3 | Looks like JLCPCB does not provide a simple parts list anymore. 4 | 5 | This script will fetch the current available parts for SMT 6 | assembly offered by JLCPCB and generate KiCad Part Library 7 | files. 8 | 9 | To get the generated libraries go to: [kicad_jlcpcb_smt_parts](https://github.com/DasBasti/kicad_jlcpcb_smt_parts) 10 | 11 | # Setup 12 | pip install -r requirements.txt 13 | 14 | # Run 15 | python generate.py 16 | 17 | # Contribute 18 | To contibute part templates please have a look into the template files provided. Open a pull request to get you template added. 🤗 19 | -------------------------------------------------------------------------------- /generate.py: -------------------------------------------------------------------------------- 1 | import table 2 | import os 3 | import sys 4 | import glob 5 | import requests 6 | import json 7 | from xlrd import open_workbook 8 | 9 | dcm_templates = {} 10 | lib_templates = {} 11 | 12 | if not os.path.exists("export"): 13 | os.mkdir("export") 14 | 15 | print("load: DCM template") 16 | with open("templates/template.dcm") as f: 17 | dcm_template = f.read() 18 | 19 | for filepath in glob.iglob("templates/*.lib"): 20 | print("load: "+filepath) 21 | with open(filepath) as f: 22 | content = f.read() 23 | lines = content.splitlines() 24 | header = {} 25 | if lines[0].startswith("#!"): # parse header information 26 | header = json.loads(lines[0][2:]) 27 | header['content'] = "\n".join(lines[1:]) 28 | lib_templates[os.path.basename(filepath).split('.')[0]] = header 29 | 30 | if len(sys.argv) == 1: 31 | print("fetch file from JLCPCB") 32 | url = 'https://jlcpcb.com/componentSearch/uploadComponentInfo' 33 | r = requests.get(url) 34 | db = r.content 35 | if len(db) < 5: 36 | raise Exception("No data found in JLCPCB database download. Exiting.") 37 | else: 38 | print("load from: ", sys.argv[1]) 39 | with open(sys.argv[1], "rb") as db_file: 40 | db = db_file.read() 41 | 42 | 43 | print("parsing data. This might take a while!") 44 | 45 | table.load_data(db) 46 | 47 | parts = 0 48 | for lib in table.data: 49 | lib_parts = 0 50 | print("Library: "+lib) 51 | file_pre = (lib.replace(" ","_").replace("&","").replace("__","_")) 52 | dcm_str = "EESchema-DOCLIB Version 2.0\n" 53 | lib_str = "EESchema-LIBRARY Version 2.4\n" 54 | lib_str += "#encoding utf-8\n" 55 | for grp in table.data[lib]: 56 | print("Group: "+grp) 57 | for part in table.data[lib][grp]: 58 | # Test for MPN Template 59 | template = table.sanitise_name(part['MFRPart'], spaces=False) 60 | if template in lib_templates: 61 | if lib_templates[template]['pins'] == part['SolderJoint']: 62 | parts += 1 63 | lib_parts += 1 64 | lib_str += lib_templates[template]['content'].format(**part) 65 | dcm_str += dcm_template.format(**part) 66 | else: 67 | print("Pins missmatch", part['SolderJoint'], template) 68 | else: # Test for generic Group Template 69 | template = table.sanitise_name(part['SecondCategory'], spaces=False) 70 | if template in lib_templates: 71 | if lib_templates[template]['pins'] == part['SolderJoint']: 72 | parts += 1 73 | lib_parts += 1 74 | lib_str += lib_templates[template]['content'].format(**part) 75 | dcm_str += dcm_template.format(**part) 76 | else: 77 | print("Group Pins missmatch", part['SolderJoint'], part['MFRPart']) 78 | 79 | lib_str += "#\n#End Library" 80 | dcm_str += "#\n#End Doc Library" 81 | 82 | if(lib_parts > 0): 83 | with open("export/LCSC_"+file_pre+".lib", "w" ,encoding='utf8') as l: 84 | l.write(lib_str) 85 | with open("export/LCSC_"+file_pre+".dcm", "w" ,encoding='utf8') as l: 86 | l.write(dcm_str) 87 | 88 | print("Total: {0} parts".format(parts)) 89 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2020.12.5 2 | chardet==4.0.0 3 | idna==2.10 4 | requests==2.25.1 5 | urllib3==1.26.3 6 | xlrd==2.0.1 7 | -------------------------------------------------------------------------------- /table.py: -------------------------------------------------------------------------------- 1 | ### 2 | # LCSC Part Database parser 3 | ### 4 | from xlrd import open_workbook 5 | import os 6 | 7 | columns = [ 8 | "LCSC", 9 | "FirstCategory", 10 | "SecondCategory", 11 | "MFRPart", 12 | "Package", 13 | "SolderJoint", 14 | "Manufacturer", 15 | "LibraryType", 16 | "Description", 17 | "Datasheet", 18 | "Price", 19 | "Stock" 20 | ] 21 | 22 | data = {} 23 | 24 | ### Load file into buffer 25 | def load_data(file): 26 | book = open_workbook(file_contents=file, on_demand=True) 27 | for name in book.sheet_names(): 28 | if name == 'JLCPCB SMT Parts Library': 29 | sheet = book.sheet_by_name(name) 30 | names = [] 31 | for rc in range(sheet.nrows): 32 | if rc == 0: # skip header 33 | continue 34 | cat = sheet.cell_value(rowx=rc, colx=1) 35 | if cat not in data: # library files 36 | data[cat] = {} 37 | 38 | grp = sheet.cell_value(rowx=rc, colx=2) 39 | grp_field = grp.replace("/", "") 40 | if grp_field not in data[cat]: # library files 41 | data[cat][grp_field] = [] 42 | 43 | fields = {"field": grp_field} 44 | for c,f in enumerate(sheet.row(rc)): 45 | value = f.value 46 | value = value.replace("\"", "") 47 | if columns[c] == "MFRPart": # part name 48 | if value in names: 49 | value += "_" 50 | names.append(value) 51 | 52 | fields["MFRPart_sanitized"] = sanitise_name(value) 53 | if columns[c] == "Description": 54 | value = value.replace(grp, "").strip() 55 | if columns[c] == "SolderJoint": 56 | value = int(value) 57 | fields[columns[c]] = value 58 | data[cat][grp_field].append(fields) 59 | book.unload_sheet(name) 60 | 61 | 62 | def sanitise_name(name, spaces=True): 63 | if spaces: 64 | name = name.replace(" ","") 65 | return name.replace("&", "").replace("(", "").replace(")","").replace(",","").replace("/", "") 66 | -------------------------------------------------------------------------------- /templates/Aluminum Electrolytic Capacitors - SMD.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} C 0 10 N Y 1 F N 5 | F0 "C" 25 100 50 H V L CNN 6 | F1 "CP" 25 -100 50 H V L CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | CP_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | S -90 20 90 40 0 1 0 N 24 | S 90 -20 -90 -40 0 1 0 F 25 | P 2 0 1 0 -70 90 -30 90 N 26 | P 2 0 1 0 -50 110 -50 70 N 27 | X ~ 1 0 150 110 D 50 50 1 1 P 28 | X ~ 2 0 -150 110 U 50 50 1 1 P 29 | ENDDRAW 30 | ENDDEF 31 | -------------------------------------------------------------------------------- /templates/Beads.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} BD 0 0 N Y 1 F N 5 | F0 "L" 80 0 50 V V C CNN 6 | F1 "L" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | L_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | S -40 -100 40 100 0 1 10 F 24 | X ~ 1 0 150 50 D 50 50 1 1 P 25 | X ~ 2 0 -150 50 U 50 50 1 1 P 26 | ENDDRAW 27 | ENDDEF 28 | -------------------------------------------------------------------------------- /templates/Chip Resistor - Surface Mount.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} R 0 0 N Y 1 F N 5 | F0 "R" 80 0 50 V V C CNN 6 | F1 "R" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | R_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | S -40 -100 40 100 0 1 10 N 24 | X ~ 1 0 150 50 D 50 50 1 1 P 25 | X ~ 2 0 -150 50 U 50 50 1 1 P 26 | ENDDRAW 27 | ENDDEF 28 | 29 | -------------------------------------------------------------------------------- /templates/EEPROM.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 8 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} U 0 20 Y Y 1 F N 5 | F0 "U" -250 250 50 H V C CNN 6 | F1 "24LC16" 50 250 50 H V L CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | DIP*W7.62mm* 20 | SOIC*3.9x4.9mm* 21 | TSSOP*4.4x3mm*P0.65mm* 22 | DFN*3x2mm*P0.5mm* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | S -300 200 300 -200 1 1 10 f 27 | X A0 1 -400 100 100 R 50 50 1 1 I 28 | X A1 2 -400 0 100 R 50 50 1 1 I 29 | X A2 3 -400 -100 100 R 50 50 1 1 I 30 | X GND 4 0 -300 100 U 50 50 1 1 W 31 | X SDA 5 400 100 100 L 50 50 1 1 B 32 | X SCL 6 400 0 100 L 50 50 1 1 I 33 | X WP 7 400 -100 100 L 50 50 1 1 I 34 | X VCC 8 0 300 100 D 50 50 1 1 W 35 | ENDDRAW 36 | ENDDEF 37 | -------------------------------------------------------------------------------- /templates/Ferrite Beads.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} BD 0 0 N Y 1 F N 5 | F0 "L" 80 0 50 V V C CNN 6 | F1 "L" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | L_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | S -40 -100 40 100 0 1 10 F 24 | X ~ 1 0 150 50 D 50 50 1 1 P 25 | X ~ 2 0 -150 50 U 50 50 1 1 P 26 | ENDDRAW 27 | ENDDEF 28 | -------------------------------------------------------------------------------- /templates/HF Inductors.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} L 0 0 N Y 1 F N 5 | F0 "R" 80 0 50 V V C CNN 6 | F1 "R" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | C_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | P 2 0 1 20 -80 -30 80 -30 N 24 | P 2 0 1 20 -80 30 80 30 N 25 | X ~ 1 0 150 110 D 50 50 1 1 P 26 | X ~ 2 0 -150 110 U 50 50 1 1 P 27 | ENDDRAW 28 | ENDDEF 29 | -------------------------------------------------------------------------------- /templates/Inductors SMD.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} L 0 0 N Y 1 F N 5 | F0 "R" 80 0 50 V V C CNN 6 | F1 "R" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | Choke_* 20 | *Coil* 21 | Inductor_* 22 | L_* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | A 0 -75 25 -899 899 0 1 0 N 0 -100 0 -50 27 | A 0 -25 25 -899 899 0 1 0 N 0 -50 0 0 28 | A 0 25 25 -899 899 0 1 0 N 0 0 0 50 29 | A 0 75 25 -899 899 0 1 0 N 0 50 0 100 30 | X 1 1 0 150 50 D 50 50 1 1 P 31 | X 2 2 0 -150 50 U 50 50 1 1 P 32 | ENDDRAW 33 | ENDDEF 34 | -------------------------------------------------------------------------------- /templates/Light Emitting Diodes LED.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} D 0 40 N N 1 F N 5 | F0 "D" 0 100 50 H V C CNN 6 | F1 "LED" 0 -100 50 H V C CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | LED* 20 | LED_SMD:* 21 | {Package} 22 | $ENDFPLIST 23 | DRAW 24 | P 2 0 1 8 -50 -50 -50 50 N 25 | P 2 0 1 0 -50 0 50 0 N 26 | P 4 0 1 8 50 -50 50 50 -50 0 50 -50 N 27 | P 5 0 1 0 -120 -30 -180 -90 -150 -90 -180 -90 -180 -60 N 28 | P 5 0 1 0 -70 -30 -130 -90 -100 -90 -130 -90 -130 -60 N 29 | X K 1 -150 0 100 R 50 50 1 1 P 30 | X A 2 150 0 100 L 50 50 1 1 P 31 | ENDDRAW 32 | ENDDEF 33 | -------------------------------------------------------------------------------- /templates/Multilayer Ceramic Capacitors MLCC - SMDSMT.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} C 0 0 N Y 1 F N 5 | F0 "R" 80 0 50 V V C CNN 6 | F1 "R" 0 0 50 V V C CNN 7 | F2 "{Package}" -70 0 50 V I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | C_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | P 2 0 1 20 -80 -30 80 -30 N 24 | P 2 0 1 20 -80 30 80 30 N 25 | X ~ 1 0 150 110 D 50 50 1 1 P 26 | X ~ 2 0 -150 110 U 50 50 1 1 P 27 | ENDDRAW 28 | ENDDEF 29 | -------------------------------------------------------------------------------- /templates/Schottky Barrier Diodes SBD.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} D 0 40 N N 1 F N 5 | F0 "D" 0 100 50 H V C CNN 6 | F1 "D_Schottky" 0 -100 50 H V C CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | TO-???* 20 | *_Diode_* 21 | *SingleDiode* 22 | D_* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | P 2 0 1 0 50 0 -50 0 N 27 | P 4 0 1 8 50 50 50 -50 -50 0 50 50 N 28 | P 6 0 1 8 -75 25 -75 50 -50 50 -50 -50 -25 -50 -25 -25 N 29 | X K 1 -150 0 100 R 50 50 1 1 P 30 | X A 2 150 0 100 L 50 50 1 1 P 31 | ENDDRAW 32 | ENDDEF 33 | -------------------------------------------------------------------------------- /templates/Switching Diode.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} D 0 40 N N 1 F N 5 | F0 "D" 0 100 50 H V C CNN 6 | F1 "D" 0 -100 50 H V C CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | TO-???* 20 | *_Diode_* 21 | *SingleDiode* 22 | D_* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | P 2 0 1 8 -50 50 -50 -50 N 27 | P 2 0 1 0 50 0 -50 0 N 28 | P 4 0 1 8 50 50 50 -50 -50 0 50 50 N 29 | X K 1 -150 0 100 R 50 50 1 1 P 30 | X A 2 150 0 100 L 50 50 1 1 P 31 | ENDDRAW 32 | ENDDEF 33 | -------------------------------------------------------------------------------- /templates/TVS.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} D 0 40 N N 1 F N 5 | F0 "D" 0 100 50 H V C CNN 6 | F1 "D_TVS" 0 -100 50 H V C CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | TO-???* 20 | *_Diode_* 21 | *SingleDiode* 22 | D_* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | P 2 0 1 0 50 0 -50 0 N 27 | P 4 0 1 8 -100 -50 0 0 -100 50 -100 -50 N 28 | P 4 0 1 8 20 50 0 50 0 -50 -20 -50 N 29 | P 4 0 1 8 100 50 100 -50 0 0 100 50 N 30 | X A1 1 -150 0 100 R 50 50 1 1 P 31 | X A2 2 150 0 100 L 50 50 1 1 P 32 | ENDDRAW 33 | ENDDEF 34 | -------------------------------------------------------------------------------- /templates/Tantalum Capacitors.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} C 0 10 N Y 1 F N 5 | F0 "C" 25 100 50 H V L CNN 6 | F1 "CP" 25 -100 50 H V L CNN 7 | F2 "{Package}" 38 -150 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | CP_* 20 | {Package} 21 | $ENDFPLIST 22 | DRAW 23 | S -90 20 90 40 0 1 0 N 24 | S 90 -20 -90 -40 0 1 0 F 25 | P 2 0 1 0 -70 90 -30 90 N 26 | P 2 0 1 0 -50 110 -50 70 N 27 | X ~ 1 0 150 110 D 50 50 1 1 P 28 | X ~ 2 0 -150 110 U 50 50 1 1 P 29 | ENDDRAW 30 | ENDDEF 31 | -------------------------------------------------------------------------------- /templates/Zener Diodes.lib: -------------------------------------------------------------------------------- 1 | #! { "pins" : 2 } 2 | # {MFRPart} 3 | # 4 | DEF {MFRPart_sanitized} D 0 40 N N 1 F N 5 | F0 "D" 0 100 50 H V C CNN 6 | F1 "D_Zener" 0 -100 50 H V C CNN 7 | F2 "{Package}" 0 0 50 H I C CNN 8 | F3 "{SecondCategory}" 0 0 50 H I C CNN 9 | F4 "{MFRPart}" 0 0 50 H I C CNN "MFR.Part" 10 | F5 "{SecondCategory}" 0 0 50 H I C CNN "Part Category" 11 | F6 "{SolderJoint}" 0 0 50 H I C CNN "Solder Joint" 12 | F7 "{Manufacturer}" 0 0 50 H I C CNN "Manufacturer" 13 | F8 "{LibraryType}" 0 0 50 H I C CNN "Library Type" 14 | F9 "{Description}" 0 0 50 H I C CNN "Description" 15 | F10 "{Price}" 0 0 50 H I C CNN "Price" 16 | F11 "{LCSC}" 0 0 50 H I C CNN "LCSC" 17 | F12 "{Stock}" 0 0 50 H I C CNN "Stock" 18 | $FPLIST 19 | TO-???* 20 | *_Diode_* 21 | *SingleDiode* 22 | D_* 23 | {Package} 24 | $ENDFPLIST 25 | DRAW 26 | P 2 0 1 0 50 0 -50 0 N 27 | P 3 0 1 8 -50 -50 -50 50 -30 50 N 28 | P 4 0 1 8 50 -50 50 50 -50 0 50 -50 N 29 | X K 1 -150 0 100 R 50 50 1 1 P 30 | X A 2 150 0 100 L 50 50 1 1 P 31 | ENDDRAW 32 | ENDDEF 33 | -------------------------------------------------------------------------------- /templates/template.dcm: -------------------------------------------------------------------------------- 1 | # 2 | $CMP {MFRPart_sanitized} 3 | D {Description} {SecondCategory} 4 | K 5 | F {Datasheet} 6 | $ENDCMP 7 | --------------------------------------------------------------------------------