{
  "family": "Power",
  "name": "L.1N",
  "rev": "a",
  "tile_id": 10,
  "json_version": "0.12",
  "updated_at": "2026-05-01T12:44:26.314Z",
  "headline": "1C Li-Ion charge manager w/ 1.8 & 3.3V out",
  "description": "Single-cell Li-ion/Li-poly/LiFePO₄ battery charging and power management tile built around the Nordic nPM1300 PMIC. Provides both 1.8V and 3.3V regulated outputs via high-efficiency buck converters rated to 200mA each. An unregulated VSYS rail is also available for loads that require direct battery voltage or higher current. USB-C power input with CC pins exposed for connection detection. Supports charging currents from 32 to 800 mA for batteries up to 1000 mAh, and has three on-board LEDs for state observation.",
  "application_notes": [
    {
      "sort": 0,
      "details": "Battery charging, if desired, must be enabled via firmware.",
      "heading": "Battery charging",
      "image_url": ""
    },
    {
      "sort": 1,
      "details": "Three onboard LEDs (red, yellow, green) driven by the nPM1300's LED outputs provide visual indication of charging and system status. Red is connected to LED0 (default = error reporting), yellow to LED1 (default = charge indication), and green to LED2 (default = host control).  The LED outputs must be enabled via firmware.",
      "heading": "LEDs",
      "image_url": ""
    },
    {
      "sort": 2,
      "details": "The two CC pads can be connected to the CC lines of a standard USB C input to detect the source power capability.  They have internal 5.1k pull-down resistors to conform to the standard for a sink device.  Upon connection and detection, the source capability is reported in the USBCDETECTSTATUS register.",
      "heading": "CC pads for USB C ",
      "image_url": ""
    },
    {
      "sort": 3,
      "details": "The default charging current limit is set to 100mA, and can be adjusted via firmware.",
      "heading": "Charging Current",
      "image_url": ""
    }
  ],
  "package": {
    "pads": 10,
    "type": "T44",
    "size_x": 4000,
    "size_y": 4000,
    "size_z": 0
  },
  "power": [
    {
      "max": 1.8,
      "min": 1.8,
      "type": "system",
      "notes": "",
      "gnd_pad": [
        "1"
      ],
      "function": "LDO",
      "direction": "output",
      "is_required": false,
      "max_current": "200mA",
      "positive_pad": [
        "10"
      ]
    },
    {
      "max": 3.3,
      "min": 3.3,
      "type": "system",
      "notes": "",
      "gnd_pad": [
        "1"
      ],
      "function": "LDO",
      "direction": "output",
      "is_required": false,
      "max_current": "200mA",
      "positive_pad": [
        "9"
      ]
    },
    {
      "max": 4.45,
      "min": 2.3,
      "type": "rechargeable battery",
      "notes": "programmable termination voltage between 3.5-4.45V",
      "gnd_pad": [
        "1"
      ],
      "function": "BATT",
      "direction": "input",
      "is_required": true,
      "max_current": "800mA (charge)",
      "positive_pad": [
        "7"
      ]
    },
    {
      "max": 5.5,
      "min": 3.4,
      "type": "charge",
      "notes": "100mA default limit, 500mA for standard USB, 1500mA for USB-C",
      "gnd_pad": [
        "1"
      ],
      "function": "CHG",
      "direction": "input",
      "is_required": false,
      "max_current": "1500mA",
      "positive_pad": [
        "6"
      ]
    },
    {
      "max": 5.5,
      "min": 2.3,
      "type": "system",
      "notes": "battery or charge voltage, whichever is higher",
      "gnd_pad": [
        "1"
      ],
      "function": "VSYS",
      "direction": "output",
      "is_required": false,
      "max_current": "1340mA",
      "positive_pad": [
        "8"
      ]
    }
  ],
  "components": [
    {
      "url": "https://www.nordicsemi.com/Products/nPM1300",
      "part": "NPM1300",
      "datasheet": "https://mosaic-component-datasheets.s3.eu-north-1.amazonaws.com/10/Nordic_Semiconductor-NPM1300.pdf",
      "manufacturer": "Nordic Semiconductor"
    }
  ],
  "pads": [
    {
      "pad": "1",
      "geometry": {
        "size_x": 1000,
        "size_y": 400,
        "center_x": -1500,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "common ground for the charger, battery, and output",
          "type": "power",
          "function": "GND",
          "direction": "input"
        }
      ]
    },
    {
      "pad": "2",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": 800
      },
      "functions": [
        {
          "note": "",
          "type": "other",
          "function": "CC1",
          "direction": ""
        }
      ]
    },
    {
      "pad": "3",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": 0
      },
      "functions": [
        {
          "note": "",
          "type": "other",
          "function": "CC2",
          "direction": ""
        }
      ]
    },
    {
      "pad": "4",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -800
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "I2C.CLK",
          "direction": "bidirectional",
          "interface": "I2C"
        }
      ]
    },
    {
      "pad": "5",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -1600
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "I2C.DAT",
          "direction": "bidirectional",
          "interface": "I2C"
        }
      ]
    },
    {
      "pad": "6",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -1600
      },
      "functions": [
        {
          "note": "charger input (4.0-5.5V recommended; 22V max)",
          "type": "power",
          "function": "CHG",
          "direction": "input"
        }
      ]
    },
    {
      "pad": "7",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -800
      },
      "functions": [
        {
          "note": "battery positive terminal",
          "type": "power",
          "function": "BATT",
          "direction": "bidirectional"
        }
      ]
    },
    {
      "pad": "8",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 0
      },
      "functions": [
        {
          "note": "system output voltage",
          "type": "power",
          "function": "VSYS",
          "direction": "output"
        }
      ]
    },
    {
      "pad": "9",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 800
      },
      "functions": [
        {
          "note": "normally-on 3.3V buck output",
          "type": "power",
          "function": "3V3",
          "direction": "output"
        }
      ]
    },
    {
      "pad": "10",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "normally-on 1.8V buck output",
          "type": "power",
          "function": "1V8",
          "direction": "output"
        }
      ]
    }
  ],
  "interfaces": [
    {
      "name": "I2C",
      "type": "I2C",
      "parameters": {
        "modes": [
          "slave"
        ],
        "addresses": [
          {
            "address": "0x6B"
          }
        ],
        "address_bits": [
          7
        ]
      },
      "pad_assignments": [
        {
          "pad": "4",
          "role": "bus",
          "function": "I2C.CLK"
        },
        {
          "pad": "5",
          "role": "bus",
          "function": "I2C.DAT"
        }
      ]
    }
  ],
  "twin": {
    "score": 1,
    "source": "// Digital twin for Power.L.1N — Nordic nPM1300 PMIC (battery charger + PMIC).\n//\n// A power *transform* tile: a USB charger input (CHG, pad 6) and a rechargeable\n// battery (BATT, pad 7) feed three outputs — a normally-on 3.3 V buck (pad 9), a\n// normally-on 1.8 V buck (pad 10), and the VSYS passthrough (pad 8, ≈ the higher\n// of CHG/BATT). The two bucks come up at fixed voltages set by the tile's VSET\n// pulldowns (VSET1 47 kΩ → 1.8 V, VSET2 330 kΩ → 3.3 V); firmware can override\n// them. Three on-board indicator LEDs (LED0 green, LED1 yellow, LED2 red) show\n// host / charging / error status.\n//\n// Topology, pad map, voltages and charge ranges are datasheet- and\n// tile-JSON-accurate (canonical). The current split between the CHG and BATT\n// supplies — and back-filling the battery draw from downstream loads — is a\n// solver/modeling choice (the actual downstream load lives on other tiles), so\n// the power layer is marked \"inferred\".\nimport type { SimState, TileSim } from '../tileSim';\n\nconst I2C_ADDR = 0x6b;\nconst QUIESCENT_UA = 10; // nPM1300 system quiescent (bucks in PFM, light load)\n\ninterface State {\n  // ── inputs (exercised via controls) ──\n  usb_connected: number; // CHG present (USB plugged in)\n  usb_mv: number; // CHG input voltage\n  batt_mv: number; // battery terminal voltage\n  battery_present: number; // a battery is attached\n  fault: number; // charger fault (NTC/die/safety-timer)\n  die_temp_c: number; // PMIC die temperature\n\n  // ── charger config ──\n  charging_enabled: number;\n  charge_current_ma: number; // CC level (32-800)\n  term_mv: number; // termination (full) voltage\n\n  // ── buck regulators (1 = VOUT1 1.8 V, 2 = VOUT2 3.3 V) ──\n  buck1_en: number;\n  buck2_en: number;\n  buck1_mv: number;\n  buck2_mv: number;\n\n  // ── indicator LEDs (mode: 0 ERROR, 1 CHARGING, 2 HOST, 3 unused) ──\n  led0_mode: number;\n  led1_mode: number;\n  led2_mode: number;\n  led0_host: number; // host-commanded on/off (effective in HOST mode)\n  led1_host: number;\n  led2_host: number;\n\n  [field: string]: number;\n}\n\n// charge-status bit masks (BCHGCHARGESTATUS)\nconst CHG_BATTERYDETECTED = 1 << 0;\nconst CHG_COMPLETED = 1 << 1;\nconst CHG_TRICKLE = 1 << 2;\nconst CHG_CC = 1 << 3;\nconst CHG_CV = 1 << 4;\n\n// LED mode codes (LEDDRVxMODESEL)\nconst LED_ERROR = 0;\nconst LED_CHARGING = 1;\nconst LED_HOST = 2;\n\nconst pick = (args: number[], i: number, cur: number) =>\n  args.length > i && Number.isFinite(args[i]) ? args[i] : cur;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.max(lo, Math.min(hi, v));\n\n// Is the charger actively pushing current into the battery?\nfunction charging(s: State): boolean {\n  return (\n    s.usb_connected === 1 &&\n    s.charging_enabled === 1 &&\n    s.battery_present === 1 &&\n    s.fault !== 1 &&\n    s.batt_mv < s.term_mv\n  );\n}\n\n// Battery full (termination reached) while a charge source is present.\nfunction complete(s: State): boolean {\n  return s.usb_connected === 1 && s.battery_present === 1 && s.batt_mv >= s.term_mv;\n}\n\n// Build the BCHGCHARGESTATUS byte from the modeled state.\nfunction chargeStatus(s: State): number {\n  let b = 0;\n  if (s.battery_present === 1) b |= CHG_BATTERYDETECTED;\n  if (complete(s)) b |= CHG_COMPLETED;\n  if (charging(s)) {\n    if (s.batt_mv < 3000)\n      b |= CHG_TRICKLE; // pre-charge a depleted cell\n    else if (s.batt_mv >= s.term_mv - 50)\n      b |= CHG_CV; // constant-voltage taper\n    else b |= CHG_CC; // bulk constant-current\n  }\n  return b;\n}\n\n// VSYS ≈ the higher of the two inputs (clamped to the PMIC's ~5 V system rail).\nfunction vsys(s: State): number {\n  return s.usb_connected === 1 ? clamp(s.usb_mv, 0, 5000) : s.batt_mv;\n}\n\n// Resolve an indicator LED to on/off given its mode + the auto signals.\nfunction ledOn(mode: number, host: number, isChg: boolean, isFault: boolean): number {\n  if (mode === LED_HOST) return host ? 1 : 0;\n  if (mode === LED_CHARGING) return isChg ? 1 : 0;\n  if (mode === LED_ERROR) return isFault ? 1 : 0;\n  return 0; // unused\n}\n\nconst sim: TileSim<State> = {\n  tile: 'Power.L.1N',\n\n  defaultState: {\n    usb_connected: 0,\n    usb_mv: 5000,\n    batt_mv: 3800,\n    battery_present: 1,\n    fault: 0,\n    die_temp_c: 25,\n\n    charging_enabled: 1,\n    charge_current_ma: 100,\n    term_mv: 4200,\n\n    buck1_en: 1,\n    buck2_en: 1,\n    buck1_mv: 1800,\n    buck2_mv: 3300,\n\n    led0_mode: LED_HOST,\n    led1_mode: LED_CHARGING,\n    led2_mode: LED_ERROR,\n    led0_host: 0,\n    led1_host: 0,\n    led2_host: 0,\n  },\n\n  controls: [\n    { type: 'toggle', field: 'usb_connected', label: 'USB connected (CHG)' },\n    {\n      type: 'slider',\n      field: 'batt_mv',\n      label: 'Battery voltage',\n      min: 3000,\n      max: 4450,\n      step: 10,\n      unit: 'mV',\n    },\n    { type: 'toggle', field: 'battery_present', label: 'Battery present' },\n    { type: 'toggle', field: 'charging_enabled', label: 'Charging enabled' },\n    {\n      type: 'slider',\n      field: 'charge_current_ma',\n      label: 'Charge current',\n      min: 32,\n      max: 800,\n      step: 2,\n      unit: 'mA',\n    },\n    { type: 'toggle', field: 'fault', label: 'Charger fault' },\n    {\n      type: 'slider',\n      field: 'die_temp_c',\n      label: 'Die temperature',\n      min: -20,\n      max: 125,\n      step: 1,\n      unit: '°C',\n    },\n    { type: 'toggle', field: 'led0_host', label: 'LED0 green (host)' },\n  ],\n\n  hostCalls: {\n    // ── lifecycle ──\n    tile_power_l_1n_find: () => ({ scalar: I2C_ADDR }),\n    tile_power_l_1n_init: () => ({\n      scalar: 0,\n      nextState: { led0_mode: LED_HOST, led1_mode: LED_CHARGING, led2_mode: LED_ERROR },\n    }),\n\n    // ── charger ──\n    tile_power_l_1n_charger_enable: ({ args }) => ({\n      nextState: { charging_enabled: pick(args, 0, 1) ? 1 : 0 },\n    }),\n    tile_power_l_1n_set_charge_current_ma: ({ state, args }) => ({\n      nextState: { charge_current_ma: clamp(pick(args, 0, state.charge_current_ma), 32, 800) },\n    }),\n    tile_power_l_1n_set_term_mv: ({ state, args }) => ({\n      nextState: { term_mv: clamp(pick(args, 0, state.term_mv), 3500, 4450) },\n    }),\n    tile_power_l_1n_get_charge_status: ({ state }) => ({ scalar: chargeStatus(state) }),\n    tile_power_l_1n_get_charge_error: ({ state }) => ({ scalar: state.fault ? 0x01 : 0 }),\n    tile_power_l_1n_is_charging: ({ state }) => ({ scalar: charging(state) ? 1 : 0 }),\n    tile_power_l_1n_is_charge_complete: ({ state }) => ({ scalar: complete(state) ? 1 : 0 }),\n    tile_power_l_1n_battery_present: ({ state }) => ({ scalar: state.battery_present }),\n\n    // ── measurements ──\n    tile_power_l_1n_get_vbat_mv: ({ state }) => ({ scalar: state.batt_mv }),\n    tile_power_l_1n_get_vsys_mv: ({ state }) => ({ scalar: vsys(state) }),\n    tile_power_l_1n_get_die_temp_c: ({ state }) => ({ scalar: state.die_temp_c }),\n\n    // ── buck regulators ──\n    tile_power_l_1n_buck_enable: ({ state, args }) => {\n      const buck = pick(args, 0, 1);\n      const on = pick(args, 1, 1) ? 1 : 0;\n      if (buck === 2) return { nextState: { buck2_en: on } };\n      if (buck === 1) return { nextState: { buck1_en: on } };\n      return { nextState: {} };\n    },\n    tile_power_l_1n_buck_set_mv: ({ state, args }) => {\n      const buck = pick(args, 0, 1);\n      const mv = clamp(pick(args, 1, 1800), 1000, 3300);\n      if (buck === 2) return { nextState: { buck2_mv: mv } };\n      if (buck === 1) return { nextState: { buck1_mv: mv } };\n      return { nextState: {} };\n    },\n\n    // ── indicator LEDs ──\n    tile_power_l_1n_led_set_mode: ({ state, args }) => {\n      const led = pick(args, 0, 0);\n      const mode = pick(args, 1, LED_HOST);\n      if (led === 0) return { nextState: { led0_mode: mode } };\n      if (led === 1) return { nextState: { led1_mode: mode } };\n      if (led === 2) return { nextState: { led2_mode: mode } };\n      return { nextState: {} };\n    },\n    tile_power_l_1n_led_set: ({ state, args }) => {\n      const led = pick(args, 0, 0);\n      const on = pick(args, 1, 0) ? 1 : 0;\n      if (led === 0) return { nextState: { led0_host: on } };\n      if (led === 1) return { nextState: { led1_host: on } };\n      if (led === 2) return { nextState: { led2_host: on } };\n      return { nextState: {} };\n    },\n\n    // ── misc ──\n    tile_power_l_1n_get_reset_cause: () => ({ scalar: 0 }),\n  },\n\n  provenance: {\n    // canonical — datasheet- / tile-JSON-accurate value or bit layout\n    tile_power_l_1n_find: 'canonical', // I2C 0x6B\n    tile_power_l_1n_get_charge_status: 'canonical', // BCHGCHARGESTATUS bit layout\n    tile_power_l_1n_is_charging: 'canonical',\n    tile_power_l_1n_is_charge_complete: 'canonical',\n    tile_power_l_1n_battery_present: 'canonical',\n    tile_power_l_1n_get_vbat_mv: 'canonical', // VBAT mV (FS 5.0 V)\n    tile_power_l_1n_get_vsys_mv: 'canonical', // VSYS = higher of inputs\n    tile_power_l_1n_get_die_temp_c: 'canonical', // die-temp transfer\n    tile_power_l_1n_set_charge_current_ma: 'canonical', // 32-800 mA range\n    tile_power_l_1n_set_term_mv: 'canonical', // 3.5-4.45 V range\n    tile_power_l_1n_buck_set_mv: 'canonical', // 1.0-3.3 V range\n    tile_power_l_1n_led_set_mode: 'canonical', // LEDDRVxMODESEL codes\n    // inferred — behavior follows obviously from the driver but isn't a datasheet number\n    tile_power_l_1n_charger_enable: 'inferred',\n    tile_power_l_1n_buck_enable: 'inferred',\n    tile_power_l_1n_led_set: 'inferred',\n    tile_power_l_1n_get_charge_error: 'inferred', // fault → nonzero code (reason bits not modeled)\n    // hallucinated — not really modeled\n    tile_power_l_1n_get_reset_cause: 'hallucinated', // always reports 0\n    power: 'inferred', // voltages/topology canonical; current split is a modeling choice\n  },\n\n  // On-board indicator LEDs (not tile pads): brightness 0..1 by mode + signals.\n  // LED0 green (host), LED1 yellow (charging), LED2 red (error).\n  padOutputs(state) {\n    const isChg = charging(state);\n    const isFault = state.fault === 1;\n    return {\n      'LED0(grn)': ledOn(state.led0_mode, state.led0_host, isChg, isFault),\n      'LED1(yel)': ledOn(state.led1_mode, state.led1_host, isChg, isFault),\n      'LED2(red)': ledOn(state.led2_mode, state.led2_host, isChg, isFault),\n    };\n  },\n\n  // Electrical layer. Inputs CHG (pad 6) / BATT (pad 7); outputs VSYS (pad 8),\n  // 3V3 buck (pad 9), 1V8 buck (pad 10). On USB the charge current + system\n  // quiescent are drawn from CHG and the battery receives charge; on battery the\n  // BATT supply omits i_ua so the solver back-fills it from the downstream loads\n  // on the output nets.\n  power(state) {\n    const usb = state.usb_connected === 1;\n    const isChg = charging(state);\n    const chargeUa = isChg ? state.charge_current_ma * 1000 : 0;\n    const rails = [] as NonNullable<ReturnType<NonNullable<TileSim<State>['power']>>['rails']>;\n\n    if (usb) {\n      rails!.push({\n        name: 'CHG',\n        role: 'supply',\n        v_mv: state.usb_mv,\n        i_ua: chargeUa + QUIESCENT_UA,\n        pads: ['6'],\n        note: isChg ? 'USB input — charging + system' : 'USB input',\n      });\n      rails!.push({\n        name: 'BATT',\n        role: 'supply',\n        v_mv: state.batt_mv,\n        i_ua: 0,\n        pads: ['7'],\n        note: isChg ? 'battery receiving charge' : 'battery idle',\n      });\n    } else {\n      // Discharging: battery sources the system; solver back-fills its current.\n      rails!.push({\n        name: 'BATT',\n        role: 'supply',\n        v_mv: state.batt_mv,\n        pads: ['7'],\n        note: 'battery input (discharging)',\n      });\n    }\n\n    rails!.push({\n      name: 'VSYS',\n      role: 'output',\n      v_mv: vsys(state),\n      pads: ['8'],\n      note: 'system (≈ higher of CHG/BATT)',\n    });\n    rails!.push({\n      name: '3V3',\n      role: 'output',\n      v_mv: state.buck2_en ? state.buck2_mv : 0,\n      pads: ['9'],\n      note: 'buck2 (normally-on 3.3 V)',\n    });\n    rails!.push({\n      name: '1V8',\n      role: 'output',\n      v_mv: state.buck1_en ? state.buck1_mv : 0,\n      pads: ['10'],\n      note: 'buck1 (normally-on 1.8 V)',\n    });\n\n    return { draw_ua: chargeUa + QUIESCENT_UA, rails };\n  },\n};\n\nexport default sim;\n",
    "status": "validated",
    "updated_at": "2026-06-21 17:32:58"
  },
  "config": {
    "usbCSource": {
      "kind": "boolean",
      "group": "USB",
      "label": "USB-C source-power detection",
      "binding": {
        "pad": "2",
        "kind": "intent"
      },
      "default": false,
      "options": [
        {
          "value": false,
          "firmware_contract": [
            {
              "text": "USB-C CC detection unused; pads 2/3 left unconnected",
              "type": "note"
            }
          ]
        },
        {
          "value": true,
          "netlist": {
            "expects": [
              {
                "to": {
                  "kind": "external",
                  "connector": "USB-C.cc1"
                },
                "tag": "usbCSource.cc1.attached",
                "from": {
                  "pad": "2",
                  "kind": "tile"
                },
                "role": "data"
              },
              {
                "to": {
                  "kind": "external",
                  "connector": "USB-C.cc2"
                },
                "tag": "usbCSource.cc2.attached",
                "from": {
                  "pad": "3",
                  "kind": "tile"
                },
                "role": "data"
              }
            ]
          },
          "firmware_contract": [
            {
              "via": "i2c",
              "type": "register",
              "value": "monitor",
              "register": "USBCDETECTSTATUS"
            }
          ]
        }
      ],
      "description": "When true, the CC pins (pads 2/3) are wired to a USB-C connector's CC1/CC2 lines so the PMIC can detect source power capability. When false, the pins are left unused."
    }
  },
  "features": {
    "led_red": {
      "kind": "led",
      "color": "red",
      "label": "Red LED",
      "control": {
        "via": "pmic_register",
        "signal": "LED0",
        "controller": "nPM1300"
      },
      "default_use": "charge error / fault indication"
    },
    "led_green": {
      "kind": "led",
      "color": "green",
      "label": "Green LED",
      "control": {
        "via": "pmic_register",
        "signal": "LED2",
        "controller": "nPM1300"
      },
      "default_use": "host control"
    },
    "led_yellow": {
      "kind": "led",
      "color": "yellow",
      "label": "Yellow LED",
      "control": {
        "via": "pmic_register",
        "signal": "LED1",
        "controller": "nPM1300"
      },
      "default_use": "charge indication"
    }
  },
  "image_url": "https://mosaic-component-datasheets.s3.eu-north-1.amazonaws.com/10/tile-image.jpg"
}