0

Arduino shield + Multiplexer + e-paper
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Thu Jun 06, 2019 6:03 am

If you swap the two displays (w/ friends) does the problem follow the display?

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Thu Jun 06, 2019 8:04 am

Yes, and on the same side. So the problem doesn't come from the screen and the E-ink paper friend.

But I found something : The problem concerns only the letters "B" "E" "R" "S" and "Z"... i don't understand why.

I'll redo the hardware properly to see if the problem persists.

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Thu Jun 06, 2019 8:37 am

So I found the defect. It came from the SD Card. I took it off and everything went back to normal. And now, when I put the SD back on, it still works, strange.

------------------------------------------------------

Image

Do you know where this phenomenon comes from ?

When the screen refreshes, the screen is perfect, but 10 seconds later, the white changes color.

If I disconnect the display immediately, the white remains white, so I think there must be residual voltage that disrupts the electronic ink. And i don't how i can limited this effect on my hardware.

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Thu Jun 06, 2019 9:39 am

Sounds like it may be some issue with interference and/or loading on the SPI bus - maybe compounded by a marginal connection somewhere. (The SD card is also an SPI device also)

Breadboarded circuits can be flaky. Double check that all jumper wires are firmly gripped by the contacts. Sometimes relocating the circuit to a different area of the breadboard will make the problem go away.

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Thu Jun 06, 2019 10:08 am

Ok, thx a lot for your help !

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Tue Jun 11, 2019 10:21 am

Hello, i have question.

I'm trying to display all my screens at the same time, and not one by one as it is now.
To do this, I tried to make a "non-blocking" code to do the tasks at the same time, but it doesn't work. (I have 4screens btw)

Between each update, 15 seconds pass, that means 45 seconds to display 4 images.
Image 1 : t=0
Image 2: t=15
Image 3: t=30 etc..

And I don't understand what the program does during these 15 seconds, it's like there's a hidden delay and the program is just waiting.

Here's the code, if you need it.

Thx a lot.

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_GFX.h>    // Core graphics library
#include "Adafruit_EPD.h"
#include "image.h"

#define EPD_DC      9
#define EPD_RESET   5
#define EPD_BUSY    -1

// CS pins for display 1
#define SRAM_CS_1     6
#define EPD_CS_1     10

// CS pins for display 2
#define SRAM_CS_2     14
#define EPD_CS_2      15

// CS pins for display 3
#define SRAM_CS_3    17
#define EPD_CS_3     16

// CS pins for display 4
#define SRAM_CS_4    12
#define EPD_CS_4     11

const unsigned long AFF_INTERVALE = 5000;

unsigned long previousMillis1=0;
unsigned long previousMillis2=0;
unsigned long previousMillis3=0;
unsigned long previousMillis4=0;

Adafruit_IL0373 display_1(212, 104, EPD_DC, EPD_RESET, EPD_CS_1, SRAM_CS_1, EPD_BUSY);
Adafruit_IL0373 display_2(212, 104, EPD_DC, EPD_RESET, EPD_CS_2, SRAM_CS_2, EPD_BUSY);
Adafruit_IL0373 display_3(212, 104, EPD_DC, EPD_RESET, EPD_CS_3, SRAM_CS_3, EPD_BUSY);
Adafruit_IL0373 display_4(212, 104, EPD_DC, EPD_RESET, EPD_CS_4, SRAM_CS_4, EPD_BUSY);

void setup(void) {
  Serial.begin(115200);
  Serial.print("Hello! EPD Test");

  display_1.begin();
  display_1.setBlackBuffer(1, false);
  display_1.setColorBuffer(1, false);
  Serial.println("Screen 1 Initialized");
  display_1.clearBuffer();
  display_1.setRotation(0);
  display_1.drawBitmap(0, 0, image2, 212, 104, EPD_BLACK);
 
  display_2.begin();
  display_2.setBlackBuffer(1, false);
  display_2.setColorBuffer(1, false);
  Serial.println("Screen 2 Initialized");
  display_2.setRotation(2);
  display_2.clearBuffer();
  display_2.drawBitmap(0, 0, image3, 212, 104, EPD_BLACK);

  display_3.begin();
  display_3.setBlackBuffer(1, false);
  display_3.setColorBuffer(1, false);
  Serial.println("Screen 3 Initialized");
  display_3.setRotation(2);
  display_3.clearBuffer();
  display_3.drawBitmap(0, 0, image3, 212, 104, EPD_BLACK);

  display_4.begin();
  display_4.setBlackBuffer(1, false);
  display_4.setColorBuffer(1, false);
  Serial.println("Screen 4 Initialized");
  display_4.setRotation(2);
  display_4.clearBuffer();
  display_4.drawBitmap(0, 0, image3, 212, 104, EPD_BLACK);
}

void loop() {
  task_aff1();
  task_aff2();
  task_aff3();
  task_aff4();
}

void task_aff1() {
  static unsigned long previousMillis1 = 0;
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis1 >= AFF_INTERVALE) {
   
  previousMillis1 = currentMillis;
   
  display_1.display();
  }
}

void task_aff2() {
  static unsigned long previousMillis2 = 0;
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis1 >= AFF_INTERVALE) {
   
  previousMillis2 = currentMillis;
   
  display_2.display();
  }
}

void task_aff3() {
  static unsigned long previousMillis3 = 0;
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis3 >= AFF_INTERVALE) {
   
  previousMillis3 = currentMillis;
   
  display_3.display();
  }
}

void task_aff4() {
  static unsigned long previousMillis4 = 0;
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis4 >= AFF_INTERVALE) {
   
  previousMillis4 = currentMillis;
   
  display_4.display();
  }
}

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Tue Jun 11, 2019 11:44 am

These displays are inherently quite slow. And using the external SPI SRAM chip adds a bit more overhead to the already slow process.

I haven't done any performance testing with the SRAM chips. If you just update a single display, how long does it take?

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Wed Jun 12, 2019 3:55 am

If I just update a single display, it's exactly the same time, 15sec. That a little strange because when i upload my script, the first image is instantly loaded on the screen. So it's not the loading of the image that takes time, so what is it?

And if i put delay(5000) after "display_1.display()", the loaded of the seconds image will be done 20 seconds later (15+5).

Loop code for one display :
Code: Select all | TOGGLE FULL SIZE
void loop() {
  display_1.clearBuffer();
  display_1.setRotation(0);
  display_1.drawBitmap(0, 0, image2, 212, 104, EPD_BLACK);
  display_1.display();
  display_1.clearBuffer();
  display_1.setRotation(0);
  display_1.drawBitmap(0, 0, image3, 212, 104, EPD_BLACK);
  display_1.display();
}


Thx

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Wed Jun 12, 2019 6:01 am

Are you using one of the color displays or the monochrome version. (The color versions are quite a bit slower).

In any case, the manufacturer recommends to avoid frequent refreshing:

https://learn.adafruit.com/adafruit-ein ... pectations
There's also a recommended limit on refeshing - you shouldn't refresh or change the display more than every 3 minutes (180 seconds).

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Wed Jun 12, 2019 6:31 am

I use the monochrome version.

Concerning the refresh time, I can respect it and do a refresh every 180s. But the problem is that I want to do my refresh at the same time, or at least with a slightly shorter delay, between 5 and 10sec.

I put markers in the library in the display() function to know where the problem was.

Code: Select all | TOGGLE FULL SIZE
Serial.println("6");

  update();
 
  Serial.println("7");


The problem is with the uptade() function.

My serial displays "6", 15sec tempo, then "7". I need to dig a little deeper to see what this update function does, why it's so slow.

If you have an idea, don't hesitate.

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Wed Jun 12, 2019 6:56 am

Code: Select all | TOGGLE FULL SIZE
Adafruit_IL0373 display(212, 104, EPD_DC, EPD_RESET, EPD_CS_1, SRAM_CS_1, EPD_BUSY);
Adafruit_IL0373 display(212, 104, EPD_DC, EPD_RESET, EPD_CS_2, SRAM_CS_2, EPD_BUSY);


I think the per-display speed issue is because you are declaring it as a tri-color display, so it has a lot more data to write. Start by changing your definition to the monochrome version.

Code: Select all | TOGGLE FULL SIZE
/* Uncomment the following line if you are using 2.13" tricolor EPD */
//Adafruit_IL0373 display(212, 104, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
//#define FLEXIBLE_213

/* Uncomment the following line if you are using 2.13" monochrome 250*122 EPD */
Adafruit_SSD1675 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Wed Jun 12, 2019 9:44 am

God, damn, rly ? ...

Anyway, ok. For the moment I can't display anything on the screen after this changing, but ok, I'll search on this track, thx a lot.

By the way, I have monochrome displays in 212*104 (2.13"), I just have to change the length and width on parameters?
Screen : https://www.adafruit.com/product/4243

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Wed Jun 12, 2019 10:19 am

Hmmm. Looks like the flexible displays are handled differently. Looking at the code, I think this what you need to use:

Code: Select all | TOGGLE FULL SIZE
Adafruit_IL0373 display(212, 104, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
#define FLEXIBLE_213

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino shield + Multiplexer + e-paper

by Jif0x on Wed Jun 12, 2019 10:24 am

Ok, so what I've been using since the beginning ;( ?

Jif0x
 
Posts: 16
Joined: Tue May 14, 2019 9:35 am

Re: Arduino shield + Multiplexer + e-paper

by adafruit_support_bill on Wed Jun 12, 2019 10:44 am

Plus this line:
Code: Select all | TOGGLE FULL SIZE
#define FLEXIBLE_213

adafruit_support_bill
 
Posts: 74048
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.