"""Multilayer ceramic chip capacitor (MLCC) by EIA case size and KEMET chip thickness code: the ceramic body with a metal termination capping each end. Centred on the origin, seated on the XY plane, the length L (between the terminations) along X and the width W along Y. Dimensions from KEMET's C0G data sheets, listed in the README.""" from steve import Model size = "0805" # EIA case size (inch code) thickness = "DG" # KEMET chip thickness code (the part number's thickness, set by the capacitance and voltage) # Each entry: (length L, width W, termination band B), nominal, in mm. # KEMET "Surface Mount Multilayer Ceramic Chip Capacitors (SMD MLCCs), C0G Dielectric, 10 - 250 VDC (Commercial Grade)", C1003_C0G, # 8/21/2023 (copy hosted by Chip and Dip, static.chipdip.ru/lib/841/DOC042841891.pdf), page 2, "Dimensions - Millimeters (Inches)": # 0201 to 2225. # KEMET "... High Voltage C0G Dielectric, 500 - 10,000 VDC (Commercial Grade)", C1009_C0G_HV_SMD, 8/18/2023 (copy hosted by Chip and Dip, # static.chipdip.ru/lib/036/DOC043036585.pdf), page 2, "Dimensions - Millimeters (Inches)": 3640. CASES = { "0201": (0.60, 0.30, 0.15), "0402": (1.00, 0.50, 0.30), "0603": (1.60, 0.80, 0.35), "0805": (2.00, 1.25, 0.50), "1206": (3.20, 1.60, 0.50), "1210": (3.20, 2.50, 0.50), "1805": (4.50, 1.27, 0.60), "1808": (4.70, 2.00, 0.60), "1812": (4.50, 3.20, 0.60), "1825": (4.50, 6.40, 0.60), "2220": (5.70, 5.00, 0.60), "2225": (5.60, 6.40, 0.60), "3640": (9.10, 10.20, 1.27), } # Thickness code: (case size, chip thickness T nominal), mm. # C1003_C0G page 10, "Table 2A - Chip Thickness/Tape & Reel Packaging Quantities" (0201 to 2225); C1009_C0G_HV_SMD, "Table 2A" (3640). THICKNESS = { "AB": ("0201", 0.30), "BB": ("0402", 0.50), "BD": ("0402", 0.55), "CF": ("0603", 0.80), "CG": ("0603", 0.80), "CH": ("0603", 0.85), "DM": ("0805", 0.70), "DN": ("0805", 0.78), "DP": ("0805", 0.90), "DE": ("0805", 1.00), "DF": ("0805", 1.10), "DG": ("0805", 1.25), "EB": ("1206", 0.78), "EC": ("1206", 0.90), "ED": ("1206", 1.00), "EE": ("1206", 1.10), "EF": ("1206", 1.20), "EH": ("1206", 1.60), "FB": ("1210", 0.78), "FC": ("1210", 0.90), "FE": ("1210", 1.00), "FF": ("1210", 1.10), "FG": ("1210", 1.25), "FH": ("1210", 1.55), "FM": ("1210", 1.70), "FJ": ("1210", 1.85), "FK": ("1210", 2.10), "NC": ("1805", 1.00), "LF": ("1808", 1.00), "GB": ("1812", 1.00), "GD": ("1812", 1.25), "GH": ("1812", 1.40), "GG": ("1812", 1.55), "GK": ("1812", 1.60), "GJ": ("1812", 1.70), "GN": ("1812", 1.70), "GM": ("1812", 2.00), "HB": ("1825", 1.10), "HE": ("1825", 1.40), "HG": ("1825", 1.60), "JB": ("2220", 1.00), "JD": ("2220", 1.30), "JE": ("2220", 1.40), "JF": ("2220", 1.50), "JG": ("2220", 1.70), "JL": ("2220", 2.00), "KE": ("2225", 1.40), "MA": ("3640", 1.40), "MB": ("3640", 2.00), "MC": ("3640", 2.50), } # Proportions, for looks (the drawing shows the terminations as caps over the body's ends but doesn't dimension their thickness): each # termination is a cap 0.05 x T thick, over the ceramic body's end and, for the band B, its four sides. CAP = 0.05 if size not in CASES: raise ValueError(f"no case size {size!r}: {', '.join(CASES)}") if thickness not in THICKNESS or THICKNESS[thickness][0] != size: raise ValueError(f"no thickness code {thickness!r} for case size {size}: " f"{', '.join(k for k, v in THICKNESS.items() if v[0] == size)}") L, W, B = CASES[size] T = THICKNESS[thickness][1] c = CAP * T model = Model() model.plane("body_plane", on="XY", offset=c, name="Body") with model.sketch("body_sketch", on="body_plane", name="Ceramic body") as sk: sk.rect("body_rect", (-L / 2 + c, -W / 2 + c), (L / 2 - c, W / 2 - c)) model.extrude("body", "body_sketch", distance=T - 2 * c, op="new", body="body_body", name="Ceramic body") for side, sx in (("left", -1), ("right", 1)): with model.sketch(f"{side}_sketch", on="XY", name=f"Termination {side}") as sk: sk.rect(f"{side}_rect", (sx * (L / 2 - B), -W / 2), (sx * L / 2, W / 2)) model.extrude(f"{side}_cap", f"{side}_sketch", distance=T, op="new", body=f"{side}_body", name=f"Termination {side}") model.extrude(f"{side}_hollow", "body_sketch", distance=T - 2 * c, op="cut", body=f"{side}_body", name=f"Termination {side} hollow") # Materials, for looks and a rough mass: the body is ceramic dielectric with nickel electrodes (density about 5 to 6); titanium nitride, the # ceramic in the material list nearest in density (5.2), stands in for it, in the body's tan. The terminations are copper or nickel under # matte tin ("C = 100% Matte Sn", the part number's termination finish), shown as tin. model.material("titanium-nitride", bodies=["body_body"], color="#b89a6e") model.material("tin", bodies=["left_body", "right_body"], color="#c9ccd1") result = model.result()