Generate BOM
This commit is contained in:
parent
997263b979
commit
660d6e96a0
|
@ -0,0 +1,47 @@
|
||||||
|
Reference,Quantity,Identifier,Package,Value,Tolerance,Voltage,Current,Power,PN,Mouser
|
||||||
|
"C1;C2;C3","3","","","470 uF 63V","","","","","","647-UVZ1J471MHD"
|
||||||
|
"J1","1","","","Conn_01x02","","","","","","NoPart"
|
||||||
|
"U4","1","","","DRV8353RSRGZ","","","","","","595-DRV8353RSRGZR"
|
||||||
|
"C33","1","","","1 uF X5R 16V","","","","","","603-CC603KRX5R6BB105"
|
||||||
|
"C30;C48;C56;C35;C55;C7;C12","7","","","10 uF","","","","","","963-JMK107ABJ106KA-T"
|
||||||
|
"C27;C47;C44","3","","","0.1 uF X5R 25V","","","","","","81-GRM155R61H104KE9D"
|
||||||
|
"C32","1","","","47 nF X5R 25V","","","","","","810-CGA2B2X5R1E473KA"
|
||||||
|
"C45","1","","","1 uF X5R 6.3V","","","","","","603-CC402KRX5R5BB105"
|
||||||
|
"C29","1","","","1 uF X5R 25V","","","","","","603-CC603KRX5R8BB105"
|
||||||
|
"C43","1","","","0.47 uF X5R 16V","","","","","","603-CC603KRX5R7BB474"
|
||||||
|
"C46","1","","","0.01 uF","","","","","","80-C0402C103K5R7411"
|
||||||
|
"R34;R29;R7;R33;R35;R30;R9;R2;R12","9","","","100kR","","","","","","603-AC0402FR-13100KL"
|
||||||
|
"D5","1","","","DFLS1100","","","","","","621-DFLS1100-7"
|
||||||
|
"L1","1","","","220 uH","","","","","","SLF10145T-221MR65-PF"
|
||||||
|
"R37;R38;R32;R31;R19;R25;R26;R20;R28;R40;R41;R43;R42","13","","","10kR","","","","","","71-CRCW040210K0FKEDC"
|
||||||
|
"R39;R49","2","","","3R0","","","","","","603-AC0402FR-073RL"
|
||||||
|
"C49","1","","","22 uF 10V","","","","","","963-LMK212BBJ226MG-T"
|
||||||
|
"R3","1","","","2.0mR 5W","","","","","","66-OARSXPR002FLF"
|
||||||
|
"C50","1","","","22 uF","","","","","","963-JMK212ABJ226MG-T"
|
||||||
|
"C52;C51","2","","","1 uF","","","","","","963-EMK105BJ105KV-F"
|
||||||
|
"C54;C40;C22;C31;C28;C37;C39;C15;C53;C5;C13;C26;C41;C8;C6","15","","","0.1 uF","","","","","","80-C0402C104M4P"
|
||||||
|
"J2","1","","","Conn_01x03","","","","","","NoPart"
|
||||||
|
"R15;R21;R17","3","","","100kR 1%","","","","","","603-AC0402FR-13100KL"
|
||||||
|
"R16;R22;R18","3","","","10kR 1%","","","","","","71-CRCW040210K0FKEDC"
|
||||||
|
"C17;C23;C18","3","","","150 pF","","","","","","963-UMK105CG151JV-F"
|
||||||
|
"U2","1","","","MAX11138","","","","","","700-MAX11138ATI+"
|
||||||
|
"U3","1","","","ICE40UP5K-SG48","","","","","","842-ICE40UP5K-SG48I"
|
||||||
|
"C20","1","","","1 nF DNP","","","","","","NoPart"
|
||||||
|
"C19;C36","2","","","1 nF","","","","","","80-C0402C102K5R7411"
|
||||||
|
"R27;R44;R45;R46;R47;R48","6","","","100R","","","","","","603-AC0603FR-13100RL"
|
||||||
|
"C38;C16","2","","","10 nF","","","","","","80-C0402C103K5R7411"
|
||||||
|
"C42;C34;C21","3","","","10 uF DNP","","","","","","NoPart"
|
||||||
|
"C57;C58","2","","","47 uF","","","","","","80-T491B476K010"
|
||||||
|
"U6","1","","","RP111N121D-TR-FE","","","","","","848-RP111N121DTRFE"
|
||||||
|
"U7","1","","","RP111N331D-TR-FE","","","","","","848-RP111N331DTRFE"
|
||||||
|
"X1","1","","","ECS-3225MV-250-BN-TR","","","","","","520-3225MV-250-BNT"
|
||||||
|
"U5","1","","","W25X40CLSNIG","","","","","","454-W25X40CLSNIG"
|
||||||
|
"J4;J5","2","","","Conn_01x04","","","","","","NoPart"
|
||||||
|
"J3","1","","","Conn_01x08","","","","","","NoPart"
|
||||||
|
"D12;D11;D10;D9;D8;D7;D6","7","","","ESD5Z3.3T1G","","","","","","863-ESD5Z3.3T1G"
|
||||||
|
"D1;D3;D2","3","","","BAS40-04HMFHT116","","","","","","755-BAS40-04HMFHT116"
|
||||||
|
"Q1;Q2;Q3;Q4;Q5;Q6","6","","","IPC90N04S5L3R3ATMA1","","","","","","726-IPC90N04S5L3R3AT"
|
||||||
|
"R1","1","","","1kR","","","","","","71-CRCW06031K00FKEAC"
|
||||||
|
"C4","1","","","1.5 nF","","","","","","710-885012205062"
|
||||||
|
"H1;H2","2","","","MountingHole","","","","","","NoPart"
|
||||||
|
"J6","1","","","Conn_01x06","","","","","","NoPart"
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
Mouser,Quantity
|
||||||
|
647-UVZ1J471MHD,3
|
||||||
|
595-DRV8353RSRGZR,1
|
||||||
|
603-CC603KRX5R6BB105,1
|
||||||
|
963-JMK107ABJ106KA-T,7
|
||||||
|
81-GRM155R61H104KE9D,3
|
||||||
|
810-CGA2B2X5R1E473KA,1
|
||||||
|
603-CC402KRX5R5BB105,1
|
||||||
|
603-CC603KRX5R8BB105,1
|
||||||
|
603-CC603KRX5R7BB474,1
|
||||||
|
80-C0402C103K5R7411,1
|
||||||
|
603-AC0402FR-13100KL,9
|
||||||
|
621-DFLS1100-7,1
|
||||||
|
SLF10145T-221MR65-PF,1
|
||||||
|
71-CRCW040210K0FKEDC,13
|
||||||
|
603-AC0402FR-073RL,2
|
||||||
|
963-LMK212BBJ226MG-T,1
|
||||||
|
66-OARSXPR002FLF,1
|
||||||
|
963-JMK212ABJ226MG-T,1
|
||||||
|
963-EMK105BJ105KV-F,2
|
||||||
|
80-C0402C104M4P,15
|
||||||
|
603-AC0402FR-13100KL,3
|
||||||
|
71-CRCW040210K0FKEDC,3
|
||||||
|
963-UMK105CG151JV-F,3
|
||||||
|
700-MAX11138ATI+,1
|
||||||
|
842-ICE40UP5K-SG48I,1
|
||||||
|
80-C0402C102K5R7411,2
|
||||||
|
603-AC0603FR-13100RL,6
|
||||||
|
80-C0402C103K5R7411,2
|
||||||
|
80-T491B476K010,2
|
||||||
|
848-RP111N121DTRFE,1
|
||||||
|
848-RP111N331DTRFE,1
|
||||||
|
520-3225MV-250-BNT,1
|
||||||
|
454-W25X40CLSNIG,1
|
||||||
|
863-ESD5Z3.3T1G,7
|
||||||
|
755-BAS40-04HMFHT116,3
|
||||||
|
726-IPC90N04S5L3R3AT,6
|
||||||
|
71-CRCW06031K00FKEAC,1
|
||||||
|
710-885012205062,1
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,54 @@
|
||||||
|
import argparse
|
||||||
|
import csv
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description="Generates a Mouser BOM from Joost's KiCAD BOM")
|
||||||
|
parser.add_argument("input", help="input BOM")
|
||||||
|
parser.add_argument("output", help="output BOM")
|
||||||
|
parser.add_argument("--m", help="quantity multiplier", default="1")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
multiplier = 1 if args.m is None else int(args.m)
|
||||||
|
|
||||||
|
print("multiplier: {}".format(multiplier))
|
||||||
|
|
||||||
|
mouser_idx = None
|
||||||
|
count_idx = None
|
||||||
|
components = []
|
||||||
|
with open(args.input, 'r') as f:
|
||||||
|
reader = csv.reader(f)
|
||||||
|
parts = next(reader)
|
||||||
|
for i, part in enumerate(parts):
|
||||||
|
if 'Mouser' == part:
|
||||||
|
mouser_idx = i
|
||||||
|
elif 'Quantity' == part:
|
||||||
|
count_idx = i
|
||||||
|
|
||||||
|
if mouser_idx is None or count_idx is None:
|
||||||
|
print("Unable to find headers")
|
||||||
|
return
|
||||||
|
|
||||||
|
for i, parts in enumerate(reader):
|
||||||
|
if len(parts) < max(mouser_idx, count_idx):
|
||||||
|
print("[WARN] line {} is missing fields".format(i + 1))
|
||||||
|
continue
|
||||||
|
part_num = parts[mouser_idx]
|
||||||
|
count = parts[count_idx]
|
||||||
|
if len(part_num) == 0:
|
||||||
|
print("[WARN] line {} is missing part number".format(i + 1))
|
||||||
|
print(parts)
|
||||||
|
continue
|
||||||
|
if count == 0:
|
||||||
|
print("[WARN] line {} has zero quantity".format(i + 1))
|
||||||
|
if part_num == 'NoPart':
|
||||||
|
continue
|
||||||
|
components.append((part_num, count))
|
||||||
|
|
||||||
|
with open(args.output, 'w') as f:
|
||||||
|
# header is necessary if you don't want to miss the first part
|
||||||
|
f.write("Mouser,Quantity\n")
|
||||||
|
for c in components:
|
||||||
|
f.write("{},{}\n".format(c[0], multiplier*int(c[1])))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue