AMIModel1700LLI Satellite#

Name

AMIModel1700LLI

Description

Satellite to read the AMI Model1700 LLI level sensor

Language

Python

Category

Environment Sensors

Website

madmax/hamburg/amimodel1700lli-satellite

Description#

Constellation satellite to read Helium and Nitrogen levels from an AMI Model 1700 LLI.

Note

This satellite requires write access to the serial port or USB-to-serial converter the device is attached to. It is recommended to not run this satellite with root privileges but to allow the regular user access to the required port instead. On Unix, if the port is e.g. /dev/ttyUSB0, the group can be found via stat /dev/ttyUSB0 (the Gid entry). If the group is e.g. dialout, the permissions can be given with sudo usermod -a -G dialout $USER. A restart is required for the changes to be effective.

Configuration#

A calibration curve is required for both Helium and Nitrogen levels to convert the measured fill level in mm to percentage of the actual volume. It is specified by an offset and a list of fill levels in mm and their corresponding percentages. A measurement val_mm is then converted to percentage by np.interp(val_mm + offset_mm, levels_mm, percentages).

Parameter

Description

Type

Default Value

port

Path to serial device, e.g. /dev/ttyUSB0

String

n2_enabled

Enable Nitrogen measurements

Boolean

False

n2_interval

Sampling interval of nitrogen level in seconds

Integer

60

n2_offset_mm

Offset of Nitrogen measurement, in mm

Integer

n2_levels_mm

Levels of Nitrogen calibration curve

List

n2_percentages

Percentages of Nitrogen calibration curve

List

he_enabled

Enable Nitrogen measurements

Boolean

True

he_interval

Sampling interval of helium level in seconds

Integer

60

he_offset_mm

Offset of Helium measurement, in mm

Integer

he_levels_mm

Levels of Helium calibration curve

List

he_percentages

Percentages of Helium calibration curve

List

Important

The satellite does NOT configure the devices measurement mode (sample and hold vs. continuous) and relies on the device being configured to periodically update its measurement. **_interval defines how often the satellite queries the device for a new measurement but DOES NOT initiate an actual sample on the device. It is therefore advisable to set it to the smallest sampling period you plan to operate the device with.

Example#

[satellites.AMIModel1700LLI.L0]
port = "/dev/ttyL0"
n2_enabled = 0
n2_offset_mm = 27.5
n2_levels_mm = [0, 37, 72.5, 145, 217.5, 290, 292]
n2_percentages = [0, 12.8, 25, 50, 75, 100, 100.7]
he_enabled = 1
he_offset_mm = 17.5
he_levels_mm = [0, 30.2, 50.2, 70.2, 95.7, 121.2, 146.7, 172.2, 197.7, 223.2, 248.7, 274.2, 290]
he_percentages = [0, 10.4, 17.3, 24.2, 33, 41.8, 50.6, 59.4, 68.2, 77, 85.8, 94.6, 100]

Metrics#

Metric

Description

Value Type

Metric Type

Interval

LEVEL_N2

The Nitrogen level in percent, as determined by the provided calibration curve.(requires n2_enabled = True)

Float

LAST_VALUE

configurable

LEVEL_N2_CM

The raw Nitrogen level as returned by the device in cm (requires n2_enabled = True)

Float

LAST_VALUE

configurable

LEVEL_HE

The Helium level in percent, as determined by the provided calibration curve (requires he_enabled = True)

Float

LAST_VALUE

configurable

LEVEL_HE_CM

The raw Helium level as returned by the device in cm (requires he_enabled = True)

Float

LAST_VALUE

configurable

Framework Parameters#

This satellite inherits the following framework parameters from its base classes:

Parameters inherited from Satellite#

Autonomous Operation#

Parameters to control autonomy in the _autonomy section:

Parameter

Type

Description

Default Value

role

Role name

Role this satellite should take in the Constellation. Accepted values are ESSENTIAL, DYNAMIC, TRANSIENT and NONE.

DYNAMIC

max_heartbeat_interval

Unsigned integer

Maximum interval in seconds between heartbeats to be sent to other Constellation components. The time between heartbeat is adjusted automatically according to the number of nodes in the Constellation but will never exceed this value.

30

Conditional Transitions#

Parameters to control conditional transitions in the _conditions section:

Parameter

Type

Description

Default Value

require_initializing_after

List of strings

List of canonical names of remote satellites for conditional transitioning in initializing state

-

require_launching_after

List of strings

List of canonical names of remote satellites for conditional transitioning in launching state

-

require_landing_after

List of strings

List of canonical names of remote satellites for conditional transitioning in landing state

-

require_starting_after

List of strings

List of canonical names of remote satellites for conditional transitioning in starting state

-

require_stopping_after

List of strings

List of canonical names of remote satellites for conditional transitioning in stopping state

-

transition_timeout

Unsigned integer

Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning

30

Framework Metrics#

This satellite inherits the following framework metrics from its base classes:

Metrics inherited from Satellite#

None