К основному содержанию
скилл CX Codex

circuit-debugger — скилл для Claude Code: диагностика схем

Скилл circuit-debugger для Claude Code ведёт по проверкам питания, соединений и сигналов в схемах Arduino, ESP32 и RP2040. Помогает искать причины молчащих датчиков, неподвижных моторов и нагрева компонентов.

MIT 298 установок ★ 33 обновлён 2026-10-15

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add wedsamuel1230/embedded-engineering-skills --skill circuit-debugger -a claude-code
Открыть на GitHub

Что делает circuit-debugger

Скилл помогает искать неисправность по этапам: проверить питание мультиметром, прозвонить общую землю, измерить сигналы и подключать компоненты по одному. Отдельные проверки охватывают I2C, светодиоды, моторы и датчики; есть способ отличить проблему прошивки от аппаратной неисправности.

В комплекте скрипт scripts/generate_debug_sketch.py: он создаёт скетчи для I2C-сканера, проверки GPIO, ADC и PWM. Например, можно запустить uv run --no-project scripts/generate_debug_sketch.py --i2c --output i2c_scanner.ino. Для проверок прозвонкой и сопротивления цепь нужно обесточить; намеренно изолированные домены нельзя соединять ради показаний мультиметра.

Какие задачи решает

  • найти причину отсутствия питания на плате
  • проверить, отвечает ли устройство на шине I2C
  • отследить плавающий сигнал на выводе
  • выявить компонент, после подключения которого схема перестаёт работать
  • разделить аппаратную неисправность и сбой программы

Примеры запросов агенту

  • Проведи меня по проверке питания и земли на моей схеме ESP32.
  • Создай скетч для поиска устройств I2C и сохрани его как i2c_scanner.ino.
  • Помоги выяснить, почему датчик не отвечает: проверь питание, соединения и сигналы по шагам.

Как установить circuit-debugger

1Через Skills CLI (Vercel)

npx skills add wedsamuel1230/embedded-engineering-skills --skill circuit-debugger -a claude-code

2Вручную: положить файлы

~/.claude/skills/circuit-debugger/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/circuit-debugger/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о circuit-debugger

Как установить circuit-debugger в Claude Code?

Выполните npx skills add wedsamuel1230/embedded-engineering-skills --skill circuit-debugger -a claude-code. Файл скилла находится по пути ~/.claude/skills/circuit-debugger/SKILL.md.

Что делает circuit-debugger?

Помогает диагностировать схемы Arduino, ESP32 и RP2040: проверяет питание, землю и сигналы, а также предлагает поочерёдно изолировать компоненты.

Как создать скетч для проверки I2C?

Запустите uv run --no-project scripts/generate_debug_sketch.py --i2c --output i2c_scanner.ino. Скрипт создаст файл i2c_scanner.ino.

Исходный текст

SKILL.md · MIT
---
name: circuit-debugger
description: |
  Systematic hardware debugging guide for Arduino/ESP32/RP2040 circuits. Use when user reports: circuit not working, components getting hot, no power, intermittent failures, unexpected behavior, sensor not responding, LED not lighting, motor not spinning. Guides through power checks, continuity testing, signal tracing, and component isolation using multimeter techniques.
metadata: {triggers: "circuit failure, no power, hot component, sensor not responding, multimeter"}
---

# Circuit Debugger

Systematic approach to diagnosing hardware issues in maker projects.

## Resources

This skill includes bundled tools and references:

- **scripts/generate_debug_sketch.py** - Arduino sketch generator for I2C scanner, GPIO tester, ADC checker, PWM tester
- **references/measurement-procedures.md** - Comprehensive multimeter and oscilloscope guide

## Quick Start

**Generate I2C scanner:**
```bash
uv run --no-project scripts/generate_debug_sketch.py --i2c --output i2c_scanner.ino
```

**Generate GPIO tester:**
```bash
uv run --no-project scripts/generate_debug_sketch.py --gpio --pins 2,3,4,5 --output gpio_test.ino
```

**Generate all debug sketches:**
```bash
uv run --no-project scripts/generate_debug_sketch.py --all
```

**Interactive mode:**
```bash
uv run --no-project scripts/generate_debug_sketch.py --interactive
```

## Trigger Phrases
- "My circuit doesn't work"
- "Component is getting hot"
- "No power to the board"
- "Sensor not responding"
- "Intermittent/random failures"
- "Works sometimes, not others"

## Debugging Protocol

### Phase 1: Power System Check (Do First!)

**Visual Inspection (30 seconds)**
```
□ Check for smoke, burn marks, or melted plastic
□ Verify power LED on microcontroller is lit
□ Look for loose wires or cold solder joints
□ Confirm correct polarity on polarized components (LEDs, caps, diodes)
```

**Multimeter Tests (Set to DC Voltage)**
```
Test Point              | Expected Value  | If Wrong
------------------------|-----------------|------------------
VCC to GND on MCU       | 3.3V or 5V      | Check regulator, power source
Sensor VCC pin          | Match datasheet | Check wiring, broken trace
Motor driver VCC        | Logic + Motor V | Separate supplies needed?
Battery terminals       | Rated voltage   | Dead/discharged battery
```

**Common Power Issues:**
| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| No voltage anywhere | Disconnected power, blown fuse | Check continuity from source |
| Low voltage (< 4V when expecting 5V) | Overloaded supply, bad regulator | Reduce load, check current draw |
| Voltage drops under load | Undersized power supply | Calculate total current, upgrade PSU |
| Reverse polarity | Swapped wires | Check all connections, may have damaged components |

### Phase 2: Ground Continuity

**Check the design:** Non-isolated logic normally needs a shared reference.
Preserve intentional isolation; do not bond isolated/high-voltage domains just
to satisfy a continuity test. Power down before continuity/resistance tests.

```
Multimeter: Set to CONTINUITY (beep mode)

Test these pairs - ALL should beep:
□ Arduino GND ↔ Sensor GND
□ Arduino GND ↔ Motor driver GND  
□ Arduino GND ↔ Display GND
□ Arduino GND ↔ Power supply negative
□ All breadboard GND rails connected
```

**Ground Problems Cause:**
- Erratic sensor readings
- I2C/SPI communication failures
- Motors behaving randomly
- Displays showing garbage

### Phase 3: Signal Verification

**Digital Signals (Set multimeter to DC Voltage)**
```cpp
// Add this debug code to verify pin states
void debugPins() {
    Serial.println("=== Pin States ===");
    Serial.print("D2: "); Serial.println(digitalRead(2) ? "HIGH" : "LOW");
    Serial.print("D3: "); Serial.println(digitalRead(3) ? "HIGH" : "LOW");
    // Add more pins as needed
}
```

**Expected Readings:**
| Signal Type | HIGH | LOW | Floating (Bad!) |
|-------------|------|-----|-----------------|
| 5V Logic | 4.5-5.5V | 0-0.5V | 1-3V unstable |
| 3.3V Logic | 2.8-3.6V | 0-0.3V | 0.8-2V unstable |

**I2C Troubleshooting:**
```cpp
// Run this I2C scanner first
#include <Wire.h>

void setup() {
    Serial.begin(115200);
    Wire.begin();
    
    Serial.println("I2C Scanner");
    for (uint8_t addr = 1; addr < 127; addr++) {
        Wire.beginTransmission(addr);
        if (Wire.endTransmission() == 0) {
            Serial.print("Found device at 0x");
            Serial.println(addr, HEX);
        }
    }
}
void loop() {}
```

| I2C Problem | Check |
|-------------|-------|
| No devices found | SDA/SCL swapped? Pull-ups present? Correct address? |
| Address conflict | Two devices same address? Check AD0/AD1 pins |
| Intermittent | Weak pull-ups (try 4.7kΩ), long wires, noise |

### Phase 4: Component Isolation

**The Divide-and-Conquer Method:**
```
1. Disconnect ALL external components
2. Verify MCU works alone (blink LED)
3. Add ONE component at a time
4. Test after EACH addition
5. When failure occurs, problem is last added component
```

**Component-Specific Tests:**

**LEDs:**
```
□ Correct polarity? (long leg = anode = positive)
□ Current limiting resistor present? (330Ω-1kΩ typical)
□ Test LED alone with battery + resistor
□ PWM pin? Try digitalWrite first
```

**Motors/Servos:**
```
□ Never connect directly to MCU pin (use driver!)
□ Separate power supply for motors
□ Flyback diode on DC motors
□ Check stall current vs driver rating
```

**Sensors:**
```
□ Correct operating voltage (3.3V vs 5V!)
□ Level shifter needed for mixed voltage?
□ Decoupling capacitor (100nF) near VCC pin
□ Pull-up resistors for I2C (4.7kΩ typical)
```

### Phase 5: Software vs Hardware

**Quick Software Test:**
```cpp
// Minimal test - does the MCU even run?
void setup() {
    pinMode(LED_BUILTIN, OUTPUT);
    Serial.begin(115200);
    Serial.println("MCU is alive!");
}

void loop() {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(500);
    digitalWrite(LED_BUILTIN, LOW);
    delay(500);
    Serial.println("heartbeat");
}
```

| If This Works | If This Fails |
|---------------|---------------|
| Hardware likely OK, check your code | Check USB cable, bootloader, board selection |

## Quick Reference: Common Failures

| Symptom | First Check | Second Check | Third Check |
|---------|-------------|--------------|-------------|
| Nothing works | Power supply | USB cable | Board selection in IDE |
| Gets hot | Short circuit | Reversed polarity | Overcurrent |
| Works then stops | Power brownout | Overheating | Memory leak |
| Erratic behavior | Floating inputs | Missing grounds | Noise/interference |
| I2C fails | Pull-ups | Address | Wire length |
| Motor jerky | Power supply | PWM frequency | Driver current |

## Multimeter Quick Guide

```
Measurement    | Setting      | Probes
---------------|--------------|------------------
DC Voltage     | V⎓ (20V)     | Red=signal, Black=GND
Continuity     | ))) or Ω     | Either direction
Resistance     | Ω            | Component out of circuit!
Current        | A or mA      | IN SERIES (break circuit)
```

## When to Ask for Help

If after this protocol you still can't find the issue:
1. Take clear photos of your wiring
2. Draw a schematic (even hand-drawn)
3. List exact components with part numbers
4. Share your complete code
5. Describe what you expected vs what happened

## References
- See [references/multimeter-guide.md](references/multimeter-guide.md) for detailed measurement techniques
- See [references/common-mistakes.md](references/common-mistakes.md) for beginner pitfall gallery

## Shared Output Contract

Use [the shared Arduino skill contract](../../docs/arduino-skill-contract.md):
state assumptions, required tools and versions, implementation steps,
tests/evidence by proof stage, known limitations, and recovery/security notes.

© wedsamuel1230 · MIT · wedsamuel1230/embedded-engineering-skills

Похожие скиллы

Все скиллы по теме «Тесты и QA» →
iot-developer daffy0208 Скилл iot-developer помогает писать прошивки для микроконтроллеров, собирать веб-дашборды и настраивать обмен данными датчиков по протоколу MQTT. CX Codex +1 391установок ESP32 UI Library Development koradeh Промпт ESP32 UI Library Development включает роль разработчика встраиваемых систем и ведёт ИИ через проектирование UI-библиотеки для ESP32 по заданному стеку. GP ChatGPT ★ 178 201звёзд репо Build a UI Library for ESP32 koradeh Промпт Build a UI Library for ESP32 настраивает модель на роль разработчика встроенных систем для создания графической библиотеки под ESP32. Пригодится при проектировании рендеринга и обработки ввода с кнопок или тачскрина. GP ChatGPT ★ 178 201звёзд репо esp32-ai-agent-skill ezrover Плагин esp32-ai-agent-skill для Claude, который подбирает чип ESP32, проверяет назначение GPIO и генерирует код под Arduino и ESP-IDF. ★ 59звёзд репо nodrix decoded-cipher MCP-сервер nodrix управляет платами ESP32 и читает телеметрию с вашего Cloudflare-сервера через MCP. Помогает контролировать удалённое железо из чата с ассистентом. CX Codex +1 ★ 48звёзд репо Arduino MCP Server hardware-mcp MCP-сервер связывает ИИ-агента с Arduino: помогает находить платы, собирать и загружать скетчи, читать Serial и проверять безопасность распиновки. CX Codex +1 ★ 26звёзд репо

Из того же набора19

Весь набор →
arduino-project-builder Скилл arduino-project-builder для Claude Code: собирает полный Arduino-проект из требований — прошивку, датчики, приводы, сеть, питание — и выдаёт рабочую заготовку, не сниппет. CX Codex +1 588установок arduino-code-generator Скилл arduino-code-generator генерирует код на C++ для плат UNO, ESP32 и RP2040: от опроса датчиков и устранения дребезга кнопок до конечных автоматов и сохранения в EEPROM. CX Codex +1 460установок error-message-explainer Скилл error-message-explainer для Claude Code разбирает ошибки компиляции, загрузки, запуска и питания в Arduino-проектах. Объясняет сообщения IDE и платы и связывает их с исправлениями. CX Codex +1 206установок enclosure-designer Скилл enclosure-designer ведёт от «нужен корпус» до модели в OpenSCAD: уточняет замеры, ставит вырезы под разъёмы и подбирает толщину стенки под условия эксплуатации. CX Codex +1 189установок power-budget-calculator Скилл power-budget-calculator рассчитывает потребление тока и время работы от батареи для проектов на Arduino, ESP32 и RP2040. Помогает подобрать аккумулятор и настроить режимы сна. CX Codex +1 178установок datasheet-interpreter Скилл datasheet-interpreter достаёт из PDF-даташита распиновку, адрес I2C, тайминги и карту регистров — когда нужно быстро подключить модуль, а не писать драйвер. CX Codex +1 173установок bom-generator Скилл bom-generator собирает BOM для проектов на Arduino, ESP32 и RP2040: компоненты, количества, цены, поставщиков и предупреждения о совместимости. CX Codex +1 164установок battery-selector Скилл battery-selector помогает выбрать тип батареи и схему зарядки для проекта на Arduino, ESP32 или RP2040: от химии до расчёта ёмкости. CX Codex +1 163установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой