# KiCad IR Drop Analysis (`firedanceio/kicad-irdrop`) Actor

DC voltage drop (IR drop) on the power rails of a KiCad board: worst and median voltage drop across the load pins, which pin is worst, and current-density maps, solved on the real copper.

- **URL**: https://apify.com/firedanceio/kicad-irdrop.md
- **Developed by:** [Firedance](https://apify.com/firedanceio) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $200.00 / 1,000 rail solveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## KiCad IR Drop Analysis

Find out how much voltage your power rails lose in the copper before it reaches the chip. Upload a KiCad board,
name the rail, its source and the load current, and get the worst and median voltage drop across the load pins, which
pin is worst, and current-density maps, solved on the board's real copper: filled pours, tracks, pads and the barrel
of every via.

- **Worst and median drop** at the load pins, and the effective resistance of the rail
- **Budget check** against a share of the nominal voltage (2 % by default)
- **Vias over their IPC-2221 current rating**, and the busiest ones
- **Peak current density** and where the loss happens
- **Current-density maps** per layer (PNG): see the neck in your pour at a glance

### Your board

Upload the `.kicad_pcb` file or a `.zip` of the KiCad project, or paste a URL to either (a raw GitHub link works). If
the zip holds several boards, name the one to check. The form opens with an open-source example board filled in:
[Antmicro's LPDDR4 test board](https://github.com/antmicro/lpddr4-test-board) (Apache-2.0), so you can try it first.

### Rails

One rail per line: `NET:SOURCE:AMPS:LOADS:SENSE:VNOM`

| Part | Meaning | Example |
|---|---|---|
| NET | the power net | `1V0_SYS` |
| SOURCE | the part that feeds it: the buck's inductor, an LDO, a 0 ohm link | `R147` |
| AMPS | total load current | `2` |
| LOADS | load parts joined with `+` (optional, default U1) | `U3` |
| SENSE | the regulator's feedback part (optional): the drop the load sees is measured from it | |
| VNOM | nominal volts (optional): turns on the budget check | `1.0` |

The example `1V0_SYS:R147:2:U3::1.0` gives: worst 5.3 mV at U3.J15, R_eff 2.67 mOhm, within its 20 mV budget.

### Output

One row per rail in the dataset, the full text report, the results as JSON and the maps in the key-value store.

### Pricing

**$0.20 per rail solved.** Rails that fail to solve aren't charged. Platform usage is included.

### Open source

This Actor runs [kicad-irdrop](https://github.com/firedanceio/kicad-irdrop), which you can also run on your own machine
with the Python that ships with KiCad.

### Notes

- Your board is processed in the run and kept only in your own Apify storage. Nothing is shared.
- KiCad 6 to 10 boards work (the Actor runs KiCad 10).
- Built by [Firedance](https://firedance.io), who make FirePod, a speaker that syncs smart lights to music. More of our
  open source tools: [firedance.io/open-source](https://firedance.io/open-source/).

# Actor input Schema

## `board` (type: `string`):

Upload your .kicad_pcb file or a .zip of the KiCad project, or paste a URL to one (for example a raw GitHub link). KiCad 6 to 10 boards work.

## `boardFile` (type: `string`):

Only needed when the zip holds more than one .kicad_pcb: its file name, e.g. main.kicad_pcb.

## `rails` (type: `array`):

One rail per line as NET:SOURCE:AMPS:LOADS:SENSE:VNOM. NET is the power net, SOURCE the part that feeds it (inductor, LDO or 0 ohm link), AMPS the load current. Optional: LOADS (load parts joined with +, default U1), SENSE (the regulator's feedback part) and VNOM (nominal volts, enables the budget check). Example: 1V0_SYS:R147:2:U3::1.0

## `budgetPct` (type: `integer`):

Flag rails whose worst drop is over this share of VNOM.

## `gridMm` (type: `string`):

Raster grid for the copper. Halve it to check the answer has converged.

## `filledVias` (type: `boolean`):

Treat every via as filled with copper instead of plated.

## `maps` (type: `boolean`):

Save a PNG per net and layer showing where the current flows (blue low, red high).

## `refillZones` (type: `boolean`):

Refill every copper pour with KiCad before the check. Turn on if you saved the board with unfilled or stale zones.

## Actor input object example

```json
{
  "board": "https://raw.githubusercontent.com/antmicro/lpddr4-test-board/5c8b5d3c27d6f3e802dc2d9022a1b1e87b725e5b/lpddr4-test-board.kicad_pcb",
  "rails": [
    "1V0_SYS:R147:2:U3::1.0"
  ],
  "budgetPct": 2,
  "gridMm": "0.05",
  "filledVias": false,
  "maps": true,
  "refillZones": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `report` (type: `string`):

No description

## `files` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "board": "https://raw.githubusercontent.com/antmicro/lpddr4-test-board/5c8b5d3c27d6f3e802dc2d9022a1b1e87b725e5b/lpddr4-test-board.kicad_pcb",
    "rails": [
        "1V0_SYS:R147:2:U3::1.0"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("firedanceio/kicad-irdrop").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "board": "https://raw.githubusercontent.com/antmicro/lpddr4-test-board/5c8b5d3c27d6f3e802dc2d9022a1b1e87b725e5b/lpddr4-test-board.kicad_pcb",
    "rails": ["1V0_SYS:R147:2:U3::1.0"],
}

# Run the Actor and wait for it to finish
run = client.actor("firedanceio/kicad-irdrop").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "board": "https://raw.githubusercontent.com/antmicro/lpddr4-test-board/5c8b5d3c27d6f3e802dc2d9022a1b1e87b725e5b/lpddr4-test-board.kicad_pcb",
  "rails": [
    "1V0_SYS:R147:2:U3::1.0"
  ]
}' |
apify call firedanceio/kicad-irdrop --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,firedanceio/kicad-irdrop"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Jw78OkupR5Kagf6df/builds/KWm5zcbvA6XfzFnVY/openapi.json
