1
\$\begingroup\$

I'm driving an e-Paper display with Adafruit Feather nRF52 Bluefruit LE, code mentioned below but not getting any sharp image. The display starts to get dull as soon as the power goes off. Is there anything I can change in code to retain the display's image quality?

Used library: https://github.com/ZinggJM/GxEPD Software : Arduino IDE

#include <GxEPD.h>
#include <GxGDEH0213B73/GxGDEH0213B73.h>  // 2.13" b/w newer panel
#include GxEPD_BitmapExamples

// FreeFonts from Adafruit_GFX
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>


#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>

GxIO_Class io(SPI, /*CS=*/ 4, /*DC=*/ 3, /*RST=*/ 2); // arbitrary selection of 8, 9 selected for default of GxEPD_Class

GxEPD_Class display(io, /*RST=*/ 2, /*BUSY=*/ 5); // default selection of (9), 7

void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println("setup");

  display.init(115200); // enable diagnostic output on Serial

  Serial.println("setup done");
}

void loop()
{
  display.drawPaged(showFontCallback);
  delay(5000);
}

void showFontCallback()
{
  const char* name = "FreeMonoBold9pt7b";
  const GFXfont* f = &FreeMonoBold9pt7b;
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(f);
  display.setCursor(0, 0);
  display.println();
  display.println(name);
  display.println(" !\"#$%&'()*+,-./");
  display.println("0123456789:;<=>?");
  display.println("@ABCDEFGHIJKLMNO");
  display.println("PQRSTUVWXYZ[\\]^_");
#if defined(HAS_RED_COLOR)
  display.setTextColor(GxEPD_RED);
#endif
  display.println("`abcdefghijklmno");
  display.println("pqrstuvwxyz{|}~ ");
}

enter image description here.

Edited: I bought Waveshare Driver-hat separately online not with displays. Datasheet link for the 2.13 display https://drive.google.com/file/d/1ZL9M1V500O0vegqsBbeMTPr0Vli2cNjX/view?usp=sharing

\$\endgroup\$
14
  • \$\begingroup\$ What is the actual reference of your display? Are the switches correctly set on the HAT? \$\endgroup\$
    – jcaron
    Commented Jul 6, 2022 at 7:33
  • \$\begingroup\$ @jcaron The project links I have been following mostly all of them have the image quality much better when power is on. And I remove the power supply mine gone even dull than this, can't even read single text. Display Config Switch on Driver Hat : I have tried at both positions A and B Interface Config Switch : Need to be at 0 for 4 wire SPI. So yes, both are at right position. \$\endgroup\$ Commented Jul 6, 2022 at 7:43
  • \$\begingroup\$ Try to detach screen (the flat cable) before powering it off; if the problem remains, it's display problem, if not, it's not. \$\endgroup\$ Commented Jul 6, 2022 at 8:55
  • \$\begingroup\$ @TirdadSadriNejad I did what you suggested when display get to the peak sharp image, I removed the display. 1st Case : When I let the display connected to driver-hat, it goes to dull immediately after the peak sharp image. 2nd Case : As you asked, It remain dark for for some time but later it started getting dull again. \$\endgroup\$ Commented Jul 6, 2022 at 9:42
  • 1
    \$\begingroup\$ The HAT is designed to be compatible with Waveshare EPDs (which are all Good Display AFAIK) and the driver(s) only supports Good Display EPDs, so unless your display is just a rebranded Good Display EPD it’s quite normal it doesn’t really work. You are lucky enough it kinda works but the size is incorrect (easy to fix) and either the waveforms or the levels are wrong. It may even be the pinout of the FPC which may be slightly different. \$\endgroup\$
    – jcaron
    Commented Jul 6, 2022 at 12:35

1 Answer 1

2
\$\begingroup\$

The HAT you use (from Waveshare) is designed to be compatible with Waveshare EPDs (which, as far as I know, are all produced by Good Display, but I don't think they necessarily support all models from Good Display).

The library you use is designed to support EPDs from Good Display (a pretty large list, not sure if all models are supported).

Your EPD is produced by BOE. So unless it is just a rebranded version of one of the Good Display EPDs, chances of it working out of the box are slim.

The first thing is that the driver you chose does not use the right screen resolution (your screen is 212x104, the driver you use is for a screen with 250x128 pixels).

The next thing is that clearly the waveforms and/or signal levels used are not correct. I believe the example should give you black (and red) text on a white background, while you go light-greyish on dark-greyish.

Unless you find a driver in the list of screens of that library that actually works (you seem to say none does), then one will need to build a dedicated driver. It's possible taking an existing one and modifying it a little bit will be enough, though I'm surprised by the amount of code in each driver (hopefully it's just replicated code rather than actually different versions).

The fact that it actually displays something which vaguely ressembles what it should (you can actually see the intended text) is a good sign, but it's difficult to guess what exactly needs to be changed.

Possible things that need to be changed:

  • screen size (resolution, in pixels)
  • format (seems to be black/white/red rather than black/white or grayscale, though your picture seems to show different grey levels...)
  • waveforms (not sure if those actually need to be sent by the MCU in this case)
  • pin-out on the FPC
  • voltage levels on one or more pins
  • other details in the communication protocol

You can compare the data sheet you have with one from GD to see what seems to match or not, but a quick glance through your data sheet tells me there's quite a bit of information missing. Some of the issues are purely software, others would be a hardware issue.

Did you ask them if there was an existing driver from that EPD, or if it's compatible with some other EPD? In addition to waveforms, details of the communication protocol are missing as well.

\$\endgroup\$
4
  • \$\begingroup\$ If the HAT is similar to the adapter kits I've seen for other e-paper displays, you do not send the waveforms, although some setups give you that option. Finding enough information to generate the waveforms can be pretty challenging. Instead, there's lookup tables which are referenced by the Chip on Glass controlling the display, and the driver just needs to send rows of pixel data (1 bit for black and white, two bits for three color displays) until the entire screen is filled. \$\endgroup\$ Commented Jul 6, 2022 at 21:26
  • \$\begingroup\$ @ScottSimontis isn’t the need for the waveforms dependent on the controller embedded in the display (or the FPC) rather than the adapter? \$\endgroup\$
    – jcaron
    Commented Jul 6, 2022 at 21:35
  • \$\begingroup\$ Sorry if I didn't make that clear, I referred to the display controller as the Chip on Glass and that name might not be as universal as I thought it was. \$\endgroup\$ Commented Jul 7, 2022 at 7:47
  • 1
    \$\begingroup\$ Issue was wrong driver, once I talked to the manufacturer I found right version which was SSD1680, so when I used the same driver, display started working fine. \$\endgroup\$ Commented Jul 11, 2022 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.