slaclab / pysmurf

Other
2 stars 9 forks source link

Add control of the second 50K on the C04 #697

Closed agustiner closed 2 years ago

agustiner commented 2 years ago

Issue

ESCRYODET-852

Description

This code change permits use of the second 50K Low Noise Amplifier (LNA) on the C04 cryocard. This code should be backwards compatible with the existing users on the C02 cryocard. No changes should be made to the other three amplifiers, or TES biases.

The following optional configurations are added.

The following functions are added.

The get_50k2_drain_voltage and set_50k2_drain voltage is calculated with the following fit.

1

Test log

[ 2022-02-16 01:37:34 ]  Done with setup.

In [3]: S.fiftyk2_Vg
Out[3]: -0.75

In [4]: S.fiftyk2_gate_dac_num  
Out[4]: 26

In [5]: S.fiftyk2_drain_dac_num 
Out[5]: 28

In [6]: S.fiftyk2_gate_bit_to_V 
Out[6]: 3.88e-06

In [7]: S.fiftyk2_drain_dac_num 
Out[7]: 28

In [8]: S.fiftyk2_drain_conversion_m  
Out[8]: -0.224968

In [9]: S.fiftyk2_drain_conversion_b  
Out[9]: 5.59815

In [10]: S.fiftyk2_Id_offset 
Out[10]: 0

In [11]: S.fiftyk2_amp_Vd_series_resistor
Out[11]: 12.0

In [12]: S.fiftyk2_opamp_gain
Out[12]: 9.929

In [13]: S.get_50k2_ps_en()  
Out[13]: True

In [14]: S.get_50k2_bias()
Out[14]: 0.8514257812499999

In [15]: S.get_50k2_gate_enable()  
Out[15]: True

In [16]: S.get_50k2_drain_enable() 
Out[16]: True

In [17]: S.get_50k2_drain_voltage()
Out[17]: 5.59815

In [18]: S.get_50k2_gate_voltage() 
Out[18]: 0.0

In [20]: S.C.get_50k2_bias() 
Out[20]: 0.8520703124999999

In [23]: S.set_50k2_gate_voltage(2.02)

In [24]: S.get_50k2_gate_voltage() 
Out[24]: 2.0199978400000003

In [25]: S.set_50k2_drain_voltage(4)  

In [26]: S.get_50k2_drain_voltage()
Out[26]: 4.000003911132813

In [27]: S.get_50k2_drain_milliamps() 
Out[27]: 10.094129255212005

In [28]: S.set_50k2_drain_voltage(5)  

In [29]: S.get_50k2_drain_milliamps() 
Out[29]: 12.777241854668143
agustiner commented 2 years ago

This is the most basic functionality for the two 50Ks on the C04 that we should iron out first. Then I'll add in functionality for the two HEMTs, test compatibility with the C02, and then update the higher level abstractions. Most of these changes should be straightforward.

https://github.com/slaclab/pysmurf/blob/main/python/pysmurf/client/util/smurf_util.py#L2781.

agustiner commented 2 years ago

Whew, okay, lots of changes. I believe fiftyk2_bit_to_V converts the PIC values to volts, and needs to be measured again, and is deterministic across all C04. Doing that.