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