Agents In Use
What’s new todayLast update
108 use cases added today

Claude Code compares SPICE with oscilloscope data

Lucas Gerads reports connecting Claude Code to a LeCroy oscilloscope and ngspice so it could compare a simulated RC filter with real measurements and align the data.

Source published lucasgerads.comAgent: Claudevia Claude Code
OUR ADAPTATION

Suggested prompt

Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.

Using my supplied RC filter netlist, pin map and wiring description, run the simulation and acquire fresh scope data through the configured tools. Align the waveforms, compare them and flag discrepancies for my review.

Evidence at a glance

Sourced account
Source author
Lucas Gerads
Original account
Read the source ↗
Published
Source link checked
Reported result
Lucas Gerads reports connecting Claude Code to a LeCroy oscilloscope and ngspice so it could compare a simulated RC filter with real measurements and align the data.
Human involvement
Gerads draws the circuit, supplies physical connections and inspects results. He reports false match claims and questionable UART choices, and does not let Claude build entirely by itself.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  1. Gerads draws the circuit and gives Claude Code its SPICE netlist and physical connection details.
  2. Claude Code accesses ngspice through spicelib MCP and the LeCroy oscilloscope through its separate MCP server.
  3. It works with saved measurement data to normalize time axes and align simulated and measured signals.

Lucas Gerads connected Claude Code to a SPICE simulator and his oscilloscope to give hardware work an external feedback loop. Rather than asking the agent to invent a circuit from a prose description, he drew the circuit himself and supplied its SPICE netlist. He reports that comparing the model with physical measurements became much easier.

His published example is deliberately simple. The linked repository contains an ATtiny1614 program with PWM output, an RC low-pass filter netlist and a Makefile for building and flashing. Separate MCP servers connect Claude Code to a LeCroy oscilloscope and spicelib with ngspice. The workflow brings simulated and measured data together, including time-axis normalization and alignment that Gerads had previously handled by eye.

The account supplies practical boundaries. Claude cannot see the physical wiring, so connections must be stated explicitly. Measurements must be fresh. Large waveform data should stay in files for tool-based analysis instead of being dumped into the model's context. The microcontroller also needs an explicit pin map and prepared build and flash commands.

In the linked discussion, Gerads also reports false claims that the simulation matched and questionable choices such as bit-banging instead of using UART. He therefore does not let Claude build entirely by itself. He publishes no numerical accuracy or time-saving benchmark. The evidence supports a working comparison setup and an inspection workflow, with the human remaining responsible for the circuit and its physical connections.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Blog · Lucas Gerads

Frequently asked questions

Who designed the circuit in the reported workflow?

Gerads says he draws the circuit himself and supplies the SPICE netlist to Claude Code.

What hardware does the demo use?

The linked demo uses an ATtiny1614, a PWM output and an RC low-pass filter measured with a LeCroy oscilloscope.

Why keep waveform data in files?

Gerads advises against filling the model context with raw data and says the agent should interact with saved data indirectly.

More details

Remaining steps

  1. Gerads uses the comparison to check his circuit model and physical setup rather than relying only on a visual estimate.

About this account

Claude Code uses simulator and instrument tools, then works with waveform files to compare the model against physical measurements.

Firsthand account opened and read, with linked project documentation where available. Outcomes are author reports, not independently reproduced. Suggested prompt written by Agents In Use. No numerical accuracy or speed benchmark. Physical wiring and circuit design remain human responsibilities; simple demo does not establish general circuit-design reliability.

Credit: Lucas Gerads

Source published

Added to Agents In Use

Source checked

Tools and topics

Claude Code · LeCroy oscilloscope · ngspice · spicelib MCP

Claude Code · LeCroy oscilloscope · ngspice

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.