Contains C++ code (in Arduino format) used to program the P1AM-100 OpenProductivity based controller used for the Multi-SNICS Interlock system. Questions can be forwarded to the author at jgibbons3@fsu.edu although he is no longer maintaining the system.
Go to file
2024-05-24 15:14:15 -04:00
.vscode add error message 2024-02-08 17:34:00 -05:00
interlock resetup of the raspberry pi after SD card broken 2024-05-09 15:16:30 -04:00
statusDisplay various bugs fix 2024-05-24 15:14:15 -04:00
.gitignore add error message 2024-02-08 17:34:00 -05:00
Listen2Arduino.py various bugs fix 2024-05-24 15:14:15 -04:00
listen2P1AM.service added serial_relay.py and listen2relay.service, for reading the tritium monitor by raspberry pi 2024-05-23 16:29:20 -04:00
listen2relay.service added serial_relay.py and listen2relay.service, for reading the tritium monitor by raspberry pi 2024-05-23 16:29:20 -04:00
README.md update README.md 2024-05-09 16:15:21 -04:00
serial_relay.py various bugs fix 2024-05-24 15:14:15 -04:00

Introduction

The interlock folder contains P1AM-100 code (which is Arduino MKR1000).

The Listen2Arduino.py is a script for listening the P1AM-100 output (via USB), and put the status, the tritium, Vaccum, and SubPump reading to the fsunuc.physics.fsu.edu database. It will also save the status into ~/data.txt. The data.txt is used for the statusDisplay to run the local dashboard.

A brief diagram to show the data flow

P1AM --> Listen2Arduino.py 
              +---> data.txt --> statusDisplay
              +---> database

Setup using Arduino IDE 1.X

The P1AM.h library is needed.

  • PA1M.h
  • Ethernet.h
  • liquidCrystal.h

also, need to add board MKR1000, use the baord manger, search for

  • Arduino SAMD Boards

Setup the Raspberry Pi

need to install the python package for InfluxDB-client

sudo python -m pip install --break-system-package inlfuxdb-client

influx_token.txt

the influx database need a token for access. the token for the interlock can be found in https://fsunuc.physics.fsu.edu/elog/LabMaintenance/7

interlock database at fsunuc.physics.fsu.edu

database name : interlock

Setup system service for the Listen2Arduino.py

In order to make the Listen2Arduino.py to run at startup and as a background daemon, copy the listen2P1AM.service to /etc/systemd/system/

run

sudo systemctl daemen-reload
sudo systemctl enable listen2P1AM.service`
sudo systemctl start listen2P1AM.service`

Once the Listen2Arduino.py is running, it will create ~/data.txt, so that the local status display can read and update the status. create a symbolic link

cd ~/Multi-SNICS_Interlock/statusDisplay/
ln -s ~/data.txt .