-
Notifications
You must be signed in to change notification settings - Fork 1
Home
2022-01-25
Doberman: Detector OBservation and Error Reporting Multiadaptive ApplicatioN: a generic application for process control and monitoring (we call this "slow control") for small to medium experiments. Works great for O(10)-O(100) quantities but should scale to O(1000).
- device - A physical hardware module you attach to a computer or the network that can be communicated with. This module has at least one sensor attached to it.
- sensor - a thing that measures a quantity, for instance a pressure gauge or load cell or PT100, etc.
- plugin - code that Doberman uses to communicate with a device.
Installation tested for Ubuntu 18.04. YMMV.
- Download and install Anaconda with python >=3.8 (see the Infrastructure section below for some caveats)
- Make yourself an environment with a fancy name (for instance, 'doberman'):
conda create -n <env_name>
. Packages will get installed later. You can get away without making an environment but it can complicate testing.
- Follow the instructions to install and start MongoDB. You might want to change the default port that Mongo listens on to something other than the default 27017.
- Make users with suitable roles. You'll want a generic account with read/write access for Doberman (and its plugins), an admin role, and possibly also a godmode role.
- Connection info needs to be set as an environment variable:
export DOBERMAN_MONGO_URI="mongodb://${username}:${password}@${host}:${port}/admin
or equivalent. - You can use a cloud-based solution rather than hosting your own database, but the system will probably crash if there's any transient interruption in the external connection.
- Doberman assumes a certain database structure, described on this page.
- Follow the instructions to download and setup InfluxDB.
- Set up an organization and two buckets, one will hold the "general" data and one will host data from the system monitor. We recommend an infinite retention policy for the general data and something like 30 days for the system monitor (unless you want that data kept for longer). You'll also need to set up an access token.
- Map these two buckets and retention policy to databases following these steps.
- Clone the git repo:
git clone https://github.com/AG-Schumann/Doberman.git
- Activate the environment (if you made one):
conda activate <environment name>
- Install the packages:
python setup.py develop
There is also a nice web application that was designed as a user front-end. Check it out here. We won't cover setup or use here, but the base assumption is that you're going to be using this as the interface.
We recommend having a server as the central host of the databases. You could do most of it off a Raspberry Pi, but querying for data can be relatively intense so a server will give you better performance. The server doesn't need particularly generous resources, but MongoDB will take half of the available RAM regardless of how much data there is. We use a second-hand DAQ server from XENON1T with 4C/8T and 24 GB of memory. You'll also need storage for the databases. Slow control data is very squeezy, unless you're doing crazy things you aren't going to need more than order(100 GB). It's also really convenient to have a central network drive where you can put software and log files, and you may as well use this disk to do this. If you host the website on the server as well then it's fewer things you need to run on UPS.
Your server is probably going to be running x86_64 architecture, and things based on the Raspberry Pi run ARM (ARMv7 for the Pi 3, and ARMv8 for the Pi 4). This means you need separate python binaries. Doberman uses needs at least python3.8.
You can use a single common installation of Doberman and its plugins, but you are probably going to need multiple python binaries. Environment management in this regards can be tricky but you can do a lot with careful manipulation of PATH
.
When running Doberman on multiple hosts and/or using LAN-Devices, you'll want to make sure that the different instances can refer to each other by their names (e.g. the hypervisor will send a command via 'ssh doberman@hostname' not 'ssh doberman@ip'). So make sure that yousetup your /etc/hostname
and /etc/hosts
correctly.
We had a very good experience basing the readout on the Raspberry Pi-based Revolution Pi PLC. There are other Pi-based PLCs (for instance one from Industrial Shields), and you'll probably have a similar experience with them. We very strongly recommend against using a bunch of things that connect via RS232-USB converters. That way lies madness and frustration. RS232 is ok because it's statically addressed, but USB is dynamically addressed, so unless you are really good with udev rules (I tried and failed), the device mapped to /dev/ttyUSB0
can change.
A lot of things still use RS232 or RS485 so it's worth finding a small industrial PC or something you can use to read them out. There are also Serial-Ethernet adaptors we use, but having one box dedicated to serial devices also works, if you end up with a large number of such readout devices.
Pressure sensors tend to come with 4-20 mA readout, which the Revolution Pi has lots of slots for. Vacuum sensors have rather more options, external readout devices might be necessary. The RevPi does have readout channels for PT100 or PT1k modules, but only in limited quantity. We designed multiplexers using the MOS4051 IC that make use of digital output channels and the advantage of logarithmic scaling via multiplexing. We can probably provide our schematics.
Create a doberman
user on all of the machines that are going to be part of the network. Some things will be simpler if they all have the same uid
, unless you're better at setting nfs parameters than I am. Create and distribute password-less ssh keys for this account so the hypervisor can get around.