Power sequencing is an important part of hardware validation and automated testing. Many systems require their power rails and connected devices to be enabled in a specific order, with defined delays between each stage. The system may also need to verify a status or fault signal before proceeding to the next stage.
The LEO CR – 8 Channel USB Relay Module can be used to implement such sequences using its onboard automation capabilities. It can control multiple power stages, introduce configurable delays, and respond to digital input conditions without requiring a PC to continuously issue relay commands.
This article demonstrates a typical DUT power-sequencing application using four relay channels and a digital input.
Application Overview
In this example, the four relay channels are assigned as follows:
| Relay | Function |
|---|---|
| Relay 0 | Main Power |
| Relay 1 | Auxiliary Power |
| Relay 2 | DUT Power |
| Relay 3 | Load |
A digital input is used to monitor a status signal from the Device Under Test (DUT).
The required sequence is:
- Turn ON Main Power.
- Wait for 1 second.
- Turn ON Auxiliary Power.
- Wait for 1 second.
- Turn ON DUT Power.
- Monitor the DUT status input.
- If the expected condition is detected, continue the sequence.
- If a fault condition is detected, execute the defined fault response.
The overall sequence can be represented as:
START
│
▼
Main Power → ON
│
Wait 1 s
│
▼
Auxiliary Power → ON
│
Wait 1 s
│
▼
DUT Power → ON
│
▼
Monitor Digital Input
│
┌─────┴─────┐
│ │
Normal Fault
│ │
▼ ▼
Continue Fault Action
│
▼
Load → ON
Hardware Configuration
A typical hardware arrangement is shown below.
LEO CR – 8 Channel USB Relay Module
┌────────────────┐
│ │
Main Power ──────►│ Relay 0 │
│ │
Auxiliary Power ─►│ Relay 1 │
│ │
DUT Power ───────►│ Relay 2 │
│ │
Load ────────────►│ Relay 3 │
│ │
DUT Status ──────►│ Digital Input 0│
│ │
└────────────────┘
The relays are used as switching elements for the respective power or control paths. The actual relay wiring must be selected according to the voltage, current, isolation, and load requirements of the application.
The digital input should be connected to a suitable DUT status or monitoring signal that meets the electrical specifications of the LEO CR – 8 Channel USB Relay Module’s digital input.
Complete Sequence
The complete example can be summarized as follows:
| Step | Action | Delay | Condition |
|---|---|---|---|
| 1 | Relay 0 ON – Main Power | — | Start |
| 2 | Wait | 1 s | Main Power stabilization |
| 3 | Relay 1 ON – Auxiliary Power | — | After delay |
| 4 | Wait | 1 s | Auxiliary Power stabilization |
| 5 | Relay 2 ON – DUT Power | — | After delay |
| 6 | Monitor digital input | — | DUT status |
| 7 | Continue / enable Relay 3 | — | Expected status |
| 8 | Fault response | — | Unexpected status |
The sequence is therefore:
Relay 1 ON
│
├── Wait 1 s
│
▼
Relay 2 ON
│
├── Wait 1 s
│
▼
Relay 3 ON
│
▼
Monitor Digital Input
│
├───────────────┐
│ │
Normal Fault
│ │
▼ ▼
Continue Fault Action
│
▼
Relay 4 ON
Load Enabled
Configuring the LEO CR 8 Channel USB Relay Module for Power Sequencing
Connect the LEO CR – 8 Channel USB Relay Module to a PC through USB for the initial configuration. Open a serial terminal and configure the relay power-on and timer settings as described below.
Step 1: Configure Main Power
Use the following command:
relay pwron A 0001
This configures Relay 0 to turn ON automatically whenever the LEO CR – 8 Channel USB Relay Module powers up. In this example, Relay 0 is connected to the Main Power.
Step 2: Configure Auxiliary Power
Use the following command:
relay tmr 001 M0 1
This configures Relay 1 for a 1-second delayed ON operation. Relay 1 is connected to the Auxiliary Power.
Step 3: Configure DUT Power
Use the following command:
relay tmr 002 M0 2
This configures Relay 2 for a 2-second delayed ON operation. Relay 2 is connected to the DUT Power.
Timer configurations and poweron configurations are persistent and remain active after a power reset until they are disabled or the device is factory-reset.
Monitor the DUT Status and automatic response
After the DUT power is enabled, one of the digital inputs can be used to monitor a status signal from the DUT.
The Smart Action Engine can then be configured to control a relay based on the state of the digital input. For example, if the DUT provides a HIGH signal to indicate that it is ready to continue, Relay 3 can be configured to turn ON and enable the load.
Use the following command:
smart 000 H 003 1
This configures Relay 3 to turn ON when Digital Input 0 becomes HIGH.
The resulting operation is:
DUT Status
│
├── HIGH ──► Relay 3 ON ──► Load ON
│
└── LOW ───► Relay 3 OFF ─► Load remains OFF
Therefore, the load is enabled only when the DUT provides the expected HIGH status signal.
The Smart Action command follows the format:
smart xxx mode target_output value
where:
xxx= Digital Input numbermode= Action trigger modetarget_output= Relay number to be controlledvalue= Relay state to apply
The LEO CR – 8 Channel USB Relay Module supports the following Smart Action modes:
L– Triggers the action when the digital input is LOW.H– Triggers the action when the digital input is HIGH.F– FOLLOW mode, where the relay continuously follows the state of the digital input.
For example:
smart 000 F 003
configures Relay 3 to follow Digital Input 0.
The operation is as follows:
Digital Input 0 = LOW → Relay 3 = OFF
Digital Input 0 = HIGH → Relay 3 = ON
In FOLLOW mode, the relay state continuously mirrors the state of the configured digital input. This is useful when the relay output needs to directly follow an external digital signal.
Verify the Smart Action Configuration
After configuring the Smart Action, use the following command to verify the configuration for a specific digital input:
smart get 000
This command displays the Smart Action configuration associated with Digital Input 0.
For example:
M:H R:003:H
indicates that Digital Input 0 is configured to trigger when the input is HIGH and is mapped to Relay 3.
To view the Smart Action configurations associated with all digital inputs, use:
smart get
This command displays the Smart Action configuration for the digital inputs that have Smart Actions configured.
Test the Sequence
The sequence can now be tested in stages. Before starting the test, turn OFF any relays that were enabled during the configuration process by using the following command:
relay off all
This ensures that all relay outputs are in the OFF state before the automated power sequence begins.
Stage 1 – Main Power
Send:
relay on 000
Verify that Main Power is enabled.
Stage 2 – Auxiliary Power
Send:
relay on 001
Verify that Auxiliary Power is enabled.
Stage 3 – DUT Power
Send:
relay on 002
Verify that the DUT receives power.
Stage 4 – DUT Status
Check:
gpi read 000
When the DUT produces the expected HIGH status, the configured Smart Action can activate Relay 4:
Digital Input 0 = HIGH
│
▼
smart 000 H 003 1
│
▼
Relay 3 = ON
This demonstrates that the final relay operation can occur based on the DUT status rather than requiring a PC application to continuously poll the input and issue the relay command.
Verify Relay States
At any point, the current state of all relays can be checked with:
relay status
For example:
A:000F
means that Relay 0 through Relay 3 are ON.
The LEO CR – 8 Channel USB Relay Module represents relay states as bits in a hexadecimal value, with bit 0 corresponding to Relay 0.
For the four-relay example:
Relay 0 → Bit 0
Relay 1 → Bit 1
Relay 2 → Bit 2
Relay 3 → Bit 3
Fault Handling
For fault handling, the LEO CR – 8 Channel USB Relay Module provides an IO Failsafe feature that can be configured based on the state of a digital input. This allows the relay outputs to be automatically set to a predefined state when a specified input condition occurs.
For example:
fs 000 L A 0000
This configures the failsafe for Digital Input 0 to activate when the input becomes LOW. The hexadecimal value 0000 defines the desired state of the relay outputs, with all relays set to OFF.
The failsafe feature can be used to place the relay outputs in a predefined state when a fault or unexpected input condition is detected.
To view the current failsafe configuration, use:
fs get
To disable the configured failsafe, use:
fs disable
To manually reset the failsafe configuration, use:
fs reset
Standalone Operation
After the Smart Action and required timer configurations have been verified, the module can execute the configured automation independently without requiring continuous intervention from a host PC. The configured power-sequencing and input-driven operations are automatically executed each time the LEO CR – 8 Channel USB Relay Module is powered on.
The PC is primarily used for:
- Initial configuration
- Testing and verification
- Troubleshooting
- Monitoring relay and input status
- Modifying or updating the automation configuration
Once configured, the Smart Action Engine operates independently, and the Relay Timer and power-on configurations remain persistent across power resets. This allows the module to perform the configured power-sequencing operation as a standalone device.
Disabling the Configuration
During development or when the automation is no longer required, the configured functions can be disabled.
Disable all Smart Actions
smart disable
Disable all Relay Timers
relay tmr disable
Disable a specific Relay Timer
relay tmr disable 001
These commands allow the configuration to be changed without performing a factory reset.
Summary
The LEO CR – 8 Channel USB Relay Module can be used as a standalone power-sequencing controller for DUT testing and other automated power-control applications. By combining its power-on relay configuration, Relay Timer Engine, Smart Action Engine, digital inputs, and IO Failsafe features, the module can execute a predefined sequence without requiring a PC to continuously control the relays.
In this application, the LEO CR – 8 Channel USB Relay Module automatically:
- Turns ON the Main Power when the module powers up.
- Turns ON the Auxiliary Power after the configured delay.
- Turns ON the DUT Power after the required additional delay.
- Monitors a DUT status signal through a digital input.
- Enables the Load when the expected status condition is detected.
- Places the relay outputs in a predefined state if a fault condition is detected.
The PC is required primarily for the initial configuration, testing, monitoring, and modification of the automation settings. Once configured, the module executes the power-sequencing and input-driven operations locally, including after subsequent power resets.
This approach eliminates the need for a continuously running PC application to poll inputs and issue relay commands, allowing the LEO CR – 8 Channel USB Relay Module itself to handle the repetitive power-control and response logic. This makes it suitable for DUT power-up testing, hardware validation, production test fixtures, automated power-cycle testing, and other applications requiring reliable and repeatable power sequencing.
For the complete syntax, relay groups, input configuration, and other supported automation features, refer to the LEO CR – 8 Channel USB Relay Module documentation.