Example LED characterisation - Alshain-Oy/Strix GitHub Wiki
LED IV and light output characterisation
IV curve
Light output
Connection diagram
Wiring the photodiode to the Ext connector
Code
#!/usr/bin/env python3
# Filename: measure-led-response.py
import sys
import serial
import libStrix
import time
com = serial.Serial( sys.argv[1], 460800, timeout = 2.5 )
smu = libStrix.Strix( com, 1 )
smu.write( libStrix.PARAM_AUTORANGING, libStrix.AUTORANGING_ON )
smu.write( libStrix.PARAM_AVERAGES, 5 )
# EXT is always fixed range, 64x -> ±35mV
smu.write( libStrix.PARAM_EXT_VOLTAGE_GAIN, 64 )
# Resistance parallel to photodiode in this example
Rpd = 38e3
v_start = 0.0
v_stop = 2.61
dV = 0.01
v_current = v_start
smu.enable_output( True )
N = 0
while v_current < v_stop:
smu.set_drive_voltage( v_current )
time.sleep(0.1)
Imeas = smu.measure_current()
Vmeas = smu.measure_voltage()
Vext = smu.measure_ext()
Iext = Vext / Rpd
print( N, Vmeas, Imeas, Iext )
print( N, v_current, Imeas, Iext, file = sys.stderr )
v_current += dV
N += 1
smu.enable_output( False )
# py measure-led-response.py COMx > led-response.dat
Comparison, red vs white LED light output