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 allow other devices and peripherals to consume power from the MTM-IO-SERIAL module in a controlled fashion. Three (3) different rails are available for use in a variety of application: a single fixed 5.0V rail (RAIL0) and 2 adjustable voltage rails (RAIL1, RAIL2). These rails are accessed through an array of BrainStem rail class entities. The MTM-IO-SERIAL module implements a subset of the BrainStem rail class for each of these rails. The implemented rail entity options for each entity index are summarized below.

Enable

All three rails can be switched on or off through using the API

stem.rail[index].setEnable(state) [cpp] [python] [NET] [LabVIEW]

Rail0 Operational Mode

RAIL0 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

Result

0

Auto

1

Linear

2

Switcher

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].getOperationalState(state) [cpp] [python] [NET] [LabVIEW]

State

Result

0

Linear

1

Switcher

Rail0 Temperature

The printed circuit board (PCB) temperature can be monitored at the 5.0V rail (RAIL0) 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.

Rail1 and Rail2 Voltage Setting

RAIL1 and RAIL2 always use linear regulators to generate their adjustable voltages. They can be set or read using the API

stem.rail[index].setVoltageSetpoint(microvolts) [cpp] [python] [NET] [LabVIEW]

stem.rail[index].getVoltageSetpoint(microvolts) [cpp] [python] [NET] [LabVIEW]

Rail Voltage

Getting the rail voltage from any of the rails can be used by implementing

stem.rail[index].getVoltage(microvolts) [cpp] [python] [NET] [LabVIEW]

Rail Protection

Each rail is current limited in hardware to 100mA and will operate in constant-current mode upon reaching 100mA. Extended operation in constant-current mode is discouraged and may result in thermal shutdown of the rail.

Each rail is automatically disconnected when an overvoltage condition is detected and automatically reconnected if the overvoltage condition ceases. Overvoltage detection is implemented in hardware and based on the rail’s voltage setpoint.