Skip to content
Markus Grönholm edited this page Jun 15, 2026 · 1 revision

Alshain Stri Source-measure unit

Install required packages

python -mpip install pyserial alshain

Quick start

  1. Connect usb data cable to Data in port
  2. Connect power adapter to Strix
import alshain
import serial
import sys

# Serial port as first command line parameter
com = serial.Serial( sys.argv[1], alshain.BAUDRATE, timeout = 10.0 )

# Connect to SMU with address = 1 (default)
smu = Alshain.Strix( com, address = 1 )

# Measure both voltage and current
voltage, current = smu.measure()

Basic usage

# Measure both voltage and current
voltage, current = smu.measure()

# Measure voltage
voltage = smu.measure_voltage()

# Measure current
current = smu.measure_current()

# Measure ext voltage
vext = smu.measure_ext()

# Enable & disable output
smu.enable_output( True )
smu.enable_output( False )

# Set drive voltage (eg. to 1V)
smu.set_drive_voltage( 1.0 )

# Set drive current (eg. to 1mA)
smu.set_drive_current( 1e-3 )

Parameters

# Number of averages per measurement -> Integration time = Navg / samplerate
smu.write( alshain.Strix.Parameters.AVERAGES, 5 ) # eg. 5 averages per measurement

# Autoranging on/off
smu.write( alshain.Strix.Parameters.AUTORANGING, alshain.Strix.Options.AUTORANGING_ON )
smu.write( alshain.Strix.Parameters.AUTORANGING, alshain.Strix.Options.AUTORANGING_OFF )

# Set compliance voltage
smu.write( alshain.Strix.Parameters.COMPLIANCE_VOLTAGE, 20.0 ) # set compliance voltage to 20V

# Set compliance current
smu.write( alshain.Strix.Parameters.COMPLIANCE_CURRENT, 10e-3 ) # set compliance current to 10mA

# Set 4-wire mode on/off
smu.write( alshain.Strix.Parameters.FOURWIRE_MODE, alshain.Strix.Options.ENABLE_4WIRE_MODE )
smu.write( alshain.Strix.Parameters.FOURWIRE_MODE, alshain.Strix.Options.DISABLE_4WIRE_MODE )

# Select guard output reference (guard follows either Drive+ or Sense+)
smu.write( alshain.Strix.Parameters.GUARD_MODE, alshain.Strix.Options.GUARD_MODE_DRIVE )
smu.write( alshain.Strix.Parameters.GUARD_MODE, alshain.Strix.Options.GUARD_MODE_SENSE )

# Set voltage input fixed range
# valid gains are 1, 8, 64
# * 1  -> ±20V 
# * 8  -> ±2.5V 
# * 64 -> ±300mV 
smu.write( alshain.Strix.Parameters.ADC_VOLTAGE_GAIN, 1 ) 

# Set current input fixed range
# valid gains are 1, 2, 3, 4
# * 1 -> ±20mA
# * 2 -> ±100µA
# * 3 -> ±1µA
# * 4 -> ±10nA
smu.write( alshain.Strix.Parameters.LARGE_CURRENT_GAIN, 1 ) 

# Set ext voltage input fixed range
# valid gains are 1, 8, 64
# * 1  -> ±2.5V 
# * 8  -> ±300mV 
# * 64 -> ±35mV 
smu.write( alshain.Strix.Parameters.EXT_VOLTAGE_GAIN, 1 ) 

# Set adc samplerate
# valid rates are 20, 45, 90, 175, 330, 600, 1000 
# 20sps (default) has integrated 50/60Hz filter so it is advisable to use that if possible
smu.write( alshain.Strix.Parameters.ADC_SAMPLERATE, 20 ) 

# Set internal temperature stabilization on/off
# Strix has heaters to keep its internals at a constant temperature, heaters are turned off 
# during measurements to reduce any noise introduced to measurement, but they can be also
# turned off programmatically.
smu.write( alshain.Strix.Parameters.THERMAL_MODE, alshain.Strix.Options.MODE_HEATER_OFF )
smu.write( alshain.Strix.Parameters.THERMAL_MODE, alshain.Strix.Options.MODE_HEATER_AUTO )

# Set powerline cycle sync mode ie. synchronize measurements to start at a constant powerline phase
# Valid values:
# MODE_PLC_SYNC_NONE
# MODE_PLC_SYNC_50HZ (default)
# MODE_PLC_SYNC_60HZ
smu.write( alshain.Strix.Parameters.PLC_SYNC_MODE, alshain.Strix.Options.MODE_PLC_SYNC_50HZ ) 

Clone this wiki locally