rusty-tip
Rust library and tools for automated STM/AFM tip preparation on Nanonis SPM systems.
Overview
rusty-tip provides automated tip conditioning for Scanning Probe Microscopy (SPM) systems. It connects to Nanonis controllers via TCP and implements tip preparation algorithms with configurable pulse strategies and stability verification.
Features
- Automated Tip Preparation - State machine that detects tip quality and applies conditioning pulses
- Multiple Pulse Strategies - Fixed voltage, adaptive stepping, or linear mapping based on signal response
- Stability Verification - Optional bias sweep testing to confirm tip stability
- Real-time Monitoring - TCP data logging with signal history tracking
- CLI and GUI Applications - Both command-line and graphical interfaces
- Configurable - TOML configuration with environment variable overrides
Installation
Pre-built Binaries
Download from GitHub Releases:
- Linux:
rusty-tip-x86_64-unknown-linux-gnu.tar.xz - Windows:
rusty-tip-x86_64-pc-windows-msvc.zip
Each archive contains:
tip-prep/tip-prep.exe- Command-line tooltip-prep-gui/tip-prep-gui.exe- Graphical interface
From Source
# CLI only
# With GUI
As a Library
Usage
CLI (tip-prep)
Options:
--config <FILE>- Path to TOML configuration file (required)--log-level <LEVEL>- Override log level: trace, debug, info, warn, error
GUI (tip-prep-gui)
Launch the application and load a configuration file via the file dialog. The interface provides:
- Control Tab - Start/stop preparation, live status display
- Configuration Tab - Edit all parameters before running
Configuration
Configuration uses TOML format. See configs/ for examples.
Minimal Example
[]
= "127.0.0.1"
= [6501, 6502, 6503, 6504]
[]
= 6590
= 2000
[]
= [-1.5, 0.0] # Frequency shift range for "sharp" (Hz)
= 10000
= 12000
= -0.5
= 100e-12
[]
= "fixed"
= 4.0
= "positive"
Pulse Methods
Fixed - Constant voltage pulses:
[]
= "fixed"
= 4.0
= "positive" # or "negative"
Stepping - Increases voltage after repeated failures:
[]
= "stepping"
= [2.0, 6.0]
= 4
= 2
= 0.1
Linear - Voltage scales with current signal:
[]
= "linear"
= [2.0, 7.0]
= [-20.0, 0.0] # Map freq_shift range to voltage range
Stability Checking
Optional verification that the tip remains stable under bias sweeps:
[]
= true
= 0.4 # Max allowed freq_shift change (Hz)
= [0.2, 2.0] # Sweep range (V)
= 1000
= 200
= "both" # "positive", "negative", or "both"
Full Configuration Reference
[]
= "127.0.0.1"
= [6501, 6502, 6503, 6504]
= "./layout.lyt" # Optional
= "./settings.ini" # Optional
[]
= 6590
= 2000
[]
= true
= "./experiments"
[]
= "info"
[]
= [-1.5, 0.0]
= 10000
= 12000
= -0.5
= 100e-12
[]
= true
= 0.4
= [0.2, 2.0]
= 1000
= 200
= 100
= "both"
[]
# See pulse method examples above
Library Usage
use ;
// Connect to Nanonis
let client = new?;
let mut driver = new;
// Execute actions
driver.execute?;
driver.execute?;
driver.execute?;
driver.execute?;
Available Actions
| Category | Actions |
|---|---|
| Signals | ReadSignal, ReadSignals, ReadSignalNames, ReadBias, SetBias |
| Positioning | ReadPiezoPosition, SetPiezoPosition, MovePiezoRelative, MoveMotor3D |
| High-level | AutoApproach, Withdraw, SafeReposition, BiasPulse, TipShaper |
| Analysis | CheckTipState, CheckTipStability, GetStableSignal |
| Scanning | ScanControl, ReadScanStatus |
| Oscilloscope | ReadOsci |
How It Works
The tip preparation follows a state machine:
-
Blunt - Tip quality below threshold
- Apply voltage pulse
- Reposition (withdraw, move, approach)
- Check if now sharp
-
Sharp - Tip quality within bounds
- Verify with multiple repositions
- If stability checking enabled: perform bias sweep
- If stable, mark complete; otherwise pulse and return to Blunt
-
Stable - Preparation complete
Requirements
- Nanonis SPM controller with TCP interface enabled
- Configured TCP data logging (typically port 6590)
- Control ports accessible (typically 6501-6504)
License
MIT