General Strategy and Infrastructure 

The interlock is needed to stop the power during three conditions, overheating, over cooling, and condensation. The system relies on temperature data from the modules them selves provided  by an onboard NTC thermistor, RTD thermistors located at key points and humidity sensors. The data from all these sensors is read into the influx database which can be readout by grafana. 

Module Q/C Lab Testing Interlock

Setup:

    The interlock is run off an raspberry pi 3 with two shields capable for reading in the three kinds of sensors used. The pi contentiously monitors the temperature, dew point, power settings. The raspberry Pi is also used for the digital control system. 

Pi Software:

All the software for this Pi can be found at https://gitlab.cern.ch/nyoung/dcs-interlock/-/tree/Pi_only

Interlock:

   The python module "Interlock_SW.py" makes all the high level decisions about the interlock. The trigger temperatures are set at 40℃ and -40℃ the triggers can be set by the variables

Interlock Finite States:

    The interlock is not coded as a finite state machine but applicably works as shown below.

Sub modules:

Interlock


Readout System:

DCS

The DCS and the Interlock talk through a message broker on rddev111. This message broker passes dictionaries along. Formatted as 

           {"peltier": [{"channel": 1,
                         "power": 'off',
                         "voltage": 10,
                         "current": 1,
                        {"channel": 2,
                         "power": 'on',
                         "voltage": 12,
                         "current": 1,
                        {"channel": 3,
                         "power": 'off',
                         "voltage": 10,
                         "current": 0}
                        ]}
            "module": [{"power": 'on',
                        "voltage": 10,
                        "current": 1.4,
                       ]}
             }

Where all voltages are in volts and all currents are in amps. The python file to handle the message delivery and receiving is found in RabbitMQ/KombuAdmin.py. The system will only keep a undelivered message for 60 seconds before it drops it. Any system subscribed to the broker will wait up to 60 before it will time out, not causing errors but returning an empty result. 


Installation: 

   to install the Interlock on a new pi copy the SD card of the existing scc_cooling setup. To do this plug in the micro USB card to the USB port on your computer.

   

sudo fdisk -l

The correct device will be the one listed 

sudo dd if=/dev/qc_cooling_pi.img of~=/dev/[sd card location]

Install the SD card into the Pi.  

Once the network is setup for the Pi the only thing that needs to be changed in the Interlock is found in the file 'config.json' 

{
   "vhost": "qc_cooling1",
   "influx_measurement": "qc_cooling",
   "rtd_channels": [1, 3, 4, 5]
}

"vhost" the RabbitMQ name required for the system to know which setup you are sending and receiving commands from. 

"influx_measurement" the title all the influx measurements are stored under. This is important to know when you want to retrieve the data. 

"rtd_channels" the list of channel on the rtd board that are being used. 

Errors: 

    There will be no errors as the system works perfectly every time but in the off chance that something mishaps goes wrong logs can be found in the directory 

   ~/log/

B33 Ring/Stave Q/C Setup Interlock

https://indico.cern.ch/event/860295/contributions/3683603/attachments/1968494/3273934/USATLAS_ITK_Pixel_SLAC_DCS_Interlock_Moss_Jan13_2020.pdf

code locations