Skip to content

Use PDLS with the EXT4 extension board

This technical note details how to use PDLS with the EXT4 extension board.

Danger

When the EXT4 extension board is connected to the main controller board, ensure only one power source is used.

Either through the USB cable:

  • Remove the two CR2450 batteries, and
  • Power the main controller board and the EXT4 through the USB cable;

or with the two CR2450 batteries:

  • Disconnect the USB cable, and
  • Power the main controller board and the EXT4 with the two CR2450 batteries.

EXT4 extension board

The EXT4 extension board is specifically designed to be used as an Internet of Thing, or IoT, device.

It features the circuit for a small e-paper display with a panel power control circuit, an RGB LED, a button, an 3-axis accelerometer, a temperature and humidity sensor, a passive NFC, a Flash SPI memory and pads for an optional SPI memory.

Warning

The EXT4 extension board requires the panelPower signal, as the power control circuit is normally off.

Danger

The EXT4 extension board and the EPDK-Matter developement kit require power and signals at 3.3V.

Board configuration

Driving an e-paper display through the EXT4 extension board requires a minimum of 9 signals, and up to 20 signals with all the sensors and interrupts, RGB LED and external memory.

Signal Minimal Sensors Optional
Power +3.3V, Ground
SPI bus Clock, Data in Data out
Panel Select, Reset, Busy,
Data/Command, Power
Flash Select, Second select
I²C bus Clock, Data
RGB LED Data
Sensors Interrupts x5
Total 9 2 9

The standard board definition of PDLS can be used with the EXT4 extension board, with three major differences compared to EXT3.1 extension board:

  • panelPower in pin  20  is required, as the EXT4 extension board features a panel power control circuit, normally off;

  • panelCSS is not available, as the EXT4 extension board drives only small panels;

  • touchIn and touchReset are not available, as the EXT4 extension board does not support touch.

Like for the EXT3.1 extension board, the flashCSS signal in pin  15  is optional, as the EXT4 extension board provides pads for a second external SPI memory, Flash or SRAM.

Connector

The EXT4 extension board features a 2x10-way connector.

Pins 1 to 10 are compatible with the EXT3 and EXT3.1 extension boards.

Variable Number Signal Type Function
 1  VCC +3.3V P Power Supply
 2  SPI SCK SPI SPI clock
.panelBusy  3  Panel !BUSY O Panel busy signal
.panelDC  4  Panel D/C I Panel Data/Command control
.panelReset  5  Panel /RESET I Panel reset
 6  SPI MISO SPI SPI MISO
 7  SPI MOSI SPI SPI MOSI
.flashCS  8  Flash /CS I Flash chip select
.panelCS  9  Panel /CS I Panel chip select
 10  Ground P Ground

Pins 11 to 20 are specific to the EXT4 extension board. All the signals are new, except the second SPI memory chip select.

Variable Number Signal Type Function
.panelPOWER  11  P_POWER I MOSFET for panel power control
 12  SWITCH O Switch position
 13  LED_DATA I WS2813C data signal
 14  I2C_SDA I²C I²C data signal, bi-directional
 15  I2C_SCL I²C I²C clock signal
.flashCSS  16  F_CS2 I Second SPI memory chip select
 17  NFC_FD O NT3H2111 field detect interrupt
 18  IMU_INT1 O LIS2DH12 first interrupt
 19  IMU_INT2 O LIS2DH12 second interrupt
 20  RHT_INT O HDC2080 interrupt
Type
  • P = power
  • O = output
  • I = input
  • SPI = serial peripheral interface
  • I²C = inter-integrated circuit

The SPI bus connects the screen, Flash memory and optional second memory. The SPI MISO signal is used as SDIO to read the OTP memory. Pull-up resistors on the chip select lines maintain the Flash memory and the optional second memory unselected.

The I²C bus connects the HDC2080 temperature and relative humidity sensor, the LIS2DH12 3-axis accelerometer, and the NT3H2111 passive NFC controller.

Screens

The EXT4 extension board supports the monochrome screens with wide temperature and embedded fast update (film K) up to 2.90”.

The same content on different screens

The EXT4 extension board also supports the colour black-white-red-yellow screens (film Q).

Sensors

The PDLS library does not manage the I²C sensors, the button or the addressable RGB LED. However, it exposes the interrupt signals of the I²C sensors, the button and the addressable RGB LED.

Reference Manufacturer Function
LIS2DH12 STMicroelectronics MEMS digital output motion sensor: ultra-low-power high-performance 3-axis “femto” accelerometer
NT3H2111 NXP NTAG I²C plus 1K, NFC Forum Type 2 Tag with I²C interface
MX25R8035F Macronix Ultra Low Power 1M-bit Flash memory
HDC2080 Texas Instruments Ultra-low-power digital relative humidity sensor with interrupt
Not populated Pads for second SPI external memory
WS2813C World Semi Low power addressable RGB LED

Configure

The EXT4 extension board requires the panelPower in pin  11 , as the power control circuit is normally off.

Legacy procedure

Legacy release 8

The legacy procedure relies on the PDLS_EXT4_Basic_Matter variant. It targets the screens with wide temparture and embedded fast update (film K); and the boards Arduino Nano Matter and Silicon Labs BGM220 Explorer.

Install the PDLS_EXT4_Basic_Matter library through the Arduino IDE. Learn more at the PDLS_EXT4_Basic_Matter GitHub repository .

The recommended procedure is valid for all the editions and all the variants. There are two other procedure without editing the hV_List_Options header file.

``` cpp

define BOARD_EXT4 4 ///< EXT4 board

define USE_EXT_BOARD BOARD_EXT4 ///< Selected board

```

On the hV_List_Options header file, set USE_EXT_BOARD to BOARD_EXT4.

Example

This is the definition of the Arduino Nano Matter board when BOARD_EXT4 is selected.

``` cpp /// /// @brief Arduino Nano Matter with Silicon Labs MGM240P, tested /// @details Variant of boardArduinoNanoMatter with panelPower, button and LED for EXT4 /// @note Numbers refer to pins /// @note Recommended board /// const pins_t boardArduinoNanoMatter = { .panelBusy = 10, ///< EXT3 and EXT3-1 pin 3 Red -> D10 .panelDC = 9, ///< EXT3 and EXT3-1 pin 4 Orange -> D9 .panelReset = 8, ///< EXT3 and EXT3-1 pin 5 Yellow -> D8 .flashCS = 7, ///< EXT3 and EXT3-1 pin 8 Violet -> D7 .panelCS = 6, ///< EXT3 and EXT3-1 pin 9 Grey -> D6

.panelCSS = NOT_CONNECTED, ///< EXT4 not available
.flashCSS = 5, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> D5
.touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Red
.touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange
.panelPower = 2, ///< EXT4 pin 20 White -> D2
.cardCS = NOT_CONNECTED, ///< External SD-card board
.cardDetect = NOT_CONNECTED, ///< External SD-card board

// EXT4 specific
.button = 3, // EXT4 pin 12 Grey -> D3
.ledData = 4, // EXT4 pin 13 Violet WS2813C -> D4
.nfcFD = 17, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 -> A3
.imuInt1 = 16, // EXT4 pin 18 Red LIS2DH12 !INT1, I2C address = 0x19 -> A2
.imuInt2 = 15, // EXT4 pin 19 Brown LIS2DH12 !INT2, I2C address = 0x19 -> A1
.weatherInt = 14, // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 -> A0

}; ```

Custom board procedure

A specific board is defined on the main program with .panelPower set.

Example

This example shows a modified board definition, to be adapted to the specific main controller board.

``` cpp const pins_t myBoardEXT4 = { .panelBusy = 13, ///< EXT4 pin 3 Red .panelDC = 12, ///< EXT4 pin 4 Orange .panelReset = 11, ///< EXT4 pin 5 Yellow .flashCS = 10, ///< EXT4 pin 8 Violet .panelCS = 17, ///< EXT4 pin 9 Grey .panelCSS = NOT_CONNECTED, ///< Signal not available .flashCSS = 15, ///< EXT4 pin 15 Green2, optional .touchInt = NOT_CONNECTED, ///< Signal not available .touchReset = NOT_CONNECTED, ///< Signal not available .panelPower = 16, ///< EXT4 pin 11 White2, required .cardCS = NOT_CONNECTED, ///< Separate SD-card board .cardDetect = NOT_CONNECTED, ///< Separate SD-card board };

// Driver

include “Pervasive_Wide_Small.h”

Pervasive_Wide_Small myDriver(eScreen_EPD_271_KS_09, myBoardEXT4);

// Screen

include “PDLS_Basic.h”

Screen_EPD myScreen(&myDriver); ```

Custom pin procedure

A standard board definition is used and the panel power pin is specified at run-time.

``` cpp // Driver

include “Pervasive_Wide_Small.h”

Pervasive_Wide_Small myDriver(eScreen_EPD_271_KS_09, boardArduinoNanoMatter);

// Screen

include “PDLS_Basic.h”

Screen_EPD myScreen(&myDriver);

myScreen.setPanelPowerPin(16); myScreen.begin(); ```

setPanelPowerPin()
defines the pin used for panel power.

The required parameter is

  • the GPIO or pin number for the panel power signal.

Warning

The setPanelPowerPin() function should always be called before begin() so the panel power pin is initialised.

Use

Use the screen like any other.


See also