Control tool of ADC monitor board, "rubis" on Raspberry Pi
Project description
rubis
ADC board for 16 channels Slow Control on Raspberry pi. This repository provides board design and control software.
Feature
- Standalone
- Inexpensive
- Multi channels (16 ch) and additional connectors (4 ch)
Hardware components
- rubis board - less than 5 dollars at elecrow
- PIN Socket
- ADC Board * 1--4
- BNC Connector ( * 4, optional)
- SMA Connector ( * 4, optional)
- LEMO Connector (Optional)
Software
Install
Before run, enable I2C on Raspberry Pi. (sudo raspi-config
)
Then, type pip install rubis
The rubis
binary will be provided at ~/.local/bin/rubis
If you want database store, do like that additionaly
sudo apt install mariadb-server
sudo mysql -u root
MariaDB [(none)]> UPDATE mysql.user SET password=password('newpassword') WHERE User = 'root';
MariaDB [mysql]> UPDATE mysql.user SET plugin='' WHERE User='root';
MariaDB [mysql]> exit
sudo systemctl restart mysql
Usage
When you execute rubis
without option, default configurations will be used.
You can use your custom configuration file with -f
option.
Some options can be overwrited with options.
rubis -g
generates template config file.
Edit them, then run rubis -c custom_config.json
.
Config option
Configure name | Description | Option | Overwrite option |
---|---|---|---|
path |
Path to store the data | Default: "./" | -p |
file_header |
File header of generated file | Default: "sc" | -h |
naming |
Naming style of file | 'head-date-hash', 'head-hash', 'date-hash', 'hash', 'head-date' | -n |
time_interval_sec |
Data taking time interval (sec) | Default: 10 | -t |
available_boards |
List of available ADS1115 boards | Default: [1,2,3,4] | |
output |
Output format | "csv" , "db" , or "both" |
-o |
time_format |
Time column format | "timestamp", "datetime" (default), or strftime format (for example, "%H:%M:%S") | |
boards |
Setting for each ADS1115 board | "gain" option is available |
|
sources |
Setting for each channels |
The sources should be set like,
"1":{
"name": "ch1",
"description": "channel 1",
"type": "volt"
},
"2":{
"name": "ch2",
"description": "channel 2",
"type": "linear"
"a": 2.0,
"b": 1.2
},
The name
is used for csv header. For the type
, "volt"
, "raw"
, "millivolt"
, and "linear"
are available.
"linear"
returns the value "a" * (volt) + "b"
. The "a" and "b" should be written in the config file, for each sources.
If you set "db"
or "both"
for output
, the following settings are required.
"db":{
"login":{
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"passwd": "newpassword",
"autocommit": true},
"name": "rubis"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.