Remote e-Paper Pictures Panel
How to display pictures on a remote screen? The project combines two technologies to solve this problem.
Compared to the previous Remote e-Paper Messages Panel project, the Remote e-Paper Pictures Panel doesn't rely on proprietary protocols and infrastructures. Instead, it uses the MQTT protocol and the broker can be hosted in any local PC or even single-board computer (SBC). To save bandwidth, the pictures are first compressed on a local PC and then sent. |
The e-paper screens act like a sheet of paper: they only need power during the printing of the text or image. Once the text or image has been printed, the screens no longer need power. They can even be detached: the text or image stays on! A more detailed presentation explains How e-paper works.
Apart from the low power and the persistent display, the e-paper screens offer high readability even in direct sunlight and high resolution up to 130 dpi, 117 dpi on the 2.71" panel used on this project. Espressif has revolutionised IoT with the affordable and powerful ESP8266 and ESP32 SoCs. |
Remote device
The remote device consists on the ESP32-DevKitC or ESP32-Pico board, the Pervasive Displays Extension Kit Gen 3 board and a Pervasive Displays e-ink display.
|
Hardware
For the hardware part, proceed as follow:
|
Software
The application relies on two main libraries:
The buffer size needs to be set with setBufferSize() to handle the header and the image. |
hV_Configuration.h
|
|
PDI_EXT3_Messages_Particle.ino
|
All the credentials are stored in a separate header file.
The GitHub repository provides the code for the Arduino project. |
Credentials.h
|
Main device
The main device can be any PC or single-board computer (SBC). It hosts the image converter and the MQTT broker. Both are used through the terminal.
|
Convert the picture
The images native formats are not optimised for IoT. A typical 264x176 BMP image weights 136 kB. Since the e-paper screen is monochrome, the images are going to be translated into the portable bitmap (PBM) format. The header features P4 as magic number and the size of the screen, here 176 horizontal by 264 vertical.
To do so, the project uses GraphicsMagick, a command-line utility to convert virtually any format into portable bitmap. A converted 264x176 image weights less than 6 kB in PBM format. |
Code Editor
The header of a PBM file
|
MQTT broker
The project uses Mosquitto as MQTT broker. It comes with useful utilities to publish and subscribe topics.
Recent releases of Mosquitto require to be configured to allow external and anonymous connections. Just edit the file /etc/mosquitto/mosquitto.conf and add the three lines on the left. |
mosquitto.conf
|
Run the project
Convert the picture
First, gm converts the picture into the portable bitmap format with the following options;
|
|
Send the picture
Then, mosquitto_pub sends the image, with the following options:
|
|
Other options
The image/clear topic clears the screen.
Going further
For a cleaner interface, Node-RED provides a nice dashboard to encapsulate the command-line procedure. The Image button opens a dialogue box to select an image. The Send button is then enabled and sends the image through MQTT.
The GitHub repository provides the code for the Node-RED flow. |
|
Pervasive Displays offers a wide range of screens, from 1.54" up to 12.2". Larger screens may require an external memory like an SPI SRAM on the Pervasive Displays e-Paper EPD Extension Kit Gen 3 or a PSRAM available on some advanced ESP32 boards.
The MQTT solution is widely used and offers advanced features like quality of service (QoS). The WiFi radio is power-hungry and obliterates the low-power capabilities of the e-paper screen. So changing for a radio like Bluetooth or sub-1 GHz would enable a year-long autonomy with standard batteries, albeit with a different protocol like MQTT-SN. |
Links
|
Posted: 14 Feb 2022
Updated: 23 Feb 2022
Updated: 23 Feb 2022