AI-designed and AI-implemented Control Systems for Bespoke Scientific Instrumentation: Application to Scanning Microscopy
Abstract
The pace of innovation in custom scientific instrumentation is frequently bottlenecked by the complexity of software engineering. While hardware designs evolve rapidly, developing robust and integrated control systems remains resource-intensive and often exceeds the software expertise available in experimental laboratories. Here, we present an AI-assisted workflow for constructing and validating an integrated control system for a bespoke scientific instrument, demonstrated on the Scanning Helium Microscope (SHeM). We emphasise that this work does not develop or train new AI models; instead, we use publicly accessible, general-purpose Large Language Models (LLMs) as practical engineering tools. Using these models, we co-develop a modular software stack spanning hardware interfaces, communication middleware, scan control, and user interfaces. To reduce the risk of deploying AI-generated code to fragile hardware, we introduced a digital sandbox that emulates instrument behaviour and supports pre-deployment verification, together with cross-validation using a second LLM and mandatory human review. We demonstrate successful deployment on a physical SHeM for 2D imaging and diffraction measurements, with behaviour consistent with a manually developed control system. This work provides a reproducible and safety-oriented template for AI-assisted software engineering in bespoke scientific instrumentation.
Please wait while we load your content...