Skip to content

Commit 99ab3cf

Browse files
Alexebrahimebrahim
authored andcommitted
Relax temperature increase cutoffs for tx and console. (#75)
1 parent d2b568f commit 99ab3cf

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

notebooks/test_thermal_stress.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
# Fail-safe parameters if the temperature jumps too fast
5959
rapid_temp_shutoff_C = 40 # Cutoff temperature in Celsius if it jumps too fast
6060
rapid_temp_shutoff_seconds = 5 # Time in seconds to reach rapid temperature shutoff
61-
rapid_temp_increase_per_second_shutoff_C = 2 # Rapid temperature climbing shutoff in Celsius
61+
rapid_transmitter_temp_increase_per_second_shutoff_C = 3 # Rapid temperature climbing shutoff in Celsius
62+
rapid_console_temp_increase_per_second_shutoff_C = 5 # Rapid temperature climbing shutoff in Celsius
6263

6364
peak_to_peak_voltage = voltage * 2 # Peak to peak voltage for the pulse
6465

@@ -133,8 +134,8 @@ def log_temperature():
133134
if prev_con_temp is None:
134135
prev_con_temp = interface.hvcontroller.get_temperature1()
135136
con_temp = interface.hvcontroller.get_temperature1()
136-
if (con_temp - prev_con_temp) > rapid_temp_increase_per_second_shutoff_C:
137-
logger.warning(f"Console temperature rose from {prev_con_temp}°C to {con_temp}°C (above {rapid_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
137+
if (con_temp - prev_con_temp) > rapid_console_temp_increase_per_second_shutoff_C:
138+
logger.warning(f"Console temperature rose from {prev_con_temp}°C to {con_temp}°C (above {rapid_console_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
138139
log_line = f"{current_time},SHUTDOWN,Console temperature exceeded rapid temp increase shutoff threshold\n"
139140
shutdown=True
140141
else:
@@ -144,8 +145,8 @@ def log_temperature():
144145
if prev_tx_temp is None:
145146
prev_tx_temp = interface.txdevice.get_temperature()
146147
tx_temp = interface.txdevice.get_temperature()
147-
if (tx_temp - prev_tx_temp) > rapid_temp_increase_per_second_shutoff_C:
148-
logger.warning(f"TX device temperature rose from {prev_tx_temp}°C to {tx_temp}°C (above {rapid_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
148+
if (tx_temp - prev_tx_temp) > rapid_transmitter_temp_increase_per_second_shutoff_C:
149+
logger.warning(f"TX device temperature rose from {prev_tx_temp}°C to {tx_temp}°C (above {rapid_transmitter_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
149150
log_line = f"{current_time},SHUTDOWN,TX device temperature exceeded rapid temp increase shutoff threshold\n"
150151
shutdown=True
151152
else:
@@ -155,8 +156,8 @@ def log_temperature():
155156
if prev_amb_temp is None:
156157
prev_amb_temp = interface.txdevice.get_ambient_temperature()
157158
amb_temp = interface.txdevice.get_ambient_temperature()
158-
if (amb_temp - prev_amb_temp) > rapid_temp_increase_per_second_shutoff_C:
159-
logger.warning(f"Ambient temperature rose from {prev_amb_temp}°C to {amb_temp}°C (above {rapid_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
159+
if (amb_temp - prev_amb_temp) > rapid_transmitter_temp_increase_per_second_shutoff_C:
160+
logger.warning(f"Ambient temperature rose from {prev_amb_temp}°C to {amb_temp}°C (above {rapid_transmitter_temp_increase_per_second_shutoff_C}°C threshold) within {log_interval}s.")
160161
log_line = f"{current_time},SHUTDOWN,Ambient temperature exceeded rapid temp increase shutoff threshold\n"
161162
shutdown=True
162163
else:
@@ -296,7 +297,8 @@ def log_temperature():
296297
Duty Cycle: {duty_cycle}%\n\
297298
Use External Power Supply: {use_external_power_supply}\n\
298299
Initial Temp Safety Shutoff: Increase to {rapid_temp_shutoff_C}°C within {rapid_temp_shutoff_seconds}s of starting.\n\
299-
General Temp Safety Shutoff: Increase of {rapid_temp_increase_per_second_shutoff_C}°C within {log_interval}s at any point.\n")
300+
TX Temp Safety Shutoff: Increase of {rapid_transmitter_temp_increase_per_second_shutoff_C}°C within {log_interval}s at any point.\n\
301+
Console Temp Safety Shutoff: Increase of {rapid_console_temp_increase_per_second_shutoff_C}°C within {log_interval}s at any point.\n")
300302

301303
logger.info("Press enter to START trigger:")
302304
input() # Wait for the user to press Enter

0 commit comments

Comments
 (0)