XStore

NORVI X-DI8 – USER GUIDE

Updated on September 2, 2026

7 min read

NORVI X is a next generation modular industrial controller designed to power smart automation and IoT solutions. Built around a CPU module and a range of plug and play expansion modules, the platform scales from a handful of I/O points up to 200, giving system integrators, OEMs, and industrial engineers a flexible foundation for automation, remote monitoring, and data acquisition projects.

The NORVI X DI8 is an 8 channel digital input expansion module for the NORVI X platform. It adds protected 24V DC inputs for switches, sensors, and logic level signals, and connects to the CPU over the internal expansion bus using a PCA9538 I2C port expander. With four selectable addresses, up to four DI8 modules can sit on the same bus at once, giving a controller as many as 32 digital inputs.

Key Features #

  • Eight optically isolated 24V DC digital inputs
  • Supports both sourcing (PNP) and sinking (NPN).
  • One shared common terminal for all eight inputs
  • PCA9538 I2C port expander with four selectable addresses
  • Up to four DI8 modules per controller, for 32 inputs total
  • DIN rail mountable enclosure with spring terminals
  • Plug and play connection to the CPU module through the expansion bus
  • One status LED per input channel
  • CE / EMC compliant (EN 61131-2:2007, EN 61010-1:2010+A1:2019, EN IEC 61010-2-201:2018, 2014/30/EU)

Safety Information #

Warning: Disconnect all power sources before installing, wiring, or servicing the NORVI X-DI8. Failure to do so may result in electric shock or damage to the equipment.

  • Install and wire this module only if you are a qualified electrician or trained technician familiar with industrial control equipment.
  • Confirm the host CPU is running from a regulated 24 V DC supply, since the module draws its power through the expansion port rather than a separate connection.
  • Mount the module on a DIN rail inside a suitably rated enclosure. It carries an IP20 protection rating and is not designed for direct outdoor or wash down exposure.
  • Keep the operating environment within minus 40 to plus 85 degrees C and avoid condensing humidity.
  • Do not connect or disconnect the module from the expansion bus while the system is powered.
  • Follow all local and national electrical codes applicable to industrial control panel wiring.

Technical Specifications #

Electrical #

Rated Supply Voltage24V DC
Current Consumption40mA @ 24V DC

Input Specifications #

Number of Inputs8 Digital Inputs
Input TypeIsolated 24 V DC, Sinking and Sourcing
Input Voltage Range0 to 30 V DC
Logic Low (OFF)Below 5 V DC
Logic High (ON)Above 15 V DC
Input ImpedanceApproximately 3.3 kΩ
Input CurrentApproximately 7 mA at 24 V DC
Switching FrequencyUp to 1 kHz
Isolation TypeOptocoupler isolation per channel
Status Indicators8 LED input indicators
Connector TypeSpring terminal

Hardware Layout & GPIO Map #

The table below lists the terminals on the X DI8 and how they map into the PCA9538 port expander. Unlike the direct GPIO input modules, none of the host CPU’s GPIO pins are claimed by the input channels themselves, only SCL and SDA are shared across the I2C bus.

TerminalFunction
IN1Digital Input 1
IN2Digital Input 2
IN3Digital Input 3
IN4Digital Input 4
IN5Digital Input 5
IN6Digital Input 6
IN7Digital Input 7
IN8Digital Input 8
DCOMIsolated digital common

I2C Address Selection #

Address Selection
DIP 1DIP 2DIP 3DIP 4Address
OFFOFF××0x73
ONOFF××0x72
OFFON××0x71
ONON××0x70

The X DI8 connects to the host CPU’s I2C bus using SCL on IO9 and SDA on IO8. DIP switches 3 and 4 are not used for addressing. Set each stacked DI8 module to a different address so the CPU can talk to them individually on the shared I2C bus.

Wiring Guide #

GPIO pin assignments for the I2C bus are listed in the Expansion Port table below; this section covers how to physically wire the module, not the pin numbers themselves.

Power Connection #

The module draws its 24 V DC supply through the expansion port itself, shared with the CPU, so there is no separate power terminal to wire on the X DI8.

Digital Input Wiring #

  • For a sourcing (PNP) sensor, connect the sensor’s signal output to the corresponding INx terminal, and connect the sensor’s negative or ground lead to DCOM.
  • For a sinking (NPN) sensor, connect the sensor’s signal output to the corresponding INx terminal, and tie the sensor’s positive lead to the 24 V supply, with DCOM referenced to the same supply ground.
  • For a simple dry contact switch, wire one side of the contact to INx and the other side to DCOM.
  • Since all four inputs share a single DCOM terminal, sourcing and sinking sensors cannot be mixed on the same module. Choose one wiring style for all four channels.

Connecting the Module to the CPU #

  • Power off the system.
  • Mount the X DI8 on the DIN rail next to the CPU module or an adjacent expansion module.
  • Seat it firmly onto the expansion bus connector until it locks into place.
  • Set the module’s DIP switches to a free I2C address, especially if more than one DI8 is being installed.
  • Wire your field signals (switches, sensors, dry contacts) to the INPUT 1 through INPUT 8 terminals, confirming each signal stays within the module’s 0 to 30 V DC input range.
  • Power the system back on.
  • Upload the module’s test sketch from the NORVI GitHub repository to confirm each channel reads correctly before wiring it into your final control logic.
NORVI EX-DI8 Wiring

Expansion Port (50 pin) #

The X DI8 connects via the same 50 pin expansion bus used across the NORVI X range. Pins 5 and 6 (SCL and SDA) are the ones this module relies on for communication; all other pins remain available for other expansion modules or custom wiring.

PIN INDEXPurposeGPIOSOURCE
1MOSIIO11ESP32-S3
2MISOIO13
3SCLKIO12
4GND—-
5SCLIO9
6SDAIO8
7GND—-
8RX1IO18
9TX1IO17
10GND—-
11D+—-
12D-—-
13GND—-
14CS1P1_0PCA9539
I2C Address 0x75
15CS2P0_7
16CS3P0_6
17CS4P0_5
18IO1IO1ESP32-S3
19IO2IO2
20IO4IO4
21IO5IO5
22IO6IO6
23IO7IO7
24IO10IO10
25IO11IO35
26IO12IO36
27IO13IO37
28IO14IO14
29RS485_TXIO15
30GND—-
31GND—-
32RS485_RXIO16
33P1_1P1_1PCA9539
I2C Address 0x75
34P1_2P1_2
35IO21IO21PCA9538 Reset
36GND—-
37GND—-
38P1_3P1_3PCA9539
I2C Address 0x75
39P1_4P1_4
40P1_5P1_5
41IO39IO39ESP32-S3
42IO40IO40
43NC—-
44NC—-
45NC—-
46GND—-
475V5V
48GNDGND
4924V24V
5024V24V

Software Setup (Arduino IDE) #

The NORVI X-DI8 is read through the host CPU using the Arduino IDE with the ESP32 board package. Firmware examples and required libraries are maintained in the NORVI GitHub repository.

Board Configuration #

  1. Install Arduino IDE

    Install the Arduino IDE and add ESP32 board support:

    Tools → Board → Boards Manager → ESP32
  2. Connect the Controller

    Connect the NORVI X CPU to your computer using the USB interface.

  3. Select Board and Port

    Configure the board and communication port:

    Tools → Board → ESP32 Arduino → ESP32S3 Dev Module
    Tools → Port → Select the corresponding COM/serial port
Arduino IDE Board and Tools Menu Configuration
Arduino IDE Board and Tools Menu Configuration
Upload Setting Under the Tools Menu
Upload Setting Under the Tools Menu

Configure Board Settings #

Under the Tools menu, configure the following settings:

SettingSelection
USB CDC On BootEnabled
Flash Size16MB (128Mb)
PSRAMQSPI PSRAM

Test Code Examples

Required Libraries

Install these via Arduino IDE → Sketch → Include Library → Manage Libraries before compiling any of the examples below:

  • Wire
  • SPI
  • PCA9538
  • TFT_eSPI

Required Libraries #

Install these via Arduino IDE → Sketch → Include Library → Manage Libraries before compiling any of the examples below:

  • Wire
  • SPI
  • PCA9538
  • TFT_eSPI
  • Free_Fonts

Install the Required Library #

Install the Wire library through:

Sketch → Include Library → Manage Libraries

Search for Wire and install it if required.

Opening the Arduino IDE Library Manager
Figure 5: Opening the Arduino IDE Library Manager
The required libraries are also available in the NORVI-X-Version-02 GitHub repository .

Open and Upload the Test Sketch #

  1. Open the NORVI X-DI8 test sketch from the NORVI GitHub repository .
  2. Verify the board and port selections.
  3. Click Upload to upload the test sketch to the NORVI X CPU.

Initialization #

This sets up the I2C bus, resets the PCA9538, configures all eight channels as inputs, and starts the TFT display. Run this first to confirm the module powers up and the expander responds before checking individual channels.

⚙️
filename.js
Copy
#define PCA9538_ADDR 0x73
 #define SDA_PIN 8
 #define SCL_PIN 9
 #define MISO_PIN 13
 #define MOSI_PIN 11
 #define SCLK_PIN 12
 #define PCA_RESET 21
PCA9538 io(PCA9538_ADDR);
 TFT_eSPI tft = TFT_eSPI();
void setup()
 {
 Serial.begin(115200);
 delay(1000);
 Serial.println("NORVI X-DI8 TEST");
pinMode(PCA_RESET, OUTPUT);
 digitalWrite(PCA_RESET, HIGH);
Wire.begin(SDA_PIN, SCL_PIN);
io.pinMode(1, INPUT);
 io.pinMode(2, INPUT);
 io.pinMode(3, INPUT);
 io.pinMode(4, INPUT);
 io.pinMode(5, INPUT);
 io.pinMode(6, INPUT);
 io.pinMode(7, INPUT);
 io.pinMode(8, INPUT);
SPI.begin(SCLK_PIN, MISO_PIN, MOSI_PIN);
 tft.init();
 tft.setRotation(0);
 drawLabel();
 }

Note the PCA9538_ADDR value of 0x73 matches the default DIP switch setting from Section 5 (DIP 2 off, DIP 1 off). Change this value to match whichever address your module’s DIP switches are set to, especially when stacking more than one DI8 on the same bus.

Digital Input Read (X DI8 Test Sketch Excerpt) #

The main loop polls all eight channels through the PCA9538 and only redraws a value on screen when it changes, so the display stays responsive as inputs toggle.

Copy
void loop()
 {
 int state[8];
 state[0] = io.digitalRead(1);
 state[1] = io.digitalRead(2);
 state[2] = io.digitalRead(3);
 state[3] = io.digitalRead(4);
 state[4] = io.digitalRead(5);
 state[5] = io.digitalRead(6);
 state[6] = io.digitalRead(7);
 state[7] = io.digitalRead(8);
for(int i = 0; i < 8; i++)
 {
 if(state[i] != oldState[i])
 {
 updateInput(i, state[i]);
 oldState[i] = state[i];
 }
 }
 delay(10);
 }
void updateInput(uint8_t ch, uint8_t value)
 {
 int y = 80 + (ch * 30);
 tft.fillRect(100, y - 20, 80, 25, TFT_BLACK);
if(value)
 tft.setTextColor(TFT_GREEN, TFT_BLACK);
 else
 tft.setTextColor(TFT_RED, TFT_BLACK);
tft.setCursor(100, y);
 tft.print(value);
 Serial.printf("DI%d = %d\n", ch + 1, value);
 }

Validating the Full Test Sketch #

When the complete sketch runs successfully, the display shows NORVI X DI8 INPUT TEST at the top, followed by DI1 through DI8 with a live value beside each. Toggling a sensor or dry contact on any channel should flip its value between 0 and 1 on screen almost instantly, with the Serial Monitor printing a matching line, confirming that channel is reading correctly before it goes into your final control logic.

Troubleshooting #

SymptomSuggested Action
No response from an inputCheck the wiring polarity and confirm that DCOM is properly connected to the sensor’s return path.
LED stays off despite an active sensorConfirm that the input voltage exceeds the 15 V logic-high threshold.
Module not detected on the I2C scanPower down, reseat the module on the expansion bus, and confirm the DIP switch address doesn’t conflict with another installed DI8.
Two stacked modules interfere with each otherCheck that each DI8 is set to a different I2C address using its DIP switches.
TFT display blank or not working Check three settings under Tools: USB CDC On Boot set to Enabled, Flash Size set to 16MB (128Mb), and PSRAM set to QSPI PSRAM.

10. Support & Resources #

Access product documentation, firmware resources, and technical support for your NORVI device.

Product Documentation & Datasheets NORVI X-DI8 Datasheet
Product Page Visit NORVI
Firmware Examples & Libraries NORVI X Version 02 GitHub Repository
Technical Support support@norvi.io