Introduction
[edit | edit source]
ETH484 is an ethernet board with relays, and digital I/O, and analog I.
From the supplier website:
The ETH484 provides four volt free contact relay outputs with a current rating of up to 16Amp each, 8 digital I/O and 4 analogue inputs. The module is powered from a 12vdc supply which can be regulated or unregulated. The DC input jack is 2.1mm with positive core polarity, DC supplies are required to supply at least 500mA at 12vdc. The relays are SPCO (Single Pole Change Over) types. The normally open, normally closed and common pins are all available on the screw terminals.
Technische documentatie ETH484 (pdf)
Interfacing
[edit | edit source]HTTP
[edit | edit source]- The device has a web interface. Please note that the i/o is presented in inverse order (in firmware >V8 this is clearly indicated.)
- It's possible to reboot the device with an HTTP request, with e.g.:
curl -X POST http://admin:password@''IPADDRESS''/reboot.htm
rebooting ETH484 will reset outputs If you reboot an ETH484, this will unset any relay or digital output unless latching output is enabled in the configuration. Things may not return to the way they were or to the way you'd expect. |
rebooting ETH484 may stop FELIX If you reboot an ETH484#In_use_at_FELIX, this will cause the Userstation/Interlock program to stop the FELIX gun (using ETH484-14 relay 1). |
TCP/IP
[edit | edit source]MQTT
[edit | edit source]- The linux daemon ETH484d[2] acts as a bridge between an ETH484 device and the MQTT broker. The ETH484 devices are organised into the FELIX/ETH484 branch of the MQTT tree.
- The root node for ETH484-12, for instance, would be FELIX/ETH484/ETH484-12. An example of a topic that you could subscribe to would be FELIX/ETH484/ETH484-12/voltage.
Read
[edit | edit source]| topic | description |
|---|---|
| analog/1-4/value | The analog voltage (10 bit), expressed as a float in range 0-3.3V. |
| connected | The state of the TCP connection from the daemon to the ETH484 device, True or False. |
| digital/1-8/state | The state of the digital channel, either "OUTPUT_INACTIVE", "OUTPUT_ACTIVE", or "INPUT_ACTIVE". |
| relay/1-4/state | The state of the relay, either "OUTPUT_INACTIVE", or "OUTPUT_ACTIVE". |
| voltage | The ETH484 board input voltage, expressed as a float. Commonly between 12-13V. |
| servers | List of servers for this device. |
| clients | List of clients for this device. |
- Note: The minimum change in the analog input can be specified in the ini-file of the daemon. The default value is 0.001 to stop flooding the network with changes due to noise. In the default case, therefore, a minimum change of 2 bits (i.e. >=3.3mV) is needed before an update is sent via MQTT. Setting this value to 0 will send updates on every change. If the inputs are left unconnected they may pick up a lot of electromagnetic noise and send a lot of unnecessary updates.
Write
[edit | edit source]| topic | description |
|---|---|
| digital/1-8/command | Set the state of the digital output. Accepted values: either ('on', '1', 'True') for ON, or ('off', '0', or 'False') for OFF. |
| relay/1-4/command | Set the state of the relay. Accepted values: either ('on', '1', 'True') for ON, or ('off', '0', or 'False') for OFF. |
- Note: you may append a time duration to pulse the output. Append the command with a colon and a time expressed in 100ms increments. Accepted values are 0-255. 0 means indefinitely, and is therefore the same as omitting the time altogether. Sending an ON pulse to a digital/relay that is already ON has no effect.
- Note 2: it is probably best to send commands without the retain bit, in order not to confuse others. (Also in case of a service reboot, the values would be applied immediately.)
| topic | message | action |
|---|---|---|
| FELIX/ETH484/ETH484-12/relay/1/command | on | to turn on relay 1 |
| FELIX/ETH484/ETH484-12/relay/3/command | 1:10 | for a 1s ON pulse on relay 3 |
| FELIX/ETH484/ETH484-12/digital/6/command | False:255 | for a 25.5s OFF pulse on digital 6 |
| FELIX/ETH484/ETH484-12/digital/6/command | off:256 | is ignored as the value 256 is out of range |
Config
[edit | edit source]In the directory conf is the eth484d.ini file This file contains the device information for the ETH484 which are located in the network.
| config | value | description |
|---|---|---|
| [ETH484-xx] | 01:19 | indication for the beginning of the config for that numbered device |
| host = | ETH484-[01:19] | hostname according to the nameserver or either the ip adress of the device |
| port = | 17494 | this is the default port for the ETH484 to respond, do not try to change this unless you reconfigured the ETH484 itself. |
| password = | should be empty, because we do't use a password. (/If it fails the factory default password = password) | |
| sizeable_analog_change = | 0.03 | minimum value of which the ADC should change to report it to the MQTT broker.(to stop flooding the broker with ADC noise) |
In use at FELIX
[edit | edit source]- FELIX Diagnostic station (ETH484-04, ETH484-05, ETH484-11)
- FELIX optical transport system (ETH484-01, ETH484-02, ETH484-06, ETH484-07, ETH484-08, ETH484-09, ETH484-10, ETH484-13)
- RF switches (ETH484-03)
- Interlocks and camera reset (ETH484-14)
- COFFEE (ETH484-16)
- Sandbox (ETH484-17)
- FLARE Diagnostic station (ETH484-18, ETH484-19)
See also this dynamically generated list.
Installation
[edit | edit source]First, make sure you have set up Feloperator gitlab authentication for the git clone and pip install commands below to work.
# clone the eth484d code cd /opt git clone https://gitlab.science.ru.nl/felix/eth484d.git cd eth484d chgrp -R fft . chmod -R 2775 .git mkdir log run chmod 2775 log run python3 -m venv .env .env/bin/pip install -r requirements.txt
References
[edit | edit source]- ↑ Technical documentation on supplier website
- ↑ eth484d on science gitlab repository.]