main
John Lauer Component record TPS16850VMAR: files batch 1 6db00ed 20h ago
#!/usr/bin/env python3
"""Write page.json for adom/tps16850vmar from the symbol create JSON and the checked values.
usage: page_json.py symbol-create.json page_dir"""
import json, sys, hashlib, os
spec, P = json.load(open(sys.argv[1])), sys.argv[2]
S, MPN, D = "tps16850vmar", "TPS16850VMAR", "2026-10-21"
sha = lambda f: hashlib.sha256(open(os.path.join(P, f), "rb").read()).hexdigest()
pins = sorted(({k: p[k] for k in ("number", "name", "type", "group", "description")} for p in spec["pins"]), key=lambda p: int(p["number"]))
for p in pins:
    if p["number"] == "24": p["note"] = "exposed thermal pad (PowerPAD), electrically IN"
page = {
 "slug": S, "version": "0.1.0", "type": "hardware", "kind": "component", "org": "adom",
 "title": "TPS16850VMAR - 9 V to 80 V, 20 A eFuse",
 "brief": ("Texas Instruments TPS16850VMAR: 9 V to 80 V, 20 A stackable integrated hot-swap eFuse with a 3.5 mOhm FET, "
           "fast current monitor and auto-retry fault response, LQFN-CLIP-23 (VMA, 6.0 x 5.0 mm). KiCad symbol and footprint, "
           "Fusion and Altium libraries, datasheet-built 3D model and datasheet."),
 "description": ("Texas Instruments TPS16850VMAR: integrated hot-swap eFuse for 9 V to 80 V rails, 3.5 mOhm (typ) FET, 2 A to 20 A "
                 "adjustable circuit breaker, 73 A fixed fast trip, auto-retry, parallel operation with current sharing, analog "
                 "current and temperature monitors, LQFN-CLIP-23 (VMA0023A, 6.0 x 5.0 x 1.5 mm max)."),
 "license": "CC-BY-4.0",
 "tags": ["component", "ic", "power", "efuse", "hot-swap", "circuit-protection", "texas-instruments", "lqfn", "48v"],
 "discovery_triggers": ["TPS16850VMAR", "TPS16850", "TPS1685", "TPS1685x", "80 V eFuse", "20 A eFuse", "48 V hot-swap eFuse", "VMA0023A"],
 "hero": {"type": "image", "path": "docs/hero.png"},
 "visibility": {"public": True},
 "component": {
  "mpn": MPN, "manufacturer": "Texas Instruments",
  "package": "LQFN-CLIP-23 (TI VMA0023A, 6.0 x 5.0 mm, 1.5 mm max height)",
  "pin_count": 23, "category": "Power management", "subcategory": "Hot-swap controller / eFuse", "lifecycle": "Active",
  "datasheet": "https://www.ti.com/lit/ds/symlink/tps1685.pdf",
  "product_page": "https://www.ti.com/product/TPS1685/part-details/TPS16850VMAR",
  "body_size": {"x_mm": 6.0, "y_mm": 5.0, "z_mm": 1.5, "pitch_mm": 0.5},
  "parts": {"symbol": f"{S}.kicad_sym", "footprint": f"{S}.kicad_mod",
            "model_3d": f"{S}-hero.glb", "model_3d_plain": f"{S}-etched.glb",
            "model_3d_step": f"{S}-etched.step", "model_3d_step_plain": f"{S}.step",
            "step": f"{S}-etched.step", "lbr": f"{S}.lbr", "datasheet": f"docs/{S}-datasheet.pdf"},
  "viewers": {"symbol": "viewers/symbol.html", "footprint": "viewers/footprint.html"},
  "viewer_3d": {"ground": False, "animate": False, "shadows": False, "tooltips": "authored"},
  "models": "models.json", "lod": "lod/manifest.json", "verification": "verification.json",
  "heatsink_vias": f"artwork/{MPN}-heatsink-via.json",
  "marking": {"lines": ["TPS16850", "VMAR"], "virtual": True,
              "note": "Virtual identification mark (the orderable MPN), not TI's real marking. TI marks this part TPS16850 (SLVSHA1D p.50, Package Option Addendum).",
              "surface": "top", "colour": "light on dark grey mould", "gate": "PASS", "provenance": "provenance/3d-model.json"},
  "pins": pins,
  "distributor_links": {
   "mouser": {"part": "595-TPS16850VMAR", "url": "https://www.mouser.com/en/ProductDetail/Texas-Instruments/TPS16850VMAR?qs=3GbUB62Nf7feTcUOtfOsAg%3D%3D", "stock": 13048, "checked": D},
   "digikey": {"part": "296-TPS16850VMARTR-ND", "url": "https://www.digikey.com/en/products/detail/texas-instruments/TPS16850VMAR/29178296", "stock": 0, "checked": D},
   "lcsc": False,
   "lcsc_note": f"{D}: no LCSC/JLCPCB listing for TPS16850VMAR (adom-parts-search). JLCPCB lists the latch-off sibling TPS16851VMAR as C48705346, a different part."},
  "provenance": {
   "datasheet": {"doc": "TI SLVSHA1D (Rev. D, September 2024, revised July 2026), TPS1685x", "file": f"docs/{S}-datasheet.pdf",
                 "sha256": sha(f"docs/{S}-datasheet.pdf"), "pages": 57, "url": "https://www.ti.com/lit/ds/symlink/tps1685.pdf"},
   "model_3d": "provenance/3d-model.json", "footprint": "provenance/footprint-check.json"}},
 "dependencies": {},
 "eda_assets": {
  "kicad": {"symbol": f"{S}.kicad_sym", "footprint": f"{S}.kicad_mod", "model": f"{S}-etched.step", "provenance": "authored"},
  "fusion": {"lbr": f"{S}.lbr", "provenance": "authored"},
  "altium": {"schlib": f"altium/{MPN}.SchLib", "pcblib": f"altium/{MPN}.PcbLib", "provenance": "authored"}},
 "source": {"tool": "texas-instruments", "url": "https://www.ti.com/product/TPS1685/part-details/TPS16850VMAR"},
}
json.dump(page, open(os.path.join(P, "page.json"), "w"), indent=1)
print("OK page.json", len(pins), "pins")