Validate a circuit model with scope measurements

Claude Code can compare a SPICE run with oscilloscope readings from the real circuit.

Done with Claude Code· Intermediate

What they did
Lucas Gerads set up Claude Code with two MCP connections: one for a LeCroy oscilloscope and one around spicelib for SPICE. He tested the workflow on a plain RC filter driven by a small microcontroller, and supplied a pin map plus a Makefile so the agent could build, flash, ping, and erase the firmware. From there, Claude produced the simulated response, pulled the measured signal, and checked them against each other.
How it went
The post says the method became very useful for checking SPICE circuits and models on actual hardware. It also cut out repetitive analysis work, especially stretching the timelines into alignment and matching the traces. The demo circuit was intentionally trivial, and no numerical results were given.
Tips
Give the agent a clear wiring description, since it cannot see how the bench is physically connected. Keep stale scope data out of the loop, and store raw waveforms in files rather than pasting them into context.

Try it yourself with Claude Code

I want to test a SPICE model against a physical setup. The simulation is at [file path], and an oscilloscope is reachable at [address] through MCP. Run the model, capture the live waveform for [signal name or node], and compare the two for timing, amplitude, and shape. Save the raw captures to files, align the results, and suggest any changes to the model. Before you alter hardware settings, flash firmware, drive the circuit, delete anything, or submit anything, stop and ask me to approve it. Wiring details: [describe connections].

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.