main
John Lauer Component record for ltc2945cms-pbf: files batch 3 16c3b96 23h ago
#!/usr/bin/env python3
"""Write page.json for adom/ltc2945cms-pbf from the build's own data (pins from the symbol create JSON, datasheet hash).
usage: page_json.py <page dir> <work dir>"""
import sys, json, hashlib, os
page, work = sys.argv[1:3]
c = json.load(open(os.path.join(work, "sym/symbol-create.json")))
pins = sorted([{k: p[k] for k in ("number", "name", "type", "group", "description")} for p in c["pins"]], key=lambda p: int(p["number"]))
ds = os.path.join(page, "docs/ltc2945cms-pbf-datasheet.pdf")
S = "ltc2945cms-pbf"
P = {
 "slug": S, "version": "0.1.0", "type": "hardware", "kind": "component", "org": "adom",
 "title": "LTC2945CMS#PBF - Wide Range I2C Power Monitor",
 "brief": "Analog Devices (Linear Technology) LTC2945CMS#PBF: wide range I2C power monitor, 0 V to 80 V current and voltage sensing, 12-bit ADC, 24-bit power, min/max and alerts, split SDA for opto-isolation, 0 C to 70 C, MSOP-12. KiCad, Fusion and Altium libraries, 3D model and datasheet.",
 "description": "Analog Devices (Linear Technology) LTC2945CMS#PBF: rail-to-rail I2C power monitor; measures the voltage across a high- or low-side sense resistor (102.4 mV full scale) with a 0 V to 80 V common mode, the supply or SENSE+ voltage (102.4 V full scale) and an auxiliary input (2.048 V), multiplies current and voltage into a 24-bit power value, stores minimum and maximum and alerts on limits; runs from 2.7 V to 80 V (shunt regulator above 80 V); commercial temperature grade, 12-lead plastic MSOP (MS12, 3.00 x 4.039 mm body, 0.65 mm pitch).",
 "license": "CC-BY-4.0",
 "tags": ["component", "ic", "power-monitor", "current-sense", "i2c", "adc", "analog-devices", "linear-technology", "msop-12"],
 "discovery_triggers": ["LTC2945CMS#PBF", "LTC2945CMS", "LTC2945", "LTC2945CMS-PBF", "I2C power monitor 80 V", "wide range power monitor MSOP-12"],
 "hero": {"type": "image", "path": "docs/hero.png"},
 "visibility": {"public": True},
 "component": {
  "mpn": "LTC2945CMS#PBF", "manufacturer": "Analog Devices",
  "package": "MSOP-12 (ADI/LTC MS12, drawing 05-08-1668 Rev A, 3.00 x 4.039 mm body, 0.65 mm pitch)",
  "pin_count": 12, "category": "Power management", "subcategory": "Current, voltage and power monitor (I2C)",
  "lifecycle": "Active",
  "datasheet": "https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2945.pdf",
  "product_page": "https://www.analog.com/en/products/ltc2945.html",
  "wiki_url": "https://wiki.adom.inc/adom/ltc2945cms-pbf",
  "body_size": {"x_mm": 3.0, "y_mm": 4.039, "z_mm": 1.1, "pitch_mm": 0.65},
  "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",
  "marking": {"lines": ["LTC2945", "CMS#PBF"], "virtual": True,
              "note": "Virtual identification mark (the orderable MPN), not ADI's real top marking. ADI marks the MS12 LTC2945 parts 2945 (datasheet Rev. D p.4, Part marking column).",
              "surface": "top", "colour": "light on black epoxy", "gate": "PASS", "provenance": "provenance/3d-model.json"},
  "variants": "README.md#ordering-variants",
  "pins": pins,
  "distributor_links": {
   "mouser": {"part": "584-LTC2945CMS#PBF", "url": "https://www.mouser.com/en/ProductDetail/Analog-Devices/LTC2945CMSPBF?qs=hVkxg5c3xu9Bwurjof%2F5lw%3D%3D", "stock": 78, "checked": "2026-10-21"},
   "digikey": {"part": "505-LTC2945CMS#PBF-ND", "url": "https://www.digikey.com/en/products/detail/analog-devices-inc/LTC2945CMS-PBF/3726462", "stock": 293, "checked": "2026-10-21"},
   "lcsc": False,
   "lcsc_note": "2026-10-21: JLCPCB/LCSC list no LTC2945CMS#PBF (the 0 C to 70 C grade). The industrial grade LTC2945IMS#PBF in the same MS12 package is C683688 (20 in stock at JLCPCB that day) and fits this footprint and symbol."},
  "provenance": {
   "datasheet": {"doc": "Analog Devices LTC2945 data sheet, Rev. D (June 2025)", "file": f"docs/{S}-datasheet.pdf",
                 "sha256": hashlib.sha256(open(ds, "rb").read()).hexdigest(), "pages": 35},
   "package_drawing": {"doc": "LTC DWG 05-08-1668 Rev A, MS Package 12-Lead Plastic MSOP", "file": "docs/05081668_a_ms12.pdf",
                       "sha256": hashlib.sha256(open(os.path.join(page, "docs/05081668_a_ms12.pdf"), "rb").read()).hexdigest()},
   "model_3d": "provenance/3d-model.json", "footprint": "provenance/footprint-check.json", "symbol": "provenance/symbol.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": "altium/LTC2945CMS-PBF.SchLib", "pcblib": "altium/LTC2945CMS-PBF.PcbLib", "provenance": "authored"}},
 "source": {"tool": "analog-devices", "url": "https://www.analog.com/en/products/ltc2945.html"}}
json.dump(P, open(os.path.join(page, "page.json"), "w"), indent=1, ensure_ascii=False)
print("OK page.json", len(pins), "pins")