Skip to main content

smartDrive smartCORE Module

Description

The "smartdrive" module provides the interface to the owasys hardware of the smartDrive edge device for smartCORE. It handles

  • reading the 4 analog inputs (AIN0 – AIN3)
  • monitoring the supply voltage (V_IN) and the internal housing temperature
  • driving the 4 status LEDs on the top of the device
  • the periodic internet connectivity check (cellular or Ethernet/network) via an HTTP HEAD request

The module only runs on smartDrive devices, since it internally initializes the owasys RTU and IO kernel modules (libRTU / libIOs).

Status LEDs

The module drives all 4 status LEDs of the smartDrive:

LEDColorDriven by the module
RADIOyellowlights up as long as the last periodic ping check (see below) was successful, regardless of whether the connection is via the cellular modem or via Ethernet/network
PWRgreenswitched on permanently at module startup, once the owasys hardware interface could be initialized
STATEredtoggled every second (blinking at 1 Hz) as long as the module is running; if the LED stays dark, the module (and thus the smartCore process) is no longer active
GPSorangelights up continuously as soon as a valid GNSS fix is present (prerequisite: a GPS module is present in the smartCore configuration, see below)

Internet connectivity check

Every 60 seconds, an HTTP HEAD request is sent to the configurable pingUrl via libcurl. The result (reachable / unreachable) directly drives the RADIO LED.

GPS status check

At module startup, the module searches all configured smartCORE modules for one with the factory gps. If one is found, its gpsinfo call is queried every 30 seconds. The GPS LED lights up when satcount > 0, posfixmode >= 2, and both latitude and longitude are non-zero. If no GPS module is configured, the GPS LED stays off permanently and no query is performed.

Interfaces & protocols used

  • owasys RTU/IO kernel modules (libRTU, libIOs) for analog inputs, V_IN, internal temperature, and LEDs
  • HTTP (HEAD request via libcurl) for the connectivity check
  • smartCORE call interface of an optionally configured gps module

JSON configuration

Example configuration (minimal)

{
"module": "SmartDrive",
"factory": "smartdrive",
"config": {}
}

Without specifying ain_channels, all 4 analog inputs remain disabled; pingUrl falls back to the default www.google.com.

Example configuration (maximal)

{
"module": "SmartDrive",
"factory": "smartdrive",
"config": {
"pingUrl": "www.google.de",
"ain_channels": {
"samplingRate": 10,
"ch1": {
"active": true,
"name": "TestChn1",
"unit": "V",
"scale": 1000.0,
"offset": 0.0,
"adcMaxRange": 30,
"absTolerance": 0.0,
"bufferSize": 100
},
"ch2": {
"active": false,
"name": "Channel2",
"unit": "mV",
"scale": 1.0,
"offset": 0.0,
"adcMaxRange": 5,
"absTolerance": 1.0,
"bufferSize": 100
},
"ch3": {
"active": true,
"name": "Channel3",
"unit": "mV",
"scale": 2.0,
"offset": 0.5,
"adcMaxRange": 30,
"absTolerance": 0.5,
"bufferSize": 100
},
"ch4": {
"active": true,
"name": "Channel4",
"unit": "mV",
"scale": 1.0,
"offset": 0.0,
"adcMaxRange": 5,
"absTolerance": 0.1,
"bufferSize": 100
}
}
}
}

Parameter list

Parameter nameRequiredData typeReasonable rangeDefaultDescription
pingUrlNoSTRINGvalid URL"www.google.com"URL queried every 60s via HTTP HEAD request to check the internet connection (RADIO LED)
ain_channelsNoObjectsee below-Configuration of the 4 analog inputs (AIN0 – AIN3)

ain_channels configuration

Parameter nameRequiredData typeReasonable rangeDefaultDescription
samplingRateNoINT1, 2, 5, 10 [Hz]1Sampling rate of all 4 analog inputs
ch1NoObjectsee below-Configuration of AIN0
ch2NoObjectsee below-Configuration of AIN1
ch3NoObjectsee below-Configuration of AIN2
ch4NoObjectsee below-Configuration of AIN3

Configuration of an analog input channel (ch1ch4)

Parameter nameRequiredData typeReasonable rangeDefaultDescription
activeNoBOOLfalse, truetrueEnable the channel; only active channels are created as a smartCHANNEL
nameNoSTRING"SmartDriveAINChannel"smartCHANNEL name of the analog input
unitNoSTRING""Physical unit of the produced values
scaleNoNUMBER1.0Scale factor applied to the measured voltage (value * scale + offset)
offsetNoNUMBER0.0Offset applied to the measured voltage (value * scale + offset)
adcMaxRangeNoINT5, 30 [V]30Measuring range of the analog input (0–5.12 V or 0–30.72 V)
absToleranceNoNUMBER0.01Absolute tolerance of the data reduction filter
bufferSizeNoINT1 -100Buffer size of the smartCHANNEL

Produced signals

SignalData typeUnitDescription
PowerSupplyfloatVCurrent supply voltage (V_IN) of the smartDrive
InternalTemperatureint32°CInternal housing temperature of the smartDrive
AIN0 – AIN3floatmV (or as configured)Raw value of the respective analog input, scaled via scale/offset (only if the channel is active)

Call interface functions

getStatus

Checks whether the owasys hardware interface (RTU/IO kernel modules) was successfully initialized.

Return valueTypeDescription
valueBOOLtrue if the owasys hardware interface is initialized

getInternalTemperature

Reads the current internal housing temperature.

Return valueTypeDescription
valueINTInternal temperature in °C, or -1 if the value could not be read

getSupplyVoltage

Reads the current supply voltage (V_IN).

Return valueTypeDescription
valueNUMBERSupply voltage in V, or 0 if the value could not be read

Module information

InformationValue
AuthoroptiMEAS GmbH
Module typeProducer
Consumes signalsNo
Produces signalsYes
DependenciessmartDrive edge device (owasys RTU/IO kernel modules); optional configured gps module for the GPS LED
Supported systemssmartDrive