Jump to content

SENSBLUE ATLAS/Datasheet: Difference between revisions

No edit summary
No edit summary
Line 4,259: Line 4,259:
After STOP, the buzzer is forced to OFF.
After STOP, the buzzer is forced to OFF.


==== 24.12 INA232 actor ====
===== 24.12.1 Overview =====
The '''INA Actor''' is responsible for reading the ATLAS INA232 power monitor and publishing the measuredelectrical values through MQTT.
The actor publishes:
{| class="wikitable"
|'''Value'''
|'''Unit'''
|'''Description'''
|-
|voltage_v
|V
|Measured bus/input voltage
|-
|current_a
|A
|Measured current
|-
|power_w
|W
|Measured/calculated power
|}
The INA232 is a current, voltage, and power monitor with an I²C/SMBus interface. It reports current, busvoltage, and power values through internal registers. The calibration register must be configured to obtainvalid current and power results.
===== 24.12.2 Actor Behaviour =====
The INA Actor shall:
1. Start with a valid INA configuration.
2. Configure the INA232 device.
3. Read voltage, current and power once per second.
4. Publish the values to: '''ina/runtime/out'''
The actor does '''not''' need a request every second.
The publication is automatic and periodic.
===== 24.12.3 Required Configuration =====
The actor requires a small configuration to correctly read and convert the INA232 measurements.
{| class="wikitable"
|'''Field'''
|'''Type'''
|'''Required'''
|'''Description'''
|-
|enabled
|boolean
|Yes
|Enables or disables the INA actor
|-
|address
|string /integer
|Yes
|I²C address of the INA232 device
|-
|shunt_ohm
|number
|Yes
|Value of the shunt resistor in ohms
|-
|max_current_a
|number
|Yes
|Maximum expected current, used forcalibration
|-
|adcrange
|integer
|No
|INA232 shunt voltage range selection
|-
|publish_interval_ms
|integer
|Yes
|Runtime publish interval in milliseconds
|-
|rail_name
|string
|No
|Logical name of the monitored power rail
|}
* '''Default configuration'''
<syntaxhighlight lang="json">
{
  "enabled": true,
  "address": "0x40",
  "shunt_ohm": 0.020,
  "publish_interval_ms": 1000,
  "rail_name": "atlas_input_power"
}
</syntaxhighlight>
===== 24.12.4 Configuration domain =====
Configuration messages are sent to:
'''ina/config/in'''
Configuration replies are published on:
'''ina/config/out'''
'''- GET_CONFIG'''
Returns the current INA Actor configuration
'''Request'''<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "action": "GET_CONFIG"
  }
}
</syntaxhighlight>'''Response'''<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "INA",
  "task": {
    "action": "GET_CONFIG",
    "taskResult": {
      "success": true,
      "configured": true,
      "enabled": true,
      "address": "0x40",
      "shunt_ohm": 0.020,
      "publish_interval_ms": 1000
    }
  }
}
</syntaxhighlight>
===== 24.12.5 Runtime domain =====
Runtime messages are sent to:
'''ina/runtime/in'''
Runtime replies are published on:
'''ina/runtime/out'''
'''- Manual Runtime read'''
'''Request'''<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "action": "GET_POWER"
  }
}
</syntaxhighlight>'''Response'''<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "INA",
  "task": {
    "action": "GET_POWER",
    "taskResult": {
      "success": true,
      "voltage_v": 24.12,
      "current_a": 0.481,
      "power_w": 11.6
    }
  }
}
</syntaxhighlight>'''- Automatic Runtime Publication'''
Publish topic:
'''ina/runtime/out'''
Period: 1000 ms === 1s
'''Response payload'''<syntaxhighlight lang="json">
{
  "id": "<TIMESTAMP>",
  "origin": "INA",
  "task": {
    "action": "PUBLISH_POWER",
    "taskResult": {
      "success": true,
      "voltage_v": 24.12,
      "current_a": 0.481,
      "power_w": 11.6
    }
  }
}
</syntaxhighlight>
{| class="wikitable"
|'''Field'''
|'''Type'''
|'''Required'''
|'''Description'''
|-
|success
|boolean
| -
|Indicates whether the read operation succeeded
|-
|voltage_v
|number
|V
|Measured bus/input voltage
|-
|current_a
|number
|A
|Measured current
|-
|power_w
|number
|W
|Measured power
|}
=== 25. Included Software Stack ===
=== 25. Included Software Stack ===