Storing cryogenic samples in ultra-high vacuum

Reto Trappitsch

Annual Swiss RSE Day 2026
August 31, 2026

Cryostorage | Reto Trappitsch | Aug 31, 2026

Tracing biological processes with mass spectrometry

  • Biological samples: Water!
  • Cannot be analyzed as-is in ultra-high vacuum (UHV)
  • Traditional analysis: Substitution of soluble components
  • High-pressure freezing:
    • Vitrifies the sample
    • UHV-compatible if kept frozen
High-pressure vitrification enables analysis of pristine samples.

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Cryogenic sample preparation workflow

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

The CryoNanoSIMS: A unique instrument at EPFL

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Cryostorage: Storing samples between analyses

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

The components of our home-built storage system

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Using the chamber means controlling all components

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Home-built electronics using RaspberryPi Pico2

  • Control lights, valves, baking
  • Read flowmeter, valve states
  • Rust-based firmware:
  • Hardware safety:
    • Cooler and water flow
    • Transfer valve closing while dock connected is not possible

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Embassy (EMBedded ASYnc) enables maintainable firmware

  • #![no_std]
  • Supports many MCUs
    • STM32
    • NRF
    • RPi
    • ESP
    • ...
  • Provides network and USB stack
#[embassy_executor::main]
async fn main(spawner: Spawner) {
    // Initialize the embassy-nrf HAL.
    let p = embassy_nrf::init(Default::default());

    // Spawned tasks run in the background, concurrently.
    spawner.spawn(blink(p.P0_13.into()).unwrap());

    let mut button = Input::new(p.P0_11, Pull::Up);
    loop {
        // Asynchronously wait for GPIO events
        button.wait_for_low().await;
        info!("Button pressed!");
        button.wait_for_high().await;
        info!("Button released!");
    }
}

#[embassy_executor::task]
async fn blink(pin: Peri<'static, AnyPin>) {
    let mut led = Output::new(pin, Level::Low, OutputDrive::Standard);

    loop {
        // Timekeeping is globally available, no need to mess with hardware timers.
        led.set_high();
        Timer::after_millis(150).await;
        led.set_low();
        Timer::after_millis(150).await;
    }
}
Credit: embassy.dev
Cryostorage | Reto Trappitsch | Aug 31, 2026

Hardware safety makes me sleep better at night

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Closing the valve requires a 24 V pulse controlled by RPi

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Dock connected means Q7 remains open

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

What about the connected instruments?

center

Cryostorage | Reto Trappitsch | Aug 31, 2026

Talking to the connected instruments

  • Serial instruments

    • Mostly connected via Moxa
    • Drivers written with instrumentRs framework
    • Regularly polled for status
  • Pump stand: OPCUA server

    • Event based communication
    • Use existing opcua crate

center

Moxa converts serial ports to TCP/IP interfaces with fixed IPs.

Credit: moxa.com
Cryostorage | Reto Trappitsch | Aug 31, 2026

Hooking it all together: The host software

  • Runs on ReTerminal DM, which is based on a RPi CM4
    • Quad-core Cortex-A72, 1.5GHz
    • Runs RaspberryPi OS
    • UI via 10" touch screen
  • Talks to controller via poststation server using postcard-rpc
  • Async host software: tokio
    • Listen/poll for changes
    • Execute user commands
Cryostorage | Reto Trappitsch | Aug 31, 2026

A touch interface made with slint

  • User interface written in slint's own DSL
  • Interacts nicely with tokio
  • Four main screens:
    • Overview of system and samples
    • Temperature info/control
    • Vacuum info/control
    • Settings
  • Users can only run workflows!

center
center

Cryostorage | Reto Trappitsch | Aug 31, 2026

center

center

center

center

center

Conclusion: Rust is ideally suited for lab integrations

  • Full stack in one language: firmware, comms, and host software
  • Type system helps to develop without connected hardware
  • Cross-compilation for aarch64 with cross-rs

center

Oxidizing the code prevents samples from oxidizing by keeping the cool
Cryostorage | Reto Trappitsch | Aug 31, 2026

Do you want to build your own instrument drivers in Rust?

  • New rust framework: instrumentRs to write instrument drivers
  • Inspired by device-driver and instrumentkit
  • Drivers do not depend on interface
  • v0.1.0 developed for cryostorage project
  • Preview of instrumentrs v0.2.0
    • Specify your instrument in DSL (tbd)
    • Macro derive how new types are transported
    • Traits define the sync (and async) transport
Get in touch if you are interested!

v0.1.0

v0.2.0 development

Cryostorage | Reto Trappitsch | Aug 31, 2026

Thank you

center

A big thanks to Florent Plane and James Munns!

Contact

Cryostorage | Reto Trappitsch | Aug 31, 2026

<div class="columns">

<div {column-width: 1200px}>