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.
At its core, the module integrates a PCA9538 I²C port expander, which lets the NORVI X CPU (ESP32‑S3) read all 8 input states over the internal expansion bus. With 4 selectable I²C addresses (via onboard DIP switches), up to 4 X-DA8 modules can be daisy‑chained on one controller, giving a maximum of 32 digital inputs per NORVI X system.
This guide covers the installation, wiring, I²C address configuration, Arduino IDE setup, diagnostic test code, input testing, and troubleshooting of the NORVI X-DA8.
Key Features #
- 8 × optically isolated 230/110 V AC digital inputs
- One common neutral terminal for all eight inputs
- PCA9538 I²C port expander
- Four selectable I²C addresses
- Input switching frequency up to 1 kHz
- Individual LED status indicators for all eight inputs
- 24 V DC module supply 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-DA8. Failure to do so may result in electric shock or damage to the equipment. The NORVI X-DA8 accepts 230 V AC field inputs. Incorrect wiring or contact with energized terminals can cause electric shock, serious injury, or death.
- Install and wire this module only if you are a qualified electrician or trained technician familiar with industrial control equipment.
- Disconnect all power sources before installing, wiring, or servicing the module.
- Do not connect or disconnect the expansion module while the system is powered.
- Verify the field wiring and terminal assignments before applying power.
- Use appropriate protection devices and wiring according to local electrical regulations.
- Ensure that the module is installed inside a suitable electrical enclosure.
- Do not exceed the specified input voltage.
- The X-DA8 has an IP20 enclosure rating and must be protected from water, dust, and direct environmental exposure.
- Keep the operating environment within minus 40 to plus 85 degrees C and avoid condensing humidity.
- Ensure adequate clearance for wiring and ventilation.
- Follow all local and national electrical codes applicable to industrial control panel wiring.
Technical Specifications #
Electrical #
| Rated Supply Voltage | 24V DC |
| Current Consumption | 40mA @ 24V DC |
Input Specifications #
| Number of Inputs | 8 Digital Inputs |
| Input Type | Isolated 110/230 V AC , Sinking and Sourcing |
| Rated Supply Voltage | 24 V DC |
| Interface | I²C |
| I²C Device | PCA9538 |
| Isolation | 1500 Vrms |
| Switching Frequency | Up to 1 kHz |
| Status Indicators | 8 × input LEDs |
| Mounting | DIN rail |
The X-DA8 uses opto-coupler isolation for each input channel, providing electrical isolation between the AC field signals and the CPU-side electronics.
Hardware Layout & GPIO Map #
The X-DA8 provides eight AC input terminals and one common neutral terminal.
| Terminal | Function |
|---|---|
| AC1 | Digital Input 1 |
| AC2 | Digital Input 2 |
| AC3 | Digital Input 3 |
| AC4 | Digital Input 4 |
| AC5 | Digital Input 5 |
| AC6 | Digital Input 6 |
| AC7 | Digital Input 7 |
| AC8 | Digital Input 8 |
| N | Neutral |
I2C Address Selection

| Address Selection | ||||
|---|---|---|---|---|
| DIP 1 | DIP 2 | DIP 3 | DIP 4 | Address |
| OFF | OFF | × | × | 0x73 |
| ON | OFF | × | × | 0x72 |
| OFF | ON | × | × | 0x71 |
| ON | ON | × | × | 0x70 |
The X DA8 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 DA8 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’s logic side draws its 24 V DC supply through the expansion port itself, shared with the CPU, so there is no separate low-voltage power terminal to wire on the X-DA8. The 230 V AC field wiring described below is entirely separate from this logic supply.
For example:
- Connect the AC signal for Channel 1 to AC1.
- Connect the AC signal for Channel 2 to AC2.
- Continue the same arrangement for AC3 through AC8.
- Connect the corresponding neutral/reference conductor to N.
Important: The X-DA8 is designed for AC field inputs. Verify that the applied voltage is within the specified input rating before connecting any field device.
Digital Input Wiring #
- Connect the phase (line) side of each 110 / 230 V AC field signal – switch, contactor auxiliary contact, or sensor output – to the corresponding ACx terminal.
- Connect the neutral of the same AC circuit to the shared N terminal.
- For a simple mains-referenced switch or dry contact rated for AC use, wire one side of the contact to ACx and the other side to N.
- Since all eight inputs share a single N terminal, every input on the module must be referenced to the same AC neutral – do not mix circuits from different phases or isolated AC sources on one module.
- Route 110 / 230 V AC field wiring separately from the low-voltage expansion bus and CPU wiring inside the enclosure, per local electrical code.

Connecting the Module to the CPU #
- Power off the system and isolate the 110 / 230 V AC field circuit.
- Mount the X-DA8 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 X-DA8 is being installed.
- Wire your field signals to the AC1 through AC8 and N terminals, confirming the supply does not exceed 230 V AC.
- Power the system back on and re-energize the AC field circuit.
- 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.

Expansion Port (50 pin) #
The X DA8 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 INDEX | Purpose | GPIO | SOURCE |
|---|---|---|---|
| 1 | MOSI | IO11 | ESP32-S3 |
| 2 | MISO | IO13 | |
| 3 | SCLK | IO12 | |
| 4 | GND | —- | |
| 5 | SCL | IO9 | |
| 6 | SDA | IO8 | |
| 7 | GND | —- | |
| 8 | RX1 | IO18 | |
| 9 | TX1 | IO17 | |
| 10 | GND | —- | |
| 11 | D+ | —- | |
| 12 | D- | —- | |
| 13 | GND | —- | |
| 14 | CS1 | P1_0 | PCA9539 I2C Address 0x75 |
| 15 | CS2 | P0_7 | |
| 16 | CS3 | P0_6 | |
| 17 | CS4 | P0_5 | |
| 18 | IO1 | IO1 | ESP32-S3 |
| 19 | IO2 | IO2 | |
| 20 | IO4 | IO4 | |
| 21 | IO5 | IO5 | |
| 22 | IO6 | IO6 | |
| 23 | IO7 | IO7 | |
| 24 | IO10 | IO10 | |
| 25 | IO11 | IO35 | |
| 26 | IO12 | IO36 | |
| 27 | IO13 | IO37 | |
| 28 | IO14 | IO14 | |
| 29 | RS485_TX | IO15 | |
| 30 | GND | —- | |
| 31 | GND | —- | |
| 32 | RS485_RX | IO16 | |
| 33 | P1_1 | P1_1 | PCA9539 I2C Address 0x75 |
| 34 | P1_2 | P1_2 | |
| 35 | IO21 | IO21 | PCA9538 Reset |
| 36 | GND | —- | |
| 37 | GND | —- | |
| 38 | P1_3 | P1_3 | PCA9539 I2C Address 0x75 |
| 39 | P1_4 | P1_4 | |
| 40 | P1_5 | P1_5 | |
| 41 | IO39 | IO39 | ESP32-S3 |
| 42 | IO40 | IO40 | |
| 43 | NC | —- | |
| 44 | NC | —- | |
| 45 | NC | —- | |
| 46 | GND | —- | |
| 47 | 5V | 5V | |
| 48 | GND | GND | |
| 49 | 24V | 24V | |
| 50 | 24V | 24V |
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 #
-
Install Arduino IDE
Install the Arduino IDE and add ESP32 board support:
-
Connect the Controller
Connect the NORVI X CPU to your computer using the USB interface.
-
Select Board and Port
Configure the board and communication port:


Configure Board Settings #
Under the Tools menu, configure the following settings:
| Setting | Selection |
|---|---|
| USB CDC On Boot | Enabled |
| Flash Size | 16MB (128Mb) |
| PSRAM | QSPI 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
- Free_Fonts
Install the Required Library #
Install the Wire library through:
Search for Wire and install it if required.

Open and Upload the Test Sketch #
- Open the NORVI X-DA8 test sketch from the NORVI GitHub repository .
- Verify the board and port selections.
- 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.
#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-DA8 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 DA8 on the same bus.
Digital Input Read (X DA8 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.
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-DA8 INPUT TEST at the top, followed by AC1 through AC8 with a live value beside each. Toggling a 230 V AC field signal 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
| Symptom | Suggested Action |
|---|---|
| No response from an input | Check the AC wiring and confirm N is properly connected to the field circuit’s neutral return. |
| LED stays off despite an active sensor | Confirm the input is receiving a genuine 110 / 230 V AC signal and that the field circuit is energized. |
| Module not detected on the I2C scan | Power down, reseat the module on the expansion bus, and confirm the DIP switch address doesn’t conflict with another installed X-DA8. |
| Two stacked modules interfere with each other | Check that each X-DA8 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. |
Support & Resources #
Access product documentation, firmware resources, and technical support for your NORVI device.