Rail¶
API Documentation: [cpp] [python] [.NET] [LabVIEW]
The Rail entity provides power control to connected devices on some modules. Check the module datasheet to determine if the module has this capability.
the Rail entity controls power provided to downstream devices, it has the ability to enable and disable power, can read voltage on the rail, and provides current consumption information on some modules. There are additional capabilities that certain modules provide which enhance basic power delivery through Kelvin sensing, or by bringing online separate power management functionality.
Certain modules may provide more than one power rail. These are independently controlled and can be accessed via the entity index.
Rails on the MTM-PM-1 module are powerful (no pun intended); they allow other devices and peripherals to consume power from the MTM-PM-1 module in a precisely controlled fashion. Two (2) different rails are available for use: a software-adjustable voltage rail (rail), and input voltage pass-through rail (rail1). These rails are accessed through an array of BrainStem rail class entities. The MTM-PM-1 module implements a subset of the BrainStem rail class for each of these rails.
Enable¶
All three rails can be switched on or off through using the API
stem.rail[index].setEnable(state)
[cpp]
[python]
[NET]
[LabVIEW]
Rail Operational Mode¶
RAIL can be configured to use two different regulation stages: linear (LDO) or switch-mode power supply (SMPS)
stem.rail[index].setOperationalMode(mode)
[cpp]
[python]
[NET]
[LabVIEW]
stem.rail[index].getOperationalMode(mode)
[cpp]
[python]
[NET]
[LabVIEW]
Mode |
Operational Mode Description |
---|---|
0 |
railOperationalModeAuto (default) |
1 |
railOperationalModeLinear |
3 |
railOperationalModeSwitcherLinear |
Rail Operational State¶
Auto configuration chooses the switch-mode power supply if an input voltage greater than 7.25V is applied, and the linear regulator otherwise. The API can be used to read the actual operational state
stem.rail[index].setOperationalState(state)
[cpp]
[python]
[NET]
[LabVIEW]
stem.rail[index].getOperationalState()
[cpp]
[python]
[NET]
[LabVIEW]
Bits |
Operational State Field Description |
Rails |
---|---|---|
0 |
Initializing (railOperationalState_Initializing) |
rail[0-1] |
1 |
Enabled (railOperationalState_Enabled) |
rail[0-1] |
2 |
Fault (railOperationalState_Fault) |
rail[0-1] |
3-15 |
Reserved |
. |
8-15 |
Hardware Configuration (railOperationalState_HardwareConfiguration) |
rail0 |
16-17 |
Reserved |
. |
18 |
Overcurrent Fault “OC” (railOperationStateOverCurrentFault) |
rail1 |
19-20 |
Reserved |
. |
21 |
Overtemperature Fault “OT” (railOperationalStateOverTemperatureFault) |
rail0 |
22-31 |
Reserved |
. |
Rail Temperature¶
The printed circuit board (PCB) temperature can be monitored at the 5.0V rail (RAIL) linear regulation stage. Reading this value is possible through the API
stem.rail[index].getTemperature()
[cpp]
[python]
[NET]
[LabVIEW]
Temperature monitoring is also used internally to prevent the power regulation stage from overheating and self-preserving the power stage. If an overtemperature condition occurs, then the MTM-IO-Serial module will disable the linear regulator until safe operating temperatures are reached.
Rail Voltage Setting¶
RAIL always uses linear regulators to generate an adjustable voltage. They can be set or read using the API
stem.rail[index].setVoltage(microvolts)
[cpp]
[python]
[NET]
[LabVIEW]
Rail and Rail1 Current Limits¶
The current limit for each rail can be configured in software from 0A to 3A
stem.rail[index].setCurrentLimit(microamps)
[cpp]
[python]
[NET]
[LabVIEW]
stem.rail[index].getCurrentLimit(microamps)
[cpp]
[python]
[NET]
[LabVIEW]
- Note that the behavior following an overcurrent event differs between rails:
– rail will simply reduce the output voltage to drive the specified current. No fault bits will be set in software. – rail1 will be turned off by the hardware if the output current goes above the set limit. The rail1 Fault and Overcurrent Fault bits will be set and must be cleared before re-enabling the rail.
Rail and Rail1 Current and Voltage¶
The API command to measure what the current and voltages are
stem.rail[index].getCurrent(microamps)
[cpp]
[python]
[NET]
[LabVIEW]
stem.rail[index].getVoltage(microamps)
[cpp]
[python]
[NET]
[LabVIEW]
Rail Kelvin Sensing¶
Remote sensing can be applied to compensate for line loss in a system often found in high transient load applications. The MTM-PM-1 provides a “3-wire” interface to provide feedback to the MTM-PM-1 power supply to adjust appropriately and dynamically
stem.rail[index].setKelvinSensingMode(bEnable)
[cpp]
[python]
[NET]
[LabVIEW]
stem.rail[index].getKelvinSensingMode(bEnable)
[cpp]
[python]
[NET]
[LabVIEW]
- bEnable parameter is an integer that correlates to the following:
0: kelvinSensingOff
1: kelvinSensingOn
Determine whether kelvin sensing is enabled or disabled. Kelvin sensing can be disabled if the power stage incurs a fault on the rail power stage.
stem.rail[index].getKelvinSensingState(state)
[cpp]
[python]
[NET]
[LabVIEW]