{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Notebook configuration" ] }, { "cell_type": "code", "execution_count": 115, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The autoreload extension is already loaded. To reload it, use:\n", " %reload_ext autoreload\n" ] } ], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "\n", "%aimport ee.kicad.bom\n", "%aimport ee.kicad.bom.io\n", "\n", "from ee.kicad.bom import *\n", "from ee.kicad.bom.io import read_bom" ] }, { "cell_type": "code", "execution_count": 170, "metadata": { "collapsed": true }, "outputs": [], "source": [ "bom_file = \"../kicad/bom/A64-OlinuXino_Rev_C.xml\"\n", "bom_file = \"../kicad/bom/gw.xml\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Load the BOM, sort by reference" ] }, { "cell_type": "code", "execution_count": 199, "metadata": { "scrolled": true }, "outputs": [], "source": [ "import os\n", "import os.path\n", "import pandas\n", "\n", "bom = read_bom(bom_file).to_pandas()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Sort a BOM" ] }, { "cell_type": "code", "execution_count": 200, "metadata": { "scrolled": true }, "outputs": [], "source": [ "f=lambda x: pandas.Series(data=x, index=['ref_name', 'ref_num', 'ref_rest'])\n", "sort_fields=bom[\"ref\"].map(ee.kicad.bom.split_ref).apply(f)\n", "\n", "bom=pandas.concat([bom, sort_fields], axis=1, join_axes=[bom.index])\n", "bom=bom.sort_values(by=list(sort_fields.columns))\n" ] }, { "cell_type": "code", "execution_count": 201, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Capacitance | \n", "Color | \n", "Description | \n", "Frequency | \n", "Impedance | \n", "Inductance | \n", "Manufacturer | \n", "Part Number | \n", "Resistance | \n", "ref | \n", "value | \n", "ref_name | \n", "ref_num | \n", "ref_rest | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C1 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C1 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "1 | \n", "\n", " |
C2 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C2 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "2 | \n", "\n", " |
C3 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C3 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "3 | \n", "\n", " |
C4 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C4 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "4 | \n", "\n", " |
C5 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C5 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "5 | \n", "\n", " |
C6 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C6 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "6 | \n", "\n", " |
C7 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C7 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "7 | \n", "\n", " |
C8 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C8 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "8 | \n", "\n", " |
C9 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C9 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "9 | \n", "\n", " |
C10 | \n", "4.7uF | \n", "None | \n", "4.7uF, 6.3Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM185R60J475ME15 | \n", "None | \n", "C10 | \n", "C0603_4u7_6.3Vdc_X5R | \n", "C | \n", "10 | \n", "\n", " |
C11 | \n", "4.7uF | \n", "None | \n", "4.7uF, 6.3Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM185R60J475ME15 | \n", "None | \n", "C11 | \n", "C0603_4u7_6.3Vdc_X5R | \n", "C | \n", "11 | \n", "\n", " |
C12 | \n", "4.7uF | \n", "None | \n", "4.7uF, 6.3Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM185R60J475ME15 | \n", "None | \n", "C12 | \n", "C0603_4u7_6.3Vdc_X5R | \n", "C | \n", "12 | \n", "\n", " |
C13 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C13 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "13 | \n", "\n", " |
C14 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C14 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "14 | \n", "\n", " |
C15 | \n", "10000pF | \n", "None | \n", "10000pF, 10Vdc, ±10%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM155R61A103KA01 | \n", "None | \n", "C15 | \n", "C0402_10n_10Vdc_X5R | \n", "C | \n", "15 | \n", "\n", " |
C16 | \n", "10000pF | \n", "None | \n", "10000pF, 10Vdc, ±10%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM155R61A103KA01 | \n", "None | \n", "C16 | \n", "C0402_10n_10Vdc_X5R | \n", "C | \n", "16 | \n", "\n", " |
C17 | \n", "10000pF | \n", "None | \n", "10000pF, 10Vdc, ±10%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM155R61A103KA01 | \n", "None | \n", "C17 | \n", "C0402_10n_10Vdc_X5R | \n", "C | \n", "17 | \n", "\n", " |
C18 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C18 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "18 | \n", "\n", " |
C19 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C19 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "19 | \n", "\n", " |
C20 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C20 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "20 | \n", "\n", " |
C21 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C21 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "21 | \n", "\n", " |
C22 | \n", "10pF | \n", "None | \n", "10pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A100GA01 | \n", "None | \n", "C22 | \n", "C0402_10p_100Vdc_C0G | \n", "C | \n", "22 | \n", "\n", " |
C23 | \n", "10pF | \n", "None | \n", "10pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A100GA01 | \n", "None | \n", "C23 | \n", "C0402_10p_100Vdc_C0G | \n", "C | \n", "23 | \n", "\n", " |
C24 | \n", "10pF | \n", "None | \n", "10pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A100GA01 | \n", "None | \n", "C24 | \n", "C0402_10p_100Vdc_C0G | \n", "C | \n", "24 | \n", "\n", " |
C25 | \n", "10pF | \n", "None | \n", "10pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A100GA01 | \n", "None | \n", "C25 | \n", "C0402_10p_100Vdc_C0G | \n", "C | \n", "25 | \n", "\n", " |
C26 | \n", "10pF | \n", "None | \n", "10pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A100GA01 | \n", "None | \n", "C26 | \n", "C0402_10p_100Vdc_C0G | \n", "C | \n", "26 | \n", "\n", " |
C27 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C27 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "27 | \n", "\n", " |
C28 | \n", "15pF | \n", "None | \n", "15pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A150GA01 | \n", "None | \n", "C28 | \n", "C0402_15p_100Vdc_C0G | \n", "C | \n", "28 | \n", "\n", " |
C29 | \n", "1.0uF | \n", "None | \n", "1.0uF, 10Vdc, ±20%, X5R | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM153R61A105ME95 | \n", "None | \n", "C29 | \n", "C0402_1u_10Vdc_X5R | \n", "C | \n", "29 | \n", "\n", " |
C30 | \n", "15pF | \n", "None | \n", "15pF, 100Vdc, ±2%, C0G | \n", "None | \n", "None | \n", "None | \n", "Murata | \n", "GRM1555C2A150GA01 | \n", "None | \n", "C30 | \n", "C0402_15p_100Vdc_C0G | \n", "C | \n", "30 | \n", "\n", " |
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
R32 | \n", "None | \n", "None | \n", "1.5k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW04021K50FKED | \n", "1.5k | \n", "R32 | \n", "R0402_1k50 | \n", "R | \n", "32 | \n", "\n", " |
R33 | \n", "None | \n", "None | \n", "10k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW040210K0FKED | \n", "10k | \n", "R33 | \n", "R0402_10k | \n", "R | \n", "33 | \n", "\n", " |
R34 | \n", "None | \n", "None | \n", "330, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402330RFKED | \n", "330 | \n", "R34 | \n", "R0402_330R | \n", "R | \n", "34 | \n", "\n", " |
R35 | \n", "None | \n", "None | \n", "330, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402330RFKED | \n", "330 | \n", "R35 | \n", "R0402_330R | \n", "R | \n", "35 | \n", "\n", " |
R36 | \n", "None | \n", "None | \n", "10k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW040210K0FKED | \n", "10k | \n", "R36 | \n", "R0402_10k | \n", "R | \n", "36 | \n", "\n", " |
R37 | \n", "None | \n", "None | \n", "100k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402100KFKED | \n", "100k | \n", "R37 | \n", "R0402_100k | \n", "R | \n", "37 | \n", "\n", " |
R38 | \n", "None | \n", "None | \n", "100k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402100KFKED | \n", "100k | \n", "R38 | \n", "R0402_100k | \n", "R | \n", "38 | \n", "\n", " |
R39 | \n", "None | \n", "None | \n", "100k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402100KFKED | \n", "100k | \n", "R39 | \n", "R0402_100k | \n", "R | \n", "39 | \n", "\n", " |
R40 | \n", "None | \n", "None | \n", "100, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402100RFKED | \n", "100 | \n", "R40 | \n", "R0402_100R | \n", "R | \n", "40 | \n", "\n", " |
R41 | \n", "None | \n", "None | \n", "100, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW0402100RFKED | \n", "100 | \n", "R41 | \n", "R0402_100R | \n", "R | \n", "41 | \n", "\n", " |
R42 | \n", "None | \n", "None | \n", "39, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW040239R0FKED | \n", "39 | \n", "R42 | \n", "R0402_39R | \n", "R | \n", "42 | \n", "\n", " |
R43 | \n", "None | \n", "None | \n", "39, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW040239R0FKED | \n", "39 | \n", "R43 | \n", "R0402_39R | \n", "R | \n", "43 | \n", "\n", " |
R44 | \n", "None | \n", "None | \n", "10k, ±1%, 0.063W | \n", "None | \n", "None | \n", "None | \n", "Vishay | \n", "CRCW040210K0FKED | \n", "10k | \n", "R44 | \n", "R0402_10k | \n", "R | \n", "44 | \n", "\n", " |
T1 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "T1 | \n", "S558-5999-T7-F | \n", "T | \n", "1 | \n", "\n", " |
U1 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U1 | \n", "AT91SAM9G25 | \n", "U | \n", "1 | \n", "\n", " |
U2 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U2 | \n", "USBLC6-4 | \n", "U | \n", "2 | \n", "\n", " |
U3 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U3 | \n", "CC2520 | \n", "U | \n", "3 | \n", "\n", " |
U4 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U4 | \n", "NCP360SNAET1G | \n", "U | \n", "4 | \n", "\n", " |
U5 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U5 | \n", "TPS62742 | \n", "U | \n", "5 | \n", "\n", " |
U6 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U6 | \n", "MIC23254 | \n", "U | \n", "6 | \n", "\n", " |
U7 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U7 | \n", "IS46DR16640B | \n", "U | \n", "7 | \n", "\n", " |
U8 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U8 | \n", "MX30LF1G08AA | \n", "U | \n", "8 | \n", "\n", " |
U9 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U9 | \n", "LAN8710 | \n", "U | \n", "9 | \n", "\n", " |
U10 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U10 | \n", "USBLC6-4 | \n", "U | \n", "10 | \n", "\n", " |
U11 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "U11 | \n", "LP3470M5-3.08 | \n", "U | \n", "11 | \n", "\n", " |
X1 | \n", "None | \n", "None | \n", "f=12MHz, Stability:±150ppm, Tol:±50ppm,Load ca... | \n", "12MHz | \n", "None | \n", "None | \n", "NDK | \n", "NX3225GA-12.000M-STD-CRA-1 | \n", "None | \n", "X1 | \n", "NX3225GA-12.000M-STD-CRA-1 | \n", "X | \n", "1 | \n", "\n", " |
X2 | \n", "None | \n", "None | \n", "f=32.768kHz, Stability:-, Tol:±20ppm,Load capa... | \n", "32.768kHz | \n", "None | \n", "None | \n", "NDK | \n", "NX2012SA-32.768K-STD-MUB-1 | \n", "None | \n", "X2 | \n", "NX2012SA-32.768K-STD-MUB-1 | \n", "X | \n", "2 | \n", "\n", " |
X3 | \n", "None | \n", "None | \n", "f=32MHz, Stability:±10ppm, Tol:±10ppm,Load cap... | \n", "32MHz | \n", "None | \n", "None | \n", "NDK | \n", "NX2520SA-32.000000MHZ | \n", "None | \n", "X3 | \n", "NX2520SA-32.000000MHZ | \n", "X | \n", "3 | \n", "\n", " |
X4 | \n", "None | \n", "None | \n", "f=25MHz, Stability:±25ppm, Tol:±15ppm,Load cap... | \n", "25MHz | \n", "None | \n", "None | \n", "NDK | \n", "NX2520SA-25.000M-STD-CSW-5 | \n", "None | \n", "X4 | \n", "NX2520SA-25.000M-STD-CSW-5 | \n", "X | \n", "4 | \n", "\n", " |
Z1 | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "Z1 | \n", "WLA.01 | \n", "Z | \n", "1 | \n", "\n", " |
165 rows × 14 columns
\n", "