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 driver 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.
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
andtouchReset
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
= powerO
= outputI
= inputSPI
= serial peripheral interfaceI²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.
Sensors¶
The PDLS library does not manage the I²C sensors, the button or 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.
The general procedure is valid for all the editions and all the variants.
The specific procedure relies on a variant of the PDLS Basic edition, PDLS_EXT4_Basic_Matter
, aimed at the E-Paper Development Kit for Matter (EPDK-Matter) and monochrome screens with wide temperature and embedded fast update.
General procedure¶
There are three options to define the panel power pin.
-
Edit the board definition on the
hV_List_Boards.h
header file. -
Define a specific board on the main program and set
.panelPower
.
Example
This example shows a modified board definition, to be adapted to the specific main controller board.
#include "PDLS_EXT3_Advanced_Fast.h"
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
};
Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_271_PS_09, myBoardEXT4);
- Use the standard board definition and specify the panel power pin at run-time.
#include "PDLS_EXT3_Advanced_Fast.h"
Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_271_KS_09, boardArduinoNanoMatter);
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.
Specific procedure¶
The dedicated variant PDLS_EXT4_Basic_Matter
of the PDLS Basic edition targets the E-Paper Development Kit for Matter (EPDK-Matter) and monochrome screens with wide temperature and embedded fast update.
It includes a specific board definition for the EXT4 extension board which lists all the GPIOs.
The general procedure mentioned above remains valid for the E-Paper Development Kit for Matter (EPDK-Matter) and monochrome screens with wide temperature and embedded fast update.
#include "PDLS_EXT4_Basic_Matter.h"
pins_t myBoard = boardArduinoNanoMatter;
Screen_EPD_EXT4_Fast myScreen(eScreen_EPD_290_KS_0F, myBoard);
The variable myBoard
provides an easy access to other signals, like myBoard.ledData
to drive the RGB LED.
Use¶
Use the screen like any other.