"""Constants for the laser control module. Physical constraints, protocol parameters, and operational limits for the laser control board. """ # ---- Protocol constants BAUDRATE = 115200 SERIAL_TIMEOUT_SEC = 1.0 WAIT_AFTER_SEND_SEC = 0.15 # delay after sending a command # ---- Physical / hardware constants (from device_conversion.py) VREF = 2.5 # Reference voltage, Volts # Bridge resistors for temperature measurement R1 = 10000 # Ohm R3 = 27000 # Ohm R4 = 30000 # Ohm R5 = 27000 # Ohm R6 = 56000 # Ohm RREF = 10 # Current-setting resistor, Ohm # (@1550 nm – 28.7 Ohm; @840 nm – 10 Ohm) # Thermistor Steinhart–Hart B-coefficient BETA_INTERNAL = 3900 # K T0_K = 298 # Kelvin (25 °C reference) R0 = 10000 # Ohm (thermistor nominal at 25 °C) # DAC resolution ADC_BITS_16 = 65535 # 2^16 - 1 # ---- Operational limits (validated in validators.py) TEMP_MIN_C = 15.0 # Minimum allowed laser temperature, °C TEMP_MAX_C = 40.0 # Maximum allowed laser temperature, °C CURRENT_MIN_MA = 15.0 # Minimum allowed laser current, mA CURRENT_MAX_MA = 110.0 # Maximum allowed laser current, mA (lab sweeps reach 107 mA) # Variation step limits CURRENT_STEP_MIN_MA = 0.002 # Minimum current variation step, mA CURRENT_STEP_MAX_MA = 0.5 # Maximum current variation step, mA # Time parameter limits TIME_STEP_MIN_US = 20 # Minimum time step, microseconds TIME_STEP_MAX_US = 100 # Maximum time step, microseconds DELAY_TIME_MIN_MS = 3 # Minimum delay between pulses, milliseconds DELAY_TIME_MAX_MS = 10 # Maximum delay between pulses, milliseconds