메뉴
HN
Hacker News 44일 전

클로드로 하드웨어 개발하기: SPICE와 오실로스코프 연동

IMP
6/10
핵심 요약

개발자가 하드웨어 개발에 Claude Code를 적용하며 SPICE 회로 시뮬레이터와 오실로스코프를 MCP로 연동한 경험을 공유했습니다. 자연어로만 복잡한 회로를 설계하는 데 한계를 느끼고, AI가 직접 측정 데이터를 읽고 분석할 수 있도록 피드백 루프를 구성한 것이 핵심입니다. 이를 통해 그동안 수작업으로만 진행하던 데이터 정규화 및 정렬과 같은 지루한 분석 작업을 크게 자동화했습니다.

번역된 본문

지난 몇 주 동안 저는 하드웨어 개발에 Claude Code를 사용하는 실험을 해왔습니다. 소프트웨어 개발에서 하는 것과 비슷한 방식, 즉 자연어로 프롬프트를 작성해서 Claude가 회로를 만들게 하는 프로젝트들을 살펴보았습니다. 하지만 제가 구축하고자 하는 것을 일상적인 영어로 표현하는 것이 다소 까다롭다는 것을 알게 되었습니다. 간단한 회로에서는 잘 작동했지만, 더 복잡한 설계에서는 어려워졌습니다. 또한 Claude Code는 즉각적인 피드백을 받을 때 진정으로 빛을 발한다는 것을 깨달았습니다.

그래서 저는 다른 접근 방식을 시도했습니다: Claude에게 오실로스코프와 SPICE 시뮬레이터에 대한 접근 권한을 부여한 것입니다. 이 방법은 SPICE 회로와 모델의 검증, 임베디드 프로그래밍 및 데이터 분석에 매우 유용해졌습니다. 특히 데이터 분석은 이전에는 매우 지루한 작업이었습니다. 시간 축을 정규화하고, 데이터를 정렬하는 등의 작업은 보통 대충 눈짐작으로만 처리하곤 했습니다.

아래는 제 설정과 워크플로우를 보여주기 위해 일부러 단순하게 구성한 데모입니다. 회로와 MCU(마이크로컨트롤러)는 아주 기초적입니다. 핵심은 이 접근 방식을 설명하는 것이며, 이 방식은 훨씬 더 복잡한 회로와 실제 임베디드 프로젝트로도 잘 확장됩니다.

몇 가지 얻은 교훈은 다음과 같습니다:

오실로스코프

  • Claude는 사용자의 물리적 설정(연결 상태 등)을 볼 수 없습니다. 무엇이 어디에 연결되어 있는지 AI가 추측하게 내버려 두지 마세요.
  • Claude가 오래되어 신선하지 않은 측정 데이터를 사용하지 않도록 주의하세요.
  • 원시 데이터를 Claude의 컨텍스트에 바로 덤프하지 마세요. 파일로 저장한 뒤 Claude가 간접적으로 상호작용하게 하세요.

마이크로컨트롤러

  • Claude에게 핀아웃/Pinmux 맵을 명시적으로 제공하세요.
  • build, flash, ping, erase와 같은 기능을 노출하는 Makefile을 준비하고, Claude가 이를 활용하도록 유도하세요. Claude가 이러한 명령어들을 그때그때 즉흥적으로 구성하게 두어서는 안 됩니다.

관련 저장소(Repos)

  • lecroy-mcp : LeCroy 오실로스코프를 위한 MCP 서버
  • spicelib-mcp : spicelib를 래핑하는 MCP 서버
  • rc-filter-demo-files : 영상에 사용된 데모 설정 파일
원문 보기
원문 보기 (영어)
I have been experimenting with using Claude Code for hardware development over the past few weeks. I looked at some projects that use Claude similarly to how one would in software development: Write a prompt in natural language, let Claude create a circuit. I found it somewhat tricky to express what I want to build in plain English. It worked fine for trivial circuits but became difficult for more complex designs. I also realized that Claude Code really shines when it can get immediate feedback. So I tried a different approach: give Claude access to my oscilloscope and a SPICE simulator. This has become extremely valuable for validating SPICE circuits and models, embedded programming, and data analysis. In particular the data analysis had been very tedious before: normalizing the time axis, aligning data, and so on. Usually I would just eyeball it. Below is a deliberately simple demo showcasing my setup and workflow. The circuit and MCU are trivial. The point is to illustrate the approach, which scales well to much more complex circuits and real embedded projects. A few lessons learned: Oscilloscope Claude doesn't see your physical setup. Don't let it guess what is connected where. Make sure Claude never gets stale measurement data. Don't dump raw data into Claude's context. Save it to a file and let Claude interact with it indirectly. Microcontroller Give Claude a pinout/pinmux map explicitly. Prepare a Makefile that exposes functions like build, flash, ping, and erase, and encourage Claude to rely on it. Claude should not construct these commands on the fly. Repos lecroy-mcp : MCP server for LeCroy oscilloscopes spicelib-mcp : MCP server wrapping spicelib rc-filter-demo-files : the demo setup from the video