hvl_ccb.utils.conversion_sensor

Inheritance diagram of hvl_ccb.utils.conversion_sensor

Sensors that are used by the devices implemented in the CCB

class LEM4000S(shunt: float = 1.2, calibration_factor: float = 1)[source]

Bases: hvl_ccb.utils.conversion_sensor.Sensor

Converts the output voltage (V) to the measured current (A) when using a LEM Current transducer LT 4000-S

CONVERSION: ClassVar[int] = 5000
calibration_factor: float = 1
convert(value, **kwargs)
shunt: float = 1.2
class LMT70A(temperature_unit: hvl_ccb.utils.conversion_unit.Temperature = Temperature.C)[source]

Bases: hvl_ccb.utils.conversion_sensor.Sensor

Converts the output voltage (V) to the measured temperature (default °C) when using a TI Precision Analog Temperature Sensor LMT70(A)

LUT: ClassVar[numpy.ndarray[Any, numpy.dtype[numpy.typing._generic_alias.ScalarType]]] = array([[-55.      ,   1.375219],        [-50.      ,   1.350441],        [-40.      ,   1.300593],        [-30.      ,   1.250398],        [-20.      ,   1.199884],        [-10.      ,   1.14907 ],        [  0.      ,   1.097987],        [ 10.      ,   1.046647],        [ 20.      ,   0.99505 ],        [ 30.      ,   0.943227],        [ 40.      ,   0.891178],        [ 50.      ,   0.838882],        [ 60.      ,   0.78636 ],        [ 70.      ,   0.733608],        [ 80.      ,   0.680654],        [ 90.      ,   0.62749 ],        [100.      ,   0.574117],        [110.      ,   0.520551],        [120.      ,   0.46676 ],        [130.      ,   0.412739],        [140.      ,   0.358164],        [150.      ,   0.302785]])
convert(value, **kwargs)
temperature_unit: hvl_ccb.utils.conversion_unit.Temperature = 'C'
class Sensor[source]

Bases: abc.ABC

The BaseClass ‘Sensor’ is designed as a parent for all Sensors. Each attribute must be added to ‘__setattr__’, so that the value is verified each time the value is changed. It is important to mark attributes that should be constant with ‘typing.ClassVar[…]’. Together with ‘super().__setattr__(name, value)’, this guarantees that the values are protected and cannot be altered by the user.

abstract convert(value, **kwargs)