TransWikia.com

Technic Medium Hub - What is the difference between Voltage L and S?

Bricks Asked on October 23, 2021

As a computer science with limited Electrical Engineering Knowledge, I wonder what the VLT L and VLT S modes (and the Current counterparts) in the TechnicMediumHub (Control+ Hub) Voltage device are?

I am in process of writing a .NET library for PoweredUp where I want to present a human readable interpretation of it.

Below the dump of the Port(Mode)Information messages.

Port: 60
    IOTypeId: Voltage
    HardwareRevision: 1.0.0.0
    SoftwareRevision: 1.0.0.0
    OutputCapability: True
    InputCapability: False
    LogicalCombinableCapability: True
    LogicalSynchronizableCapability: False
    ModeCombinations: []
    UsedCombinationIndex: 0
    MultiUpdateEnabled: False
    ConfiguredModeDataSetIndex: []
    Mode: 0
      Name: VLT L
      IsInput: True
      IsOutput: False
      RawMin: 0
      RawMax: 4095
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 9615
      Symbol: mV
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: True
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: Int16
      TotalFigures: 4
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 1
      Name: VLT S
      IsInput: True
      IsOutput: False
      RawMin: 0
      RawMax: 4095
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 9615
      Symbol: mV
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: True
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: Int16
      TotalFigures: 4
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False

2 Answers

L and S very probably refer to load and supply voltage. See https://en.wikipedia.org/wiki/Electrical_load for details.

Experimentally, I have not observed any significant differences between these values in use (possibly because the source resistance is small).

Answered by frasertweedale on October 23, 2021

There doesn't appear to be an obvious difference between these two according to a comment in the bricknil source:

Voltage Sensor

Returns the raw mV value (0-3893) which probably needs to be scaled to 0-9600.

It contains two capabilities, although they both appear to do the same thing:

  • sense_l
  • sense_s

They appear to both return the same results in the same way.

There are some low-level ways that these could be different, but I'm not aware of efforts to reverse engineer the firmware and/or boards to that degree, and I'm not aware of documentation that covers this. The official LEGO BLE docs don't go into this level of detail about the voltage sensor.

Here are a couple speculative possibilities:

  • It is common for analog to digital converters to have different modes of operation that trade off speed and accuracy. VLT L and VLT S could make use of different sampling modes and/or averaging. For example, ST discusses using averaging to improve their ADC accuracy here for the ST32 chips used in Powered Up parts.
  • L and S could represent values at different stages in the power subsystem (e.g. regulated voltage vs battery voltage).
  • These could be reserved for use in devices with multiple monitored cells. SPIKE Prime and Mindstorms both use 2 lithium cells in series. These cells are monitored individually, and it could be useful to access their values separately. This doesn't necessarily apply to Control+, but parts of the firmware are likely shared across devices.

I wish I had a better answer for you, but that's the best I could find from digging around. I hope that someone here knows more about this than I do. I'll certainly update this answer if I figure out anything more about this.

Answered by jncraton on October 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP