Close

Claude runs the spectrometer over MCP, and the signal chain behind it

A project log for JASPER: VIS-NIR SPECTROMETER

Grating-based VIS-NIR Spectrometer: Customizable for spectral range, resolution, SNR, and detector options aided by a software design tool

tony-francisTony Francis • a day ago•0 Comments

This week we connected JASPER VIS-NIR Spectrometer to Claude through an MCP server. The video is a run on the bench:

The hardware is a work in progress: optics in the enclosure, electronics on a Renesas RA2A1 evaluation board on the bench. Optical optimisation is ongoing, so the x axis is still in pixels; wavelength calibration against Ne/Ar lines comes next.

Why the RA2A1

The RA2A1 is a microcontroller with an unusually complete analog section. One chip gives us the sensor timing, the conversion and the USB link, with no external ADC or USB bridge:

RA2A1 block

Role in JASPER

Status

16-bit SAR ADC, about 1 MSPS

Digitises the TCD1304 output, one conversion per pixel

In use

Timers with PWM

Generate the sensor drive signals: master clock, SH (integration) and ICG (transfer)

In use

USB full-speed

Streams frames to the PC as a CDC-ACM serial device

In use

12-bit DAC

Sets the offset (pedestal) reference in the signal chain

In use, and kept in the next revision

Three op-amps

Available on chip

In next version, the amplifier sits on the sensor board instead

Signal chain today

TCD1304 output (OS) -> transistor (PNP emitter-follower) buffer on the sensor board -> RA2A1 16-bit SAR ADC, single-ended, with the on-chip DAC setting the offset reference -> ping-pong buffers in SRAM -> USB CDC-ACM -> PC.

This works, with two limits we want to remove:

Next: two boards

Splitting the boards also means the sensor board can change (TCD1304 or Hamamatsu) without touching the MCU board.

Software side

Firmware frames go to a device service on the PC. The GUI, Python scripts and the MCP server all go through that one service, so they share live  state. The firmware reports its limits (integration time 16-10000 ms), and the plan is for the service to enforce them for every caller, including Claude.

We are designing this against Anthropic's Model Hardware Standard (modelhardwarestandard.com), where each device publishes what it measures, what can be changed and its safety limits, and the driver enforces them.

What we're building next :

  1. Method card: analyte, matrix and range checked against the instrument
  2. Live coverage meter against the sample plan
  3. Instrument health: dark drift, I-0 age, lamp, temperature, saturation
  4. Every spectrum stamped with its settings and events
  5. Outlier ledger: every exclusion with a reason and who decided
  6. Rolling PCA with T2 and Q during collection, not after
  7. Approval steps for calibration and firmware changes

Known issues

Discussions