This adds control of the Cryocard C04 HEMT Drain. The goal here is for "HEMT" to refer to the HEMT on the C02, or HEMT1 on the C04. This implies the commands get_hemt_gate_voltage and set_hemt_gate_voltage can operate over both the first C02 or C04 HEMT automatically. This can obviously get confusing. Advice appreciated. The relevant differences between the C02 HEMT and C04 HEMT are: the C02 HEMT Drain is controlled manually, the C04 HEMT Drain is controlled via DAC, the resistor used to calculate current is different (C02: R2: 200 Ohm, C04: R44: 1 Ohm).
The following optional configurations are added.
smurf_config.py
hemt_gate_dac_num, default 3 (same on C02 and C04)
hemt_drain_dac_num, default 31 (not on C02)
hemt_opamp_gain, default 3.874 (not sure if same)
hemt_drain_conversion_m, default -0.259491 (not on C02)
hemt_drain_conversion_b, default 1.74185 (not on C02)
The following functions are added.
smurf_command.py
get_hemt_drain_enable
set_hemt_drain_enable
get_hemt_drain_voltage
set_hemt_drain_voltage
The get_hemt_drain_voltage and set_hemt_drain voltage uses the same fit from calibrating the HEMT2.
Test log with C04
[ 2022-02-21 05:48:10 ] Done with setup.
In [2]: S.hemt_Vg
Out[2]: 0.49
In [3]: S.hemt_bit_to_V
Out[3]: 1.92e-06
In [4]: S.hemt_Vd_series_resistor
Out[4]: 200.0
In [5]: S.hemt_Id_offset
Out[5]: 0.12891
In [6]: S.hemt_gate_min_voltage
Out[6]: -1.0
In [7]: S.hemt_gate_max_voltage
Out[7]: 1.0
In [8]: S.hemt_gate_dac_num
Out[8]: 3
In [9]: S.hemt_drain_dac_num
Out[9]: 31
In [10]: S.hemt_opamp_gain
Out[10]: 3.874
In [11]: S.hemt_drain_conversion_m
Out[11]: -0.259491
In [12]: S.hemt_drain_conversion_b
Out[12]: 1.74185
In [13]: S.get_cryo_card_hemt_ps_en()
Out[13]: False
In [14]: S.set_cryo_card_hemt_ps_en(True)
In [15]: S.get_hemt_gate_voltage??
Signature: S.get_hemt_gate_voltage(**kwargs)
Source:
def get_hemt_gate_voltage(self, **kwargs):
"""
Returns the HEMT voltage in bits.
"""
return self._hemt_bit_to_V*(self.get_hemt_bias(**kwargs))
File:/usr/local/src/pysmurf/python/pysmurf/client/command/smurf_command.py
Type:method
In [16]: S.get_hemt_gate_voltage()
Out[16]: 0.48999935999999994
In [17]: S.get_rtm_slow_dac_volt(S.hemt_gate_dac_num)
Out[17]: 0.0
In [18]: # Measuring 0.14 V on HEMT Gate. None of these three commands agree.
In [19]: S.set_hemt_gate_voltage(0)
In [22]: # Measuring 0 V on HEMT Gate. At least rtm_spi_max_root + hemt_v_reg controls the HEMT Gate. DAC number 3 on the schematic C04 does not.
In [25]: S.set_hemt_gate_voltage(0.5)
In [26]: # Measuring 0.14 on HEMT Gate. Needs calibration?
In [27]: # Next test HEMT drain.
In [28]: S.get_hemt_drain_voltage()
Out[28]: 1.74185
In [29]: # Measuring 1.7338 on HEMT Drain.
In [30]: S.set_hemt_drain_voltage(0)
In [31]: # Measuring 0.0067 on HEMT Drain.
In [32]: S.set_hemt_drain_voltage(0.5)
In [33]: # Measuring 0.4998 on HEMT Drain. Good enough for now.
In [34]: S.get_hemt_drain_current()
Out[34]: 8.024410312499999
In [35]: S.set_hemt_drain_voltage(1.75)
In [36]: S.get_hemt_drain_current()
Out[36]: 27.689058749999994
In [37]: # This should max out at 50 mA. Needs calibration?
In [38]: S.set_hemt_drain_voltage(0)
In [39]: S.get_hemt_drain_current()
Out[39]: 0.2255821875
In [40]: # Conclusion: HEMT1 Gate control is weird. Drain control OK. Current has range 0.22 to 27 mA, disagrees with schematic 0 to 50 mA.
Test log with C02
NA
See Also
707
Postscript
This is based off #707's changes. Just change the branch to develop once #707 is merged. Add software limits for the HEMT drain and gate in another pull request that adds software limits to all the other 4 amplifiers.
Issue
ESCRYODET-852
Description
This adds control of the Cryocard C04 HEMT Drain. The goal here is for "HEMT" to refer to the HEMT on the C02, or HEMT1 on the C04. This implies the commands get_hemt_gate_voltage and set_hemt_gate_voltage can operate over both the first C02 or C04 HEMT automatically. This can obviously get confusing. Advice appreciated. The relevant differences between the C02 HEMT and C04 HEMT are: the C02 HEMT Drain is controlled manually, the C04 HEMT Drain is controlled via DAC, the resistor used to calculate current is different (C02: R2: 200 Ohm, C04: R44: 1 Ohm).
The following optional configurations are added.
The following functions are added.
The get_hemt_drain_voltage and set_hemt_drain voltage uses the same fit from calibrating the HEMT2.
Test log with C04
Test log with C02
NA
See Also
707
Postscript
This is based off #707's changes. Just change the branch to develop once #707 is merged. Add software limits for the HEMT drain and gate in another pull request that adds software limits to all the other 4 amplifiers.