Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

battery-selector电池选择器

Agent Skill

battery-selector 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

470

周安装

20

GitHub Stars

13

下载量

165
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:battery-selector(电池选择器)
来源仓库:https://github.com/wedsamuel1230/arduino-skills
仓库路径:skills/battery-selector
安装命令:
npx skills add https://github.com/wedsamuel1230/arduino-skills --skill battery-selector
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wedsamuel1230/arduino-skills --skill battery-selector

简介

battery-selector 提供电池化学类型与充电电路选型指南,支持嵌入式项目设计。

  • 内置 15+ 种电池比较计算器与安全规范文档,辅助功耗与续航评估。
  • 可通过命令行或交互式界面输入电流与时长,推荐最优电池方案。
  • 安装命令:npx skills add https://github.com/wedsamuel1230/arduino-skills --skill battery-selector。
  • 选型结果仅供参考,实际应用前应进行原型测试与安全验证。

SKILL.md

Battery Selector

Guides battery chemistry and charging circuit selection for embedded projects.

Resources

This skill includes bundled tools and references:

  • scripts/compare_batteries.py - Battery comparison calculator with 15+ battery types
  • references/safety-guidelines.md - Comprehensive safety guide for all chemistries

Quick Start

Interactive selection:

uv run --no-project scripts/compare_batteries.py --interactive

Command line:

# Find battery for 50mA project, 24h runtime
uv run --no-project scripts/compare_batteries.py --current 50 --hours 24

# Require rechargeable
uv run --no-project scripts/compare_batteries.py --current 100 --hours 12 --rechargeable

# List all batteries in database
uv run --no-project scripts/compare_batteries.py --list

When to Use

  • "What battery should I use?"
  • "How do I charge this project?"
  • "Lithium vs alkaline?"
  • "Is this battery safe?"
  • Planning portable/battery-powered projects

Decision Flowchart

START
  │
  ▼
Is project rechargeable? ──No──► Alkaline/Lithium Primary
  │                              (Disposable batteries)
  Yes
  │
  ▼
What voltage does MCU need?
  │
  ├── 5V ──► LiPo + Boost converter
  │          OR 3x/4x NiMH
  │
  ├── 3.3V ──► Single LiPo (3.0-4.2V)
  │            Directly compatible!
  │
  └── 12V+ ──► Multi-cell LiPo pack
               OR Lead-acid
  │
  ▼
How much current?
  │
  ├── <50mA ──► Small LiPo (500-1000mAh)
  │             OR Coin cell (CR2032)
  │
  ├── 50-500mA ──► Standard LiPo (1000-3000mAh)
  │                OR 18650 cells
  │
  └── >500mA ──► Large LiPo (3000mAh+)
               OR Multiple 18650s
               External power recommended

Battery Chemistry Comparison

Quick Reference

ChemistryVoltageRechargeableEnergy DensityCostSafety
Alkaline1.5V/cellNoMediumLowVery safe
Lithium Primary3VNoHighMediumSafe
NiMH1.2V/cellYesMediumMediumSafe
LiPo/Li-ion3.7VYesVery HighMedium⚠️ Needs care
LiFePO43.2VYesHighHighSafer than LiPo
Lead-acid2V/cellYesLowLow⚠️ Acid hazard

Alkaline (AA/AAA/9V)

Pros:

  • Cheap, available everywhere
  • No charging circuit needed
  • Very safe
  • Long shelf life (5-10 years)

Cons:

  • Not rechargeable (e-waste!)
  • Voltage drops as discharged
  • Poor at high current
  • Heavy for capacity

Best For:

  • Low-power projects (<20mA average)
  • Beginner projects
  • Remote/deployment where charging impractical
  • Backup power

Voltage Configurations:

Cells   Voltage    Use With
────────────────────────────
2x AA   3.0V       3.3V MCUs (with LDO)
3x AA   4.5V       5V MCUs (direct or LDO)
4x AA   6.0V       5V MCUs (with regulator)
9V      9.0V       With 5V/3.3V regulator

NiMH (AA/AAA Rechargeable)

Pros:

  • Rechargeable (500-1000 cycles)
  • Same size as alkaline
  • Safer than lithium
  • No memory effect

Cons:

  • Lower voltage (1.2V vs 1.5V)
  • Self-discharge (~20%/month)
  • Need proper charger
  • Heavier than LiPo

Best For:

  • Projects replacing disposable batteries
  • Educational settings
  • Where LiPo is too risky
  • Budget rechargeable solution

Charging:

  • Use dedicated NiMH charger
  • Don't mix brands/capacities
  • Eneloop/Eneloop Pro recommended

LiPo / Li-ion (3.7V)

Pros:

  • High energy density (light + powerful)
  • Rechargeable (300-500 cycles)
  • Flat discharge curve
  • Many form factors

Cons:

  • ⚠️ Fire risk if abused
  • Needs protection circuit
  • Temperature sensitive
  • Ages even unused

Best For:

  • Most portable projects
  • Weight-sensitive applications
  • When you need runtime
  • Professional builds

Critical Safety Rules:

✅ DO:
- Use protected cells with BMS
- Store at 40-60% charge
- Use proper TP4056/similar charger
- Monitor temperature during charge
- Use battery with JST-PH connector (prevents polarity swap)

❌ DON'T:
- Puncture, crush, or bend
- Charge below 0°C
- Discharge below 3.0V
- Leave charging unattended (first few times)
- Use damaged/puffy batteries

LiFePO4 (3.2V)

Pros:

  • Much safer than LiPo (no thermal runaway)
  • Longer cycle life (2000+ cycles)
  • Flat discharge curve
  • Tolerates abuse better

Cons:

  • Lower energy density
  • Lower voltage (may need boost)
  • More expensive
  • Less common in small sizes

Best For:

  • Safety-critical applications
  • Outdoor/rugged deployments
  • Long-term installations
  • When LiPo risk unacceptable

CR2032 / Coin Cells

Pros:

  • Tiny and light
  • Long shelf life
  • 3V output (direct to 3.3V MCU)

Cons:

  • Very low capacity (220mAh)
  • Poor high-current performance
  • Not rechargeable
  • ⚠️ Danger if swallowed

Best For:

  • Ultra-low power only (<10µA average)
  • RTC backup
  • Tiny sensors
  • Keyfobs, beacons

Current Limits:

Continuous: <2mA
Pulse: <15mA (brief)

DON'T use for: WiFi, Bluetooth, motors, LEDs

Voltage Regulation

3.3V Systems (ESP32, RP2040)

Single LiPo → 3.3V:

LiPo outputs 3.0-4.2V
Most 3.3V MCUs tolerate this range directly!

Option 1: Direct connection (if MCU allows)
   LiPo(+) → 3.3V/VIN pin

Option 2: LDO for clean 3.3V
   LiPo(+) → [AMS1117-3.3] → 3.3V pin
   (Need 4V min input for AMS1117)

Better: Use HT7333 LDO (low dropout, low quiescent)
   Works from 3.3V input!

5V Systems (Arduino UNO/Nano)

LiPo → 5V:

Option 1: Boost converter
   LiPo(+) → [MT3608] → 5V → VIN pin

Option 2: PowerBoost module (Adafruit)
   Includes charging + boost + protection

Option 3: USB power bank
   Already regulated 5V + charging built-in

Charging Solutions

TP4056 Module (Most Popular)

┌─────────────────────────────┐
│  TP4056 with Protection     │
│                             │
│  [USB-C] ─► [TP4056] ─► [DW01+FS8205] ─► [B+/B-]
│   IN         Charger     Protection      To Battery
│                             │
│  Features:                  │
│  - 1A max charge current    │
│  - Overcharge protection    │
│  - Overdischarge protect    │
│  - Short circuit protect    │
│  - LED charge indicator     │
└─────────────────────────────┘

Wiring:
  B+ → LiPo positive
  B- → LiPo negative
  OUT+ → Load/MCU positive
  OUT- → Load/MCU negative

⚠️ Get module WITH protection (6 pins, not 4 pins)

Adafruit PowerBoost 500C/1000C

Premium solution with:

  • LiPo charging via USB
  • 5V boost output (500mA or 1A)
  • Low battery indicator
  • Load sharing (charge while running)

DIY Charging Don'ts

❌ Never charge LiPo with a constant voltage supply
❌ Never charge LiPo with a phone charger directly
❌ Never charge at >1C rate (e.g., 1000mAh → max 1A)
❌ Never charge frozen batteries

Battery Sizing Calculator

Step 1: Determine average current (from power-budget-calculator)
        I_avg = _____ mA

Step 2: Determine required runtime
        T_required = _____ hours

Step 3: Calculate minimum capacity
        C_min = I_avg × T_required × 1.25 (safety factor)
        C_min = _____ × _____ × 1.25
        C_min = _____ mAh

Step 4: Select battery
        Choose capacity ≥ C_min
        Consider: size, weight, form factor

Example:

Project: Weather station
I_avg: 15mA
T_required: 48 hours (2 days between charges)

C_min = 15 × 48 × 1.25 = 900mAh

Selection: 1000mAh LiPo (gives ~67 hours actual)

Common Mistakes

1. Using Wrong Charger

❌ "My 9V adapter should work"
   LiPo needs CC-CV charging at 4.2V max!

✅ Use TP4056 or dedicated LiPo charger

2. No Low-Voltage Cutoff

❌ Draining LiPo below 3.0V
   Permanently damages the cell!

✅ Use protection module OR monitor in code:
   if (batteryVoltage < 3.2) {
       enterDeepSleep();  // Protect battery
   }

3. Ignoring Inrush Current

❌ Battery can't handle WiFi TX spike (500mA)
   Causes brownout/reset

✅ Add 100-470µF capacitor near MCU
✅ Size battery for peak current, not just average

4. No Reverse Polarity Protection

❌ Swapping battery wires = magic smoke

✅ Use JST-PH connectors (keyed)
✅ Add protection diode or P-FET

Recommended Setups by Project Type

Low-Power Sensor Node

Battery: 18650 (3000mAh) or LiPo 2000mAh
MCU: ESP32 with deep sleep
Charger: TP4056 with protection
Runtime: Weeks to months

Handheld Device

Battery: LiPo 1000-2000mAh flat pack
MCU: Any
Charger: PowerBoost or TP4056 + boost
Runtime: Hours to days

Robot/High Current

Battery: 2S or 3S LiPo pack (7.4V or 11.1V)
Regulator: Buck converter to 5V
Charger: Balance charger (external)
Runtime: Minutes to hours

Ultra-Low Power Beacon

Battery: CR2032 or 2x AA
MCU: ESP32-C3 or ATtiny with deep sleep
No charger needed
Runtime: Months to years

Quick Selection Table

Project TypeBest BatteryCapacityCharger
Simple Arduino4x AA2500mAhNone
ESP32 portable186502600mAhTP4056
WearableSmall LiPo500mAhTP4056
Robot2S LiPo2200mAhBalance
Ultra-low powerCR2032220mAhNone
Solar projectLiFePO43200mAhMPPT

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.68%
按下载量换算54

Claude

27.49%
按下载量换算45

Cursor

20.97%
按下载量换算35

Gemini CLI

10.57%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills