科研 Skill
电池选型与电源预算
battery-and-power
Builds an evidence-tagged power budget and sizes a manufacturable battery with pouch outline, seals, and derating. Use when sizing runtime, mAh, charging, or supply rails.
SKILL.md
Battery and power
This skill makes the energy side of a product honest. Its job is to stop the most common hardware fantasy: a battery shaped like the leftover space, credited with a phone's energy density, feeding a current nobody has measured.
Talk to the user in their language. Keep every file in English.
Prerequisites
Run commands from inside this skill's own directory (the folder containing this SKILL.md), since script and reference paths below (such as scripts/foo.py) are written relative to it, not to the project root.
Inputs
hw/requirements.md: runtime target, size limits, use pattern (how many hours a day in each mode), environment temperature.hw/architecture.md: power tree, rails, radios, peak loads.hw/bom.csv:supply_rail_v(rail name),key_specs(vdd=lo-hitokens),typ_current_ma,peak_current_ma.hw/mech/: the battery pocket outline (SVG or polygon) and its height, whenenclosure-engineerhas one. Otherwise, the size limits from the requirements.hw/parts/<MPN>.md: current figures with sources, fromelectronics-researcher.
Outputs
| File | Content |
|---|---|
hw/power/budget.input.json | the budget model: modes, duties, parts, rails, comparables, limits. Format: templates/power_budget.example.json |
hw/power/budget.json | results from scripts/power_budget.py |
hw/power/rails.json | shared rail table, owned by this skill (schema below) |
hw/power/battery.json, hw/power/battery.svg | results from scripts/battery_fit.py: outline, thickness, capacity range, top view |
hw/power/power.md | the human-readable power chapter (templates/power.md) |
hw/power/measurements/ | captures and notes, once measured |
Shared rail table: hw/power/rails.json
Each rail gives its voltage either as a range or as nominal ± tolerance in volts, plus its current limit. {"nom": 1.8, "tol": 0.05} spans 1.75–1.85 V.
{
"VSYS": {"min": 3.0, "max": 4.4, "max_ma": 125},
"1V8": {"nom": 1.8, "tol": 0.05, "max_ma": 150}
}
hw/bom.csv→supply_rail_vholds the rail name (1V8). A part on several rails lists them asVSYS|1V8, matched in order tovdd,vdd2, and so on.key_specsholds tokens such asvdd=1.7-3.6; vio=1.8; i2c=0x2C.- The budget input carries the same fields per rail, plus the regulator model (
typedirect|ldo|buck|boost,efficiency,iq_ma,off_modes).power_budget.py --rails-outwrites the table. scripts/check_rails.py hw/bom.csv hw/power/rails.jsonfails any part whose supply range does not contain its rail's full range. It is the toolkit's single rail implementation:specs-engineer'sbom_check.pyandelectronics-researcher'sbom_merge.pyimport it.
Workflow
- Collect the use pattern. Define the modes (for example active, record, stream, sync, idle, ship) and the fraction of a day spent in each. If the user does not know, propose a realistic pattern and log it as an
[assumption]inhw/decisions.md. - Write the budget input. Write
hw/power/budget.input.json, with one entry per part that draws current and one current per mode.- Every current carries an evidence tag (CONVENTIONS §6).
- Use the datasheet figure for the mode the firmware will really use: TX power, sample rate, flash program duty.
- Add comparables. Find 2–3 shipped products in the same category that publish battery capacity and runtime.
electronics-researchercan find them. Put them incomparables. Their average current (capacity × usable fraction / runtime) is the empirical case, and it often is 3–5× the bottom-up baseline. - Run the budget:
python3 scripts/power_budget.py hw/power/budget.input.json -o hw/power/budget.json --rails-out hw/power/rails.json- It reports four scenarios (optimistic, baseline, pessimistic, empirical), runtime when new and at end of life, the rated capacity needed, the largest contributors, and the peak checks.
- Exit code 2 means a peak limit was exceeded.
- Check the rails:
python3 scripts/check_rails.py hw/bom.csv hw/power/rails.json. Fix every failure in the architecture (another rail, a different part, a level shifter) and tellspecs-engineerthroughhw/state.json→open_questions. - Size the battery. Read
references/battery-reality.mdfirst.- Look for catalog cells that fit the pocket (§6 of the reference).
- Then run the fit:
python3 scripts/battery_fit.py --svg hw/mech/battery_pocket.svg --height <mm> --claimed-mah <current claim> --svg-out hw/power/battery.svg --json hw/power/battery.json- Inputs:
--rect W Lor--polygon file.jsoninstead of--svg.--steppedallows one step (custom cells only).--chem pouch-hvselects a high-voltage cell. - Exit code 1 means the claimed capacity is above the realistic range.
- Inputs:
- Show the user
battery.svg. Plan the product on the low end of the capacity range until a vendor quotes it.
- Close the loop. Compare the realistic capacity with the rated capacity each scenario needs. If the pessimistic or empirical case does not fit, present the options as a short table and recommend one:
- less runtime;
- a lower duty cycle or a lower-power mode;
- a different radio or codec;
- a larger product;
- a high-voltage or custom cell.
- Choose the charging method with
references/charging-options.md. Prefer methods that add no opening. Check the charge current against the cell's C-rate, and the charge time against the use pattern. - Plan the measurement with
references/measurement.md: instrument, firmware build, modes to capture, pass criteria. This plan is part of the gate. - Write
hw/power/power.mdfromtemplates/power.md. Add each decision tohw/decisions.mdand each question for the user tohw/state.json.
Gate
The next stage, especially any custom cell, mold or board-size freeze, starts only when all of these hold:
- Every current in the budget has an evidence tag. The four scenarios are reported.
- Every peak is below every limit in the chain: cell, protection, PMIC, regulators, brown-out drop.
-
check_rails.pypasses. - The battery is a shape a vendor makes (catalog, rectangle, or one step). Its capacity is the fit's realistic range, not a claim. The fit is shown as an SVG.
- The planned capacity covers the pessimistic or empirical case at end of life, or the user has accepted a lower runtime in
hw/decisions.md. - A measurement plan exists. Before a custom cell is ordered, a measured average current exists and passes (
references/measurement.md).
Taste and pitfalls
- Never fill leftover space with a blob-shaped cell. Draw a straight-edged rectangle. Consider a step only when the gain is large and the volume justifies a custom cell. If the user sketches an outline, honor its intent with straight segments and say what each curve costs.
- Never size a custom cell before measuring. Freezing the cell first and measuring later is a process inversion. It happened in a real project and forced a lower average current than had ever been shown.
- Do not trust a bottom-up budget alone. Show the empirical case next to it, even when it is uncomfortable.
- Small cells lose a large share to seals. At about 20 mm, seals and tabs take 25–40 % of the outline. Say so with the number.
- Thickness is a max dimension. Subtract the tolerance and the swelling, and never compress the cell.
- Check radio peaks against the PMIC's system-load limit, not only the battery's. One high-power radio can exclude a whole PMIC family.
- Do not promise compatibility with another company's charger or dock. They are proprietary.
- The battery fixes shipping and compliance work: UN38.3 for each cell design, IEC 62133-2, and EU rules on removable batteries (Battery Regulation Article 11, applying from February 2027). Add these as items for
compliance-planner. Do not decide them here. - Use exact, aligned numbers in tables and drawings. Write a range as
55–65 mAh [estimate], never as a bare70 mAh.
Bundled files
scripts/power_budget.py: budget, scenarios, runtime, required capacity, peak chain, rail table.scripts/battery_fit.py: largest straight-edged cell in a pocket (rectangle, JSON polygon or SVG path); conservative capacity range; SVG top view.scripts/check_rails.py: each IC's supply range againstrails.json.templates/power_budget.example.json: example budget input (a fictional BLE voice clip).templates/pocket.example.svg: example pocket outline in mm.templates/power.md: outline of the power chapter.references/battery-reality.md: cell types, densities, pouch anatomy, shapes, sizing, custom-cell economics, vendor RFQ.references/charging-options.md: charging methods, charge rules, peak current chain.references/measurement.md: instruments, procedure, gate, cell testing.
示例提示词
帮我根据功耗评估选一块合适的电池,并给出续航估算。
所属插件
安装该插件会一并获得同领域的 63 个 Skill / MCP。
同插件的其他科研 Skill
- ANDES电力系统动态仿真Runs ANDES power-system dynamic studies via PowerMCP: power flow, eigenvalue analysis, and time-domain simulation. Use for damping, stability, or oscillation-mode questions.
- FPGA比特流生成与烧录Generates a Xilinx FPGA bitstream and programs it over JTAG, or burns an MCS image into flash for power-on boot. Use when flashing a board or diagnosing boot failures.
- 硬件项目发布包组装Assembles a hardware release package (fab files, BOM/CPL, carts, assembly guide, hashed manifest) and runs a ready-to-build gate. Use before ordering prototypes.
- 时钟域交叉风险审查Audits clock-domain-crossing risk on an FPGA design and applies the smallest safe synchronizer or constraint fix. Use to resolve CDC violations before sign-off.
- 硬件产品认证合规规划Plans certifications a hardware product needs per target market (FCC, CE/RED, UKCA, battery/radio rules), with cost and lead-time estimates. Use before PCB or enclosure tooling.
- Vivado XDC时序约束编写Authors a Vivado XDC timing constraint set from scratch: clocks, I/O delays, and timing exceptions. Use first, before timing closure, on a design with no or incomplete constraints.
- N-1/N-2应急违规处置Playbook for N-1/N-2 contingency violations: ranks contingencies and proposes preventive and corrective actions. Use after a study shows voltage or thermal problems.
- 潮流计算不收敛诊断Playbook for power-flow convergence failures in PSS/E, PSLF, PowerWorld, pandapower, PyPSA, surge, or OpenDSS. Use when a case diverges or fails to solve.
- 硬件成本核算与采购Prices a hardware product at multiple volumes with one-time vs per-unit cost, landed cost per country, and sourcing leads. Use to estimate unit cost before a pitch.
- RTL仿真覆盖率收敛Measures RTL simulation code coverage and iteratively closes it toward a target by adding testbench stimulus. Use for a sign-off-grade coverage report.
- 配电网DER接纳能力治理Playbook for distribution DER hosting-capacity limits: voltage rise, reverse flow, and thermal limits from PV and storage. Use to estimate how much DER a feeder can host.
- 电子电路设计与审查Designs, audits, or corrects an electronic circuit from a brief, schematic, or netlist, checking power domains, reset sequencing, and ratings. Use for circuit review.
- 硬件可制造性红队审查Red-team audit that fix-loops a hardware project to ready-to-build, re-deriving parts, rails, battery physics, and cost. Use for a reality check before committing to a design.
- 电力系统动态稳定处置Playbook for dynamic stability problems: poor damping, angle instability, or sustained oscillations from eigenvalue or time-domain studies. Use after an unstable study result.
- Egret电力市场调度优化Runs Egret market/operations optimization (DC-OPF, AC-OPF, unit commitment) via PowerMCP. Use for cheapest dispatch, unit commitment, or congestion checks.
- 电子元器件选型核查Researches electronic components against primary sources: part numbers, datasheet limits, lifecycle, stock, and price breaks, one dossier per part. Use to verify or source a BOM.
- EMC电磁兼容预测试Plans grounding, shielding, and filtering for EMC/EMI, and runs an emissions pre-scan with a root-cause fix sequence. Use before a lab test or after a failed EMI scan.
- 产品外壳参数化建模Designs a hardware enclosure as parametric CAD with STEP/STL/GLB output, a DFM check, and Blender assembly validation. Use when designing a case or checking fit.
- 电网频率响应问题处置Playbook for frequency problems: low inertia, high RoCoF, weak primary response, or UFLS risk after loss of the largest unit. Use when a study flags frequency issues.
- FPGA RTL到比特流全流程Drives a Xilinx FPGA design end to end through RTL, simulation, synthesis, implementation, and bitstream, gated at every stage. Use to run the complete build flow in one pass.
- 硬件产品全流程总协调Leads a physical electronic product from idea to a doable design, coordinating specs, parts, battery, PCB, enclosure, render, and cost sub-skills. Use starting a hardware product.
- 硬件原理图与BOM审查Reviews hardware projects: checks schematics against datasheets, pin connections, and firmware-to-hardware alignment across KiCad/Altium files. Use for a design alignment check.
- FPGA ILA在线逻辑调试Inserts an Integrated Logic Analyzer, programs the board, arms a trigger, and reads captured waveforms on real FPGA hardware. Use when sim passes but the board fails.
- 新能源并网影响评估Playbook for screening the grid impact of a new generator, storage, or large-load interconnection. Use to check whether a given MW can connect and what upgrades it needs.
常见问题
电池选型与电源预算能做什么?
Builds an evidence-tagged power budget and sizes a manufacturable battery with pouch outline, seals, and derating. Use when sizing runtime, mAh, charging, or supply rails。
如何安装电池选型与电源预算?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「电池选型与电源预算」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
电池选型与电源预算需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
电池选型与电源预算经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。