Go Down

Topic: Waveshare e-paper displays with SPI (Read 193934 times) previous topic - next topic

Manu84

@zinggjm

this morning I ask Good display about partial refresh problem,
Here there answer:

"epaper display should not be used outdoors because of its diaphragm limit.
So this year we introduced new technology,  We've got the patent. The new technology epaper display can be used outside and will not be hurt by ultraviolet rays.
New products will be introduced by the end of the year.

In addition,  the 4.2 inch epaper display not support partial refresh because its chip.  Do you consider using 4.3 inch epaper display?
It's parallel interface display and partial refresh is 300ms, Pls find attached datasheet for your reference."

Well, I ask them to understand how some people get goo result with partial update..

ZinggJM

Yes, sometimes I am disappointed by Good Display.

Quote
epaper display should not be used outdoors because of its diaphragm limit.
Some of their e-paper displays are advertised as being "outdoor Anti UV", e.g.
1.54 inch e-paper display anti-ultraviolet 200x200 partial update GDEP015OC1

Quote
In addition,  the 4.2 inch epaper display not support partial refresh because its chip.
But they advertise as "Features´╝Ü Partial refresh" and provide a partial update demo code:
GDEW042T2 demo code_partial refresh20180405

Quote
Do you consider using 4.3 inch epaper display?
It's parallel interface display and partial refresh is 300ms
This e-paper display is hard to use; you need a large connection board with a large special STM32 board.

Fortunately they are willing to learn, and do corrections on their web-site, e.g. when I tell them about links to wrong controller specs.

Jean-Marc

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

ZinggJM

@Manu84,

As I now do have a Waveshare 4.2" b/w board with the actual GDEW042T2 panel, and you told "I just not need fast, but clean without flash", I could try to create a modified wavetable with improved partial update result. It most likely will show some flashing in the partial window, and be considerably slower.

But this depends on your patience.

Note that the main market segment for Good Display is electronic shelf labels, badges, room plates and such, where partial update is not of importance.

I know that the main application for Arduino users is weather stations and such. Flashing just doesn't look nice.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Manu84

#1428
Jul 17, 2019, 04:36 pm Last Edit: Jul 17, 2019, 04:40 pm by Manu84
@zinggjm

I made a test this afternoon:

I completely replace all your lut table with table from Ben K.

Partial update work now! background image become a little grey, but that's ok, and there not more blurred on updated text.

So, problem is table... I didn't investigate at this time.

Regards

ZinggJM

#1429
Jul 17, 2019, 06:10 pm Last Edit: Jul 17, 2019, 06:14 pm by ZinggJM
Ok, then I need to dig out the original table from Ben Krasnow on my old notebook.
I thought it uses the same phase length as the Good Display demo.
My version looks different, as it has the optional sustain phase, with length set to zero to correspond to the demo version.

But I may be wrong, it is quite a while ago I did that.

Consequence is I will verify with the original demo version, to make sure my library is not worse.

@Manu84, You have a version that works for you, for your scenario, so there is nothing more needed from my side.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

SolarDude

@manu84 If you want rapid updates without flashing along with daylight readable then you can consider the Sharp Memory LCD displays in the 4.4 inch size. They do not have low temp display slow down times.

I'm considering eInk displays because I'm looking for more pixels than the Sharp Memory LCD 4.4 inches 320 x 240. They do have 3.2 inch version a 540 x360 pixels and a backlight on Digikey.

ZinggJM Thanks for your work on all this!


ZinggJM

@SolarDude,

thank you for the temperature hint, I forgot to ask Manu84 about his ambient temperature, as I assumed he is working under normal room temperature conditions.

The newer e-paper controllers can have multiple wavetables in OTP, and can choose by temperature.
And there were reports that partial update doesn't work under low temperature conditions.

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Manu84

@ZinggJM

Yes I am working at ambiant temperature and not living at North pole ;-)
Thanks for your help JM!

@SolarDude
Thank for the id.
I will check the sharp memory lcd !

Regards

ZinggJM

#1433
Jul 18, 2019, 09:51 am Last Edit: Jul 18, 2019, 10:09 am by ZinggJM
Potential issue with the original wavetable from Ben Krasnow.

I took a quick look at the original wavetable from Ben Krasnow.
It looks like this wavetable doesn't produce pure differential update signals, but also "sustain" signals of equal length (it activates signals for bb (black to black) and for ww (white to white)).
As these signals are active on every refresh, even if there is no change, this produces a dc field which may affect polarization and even damage to the fluid. I saw a post saying it can even cause crystallization.

My modified wavetable also has a (separate) sustain phase, much shorter, which still seems worse than the actual demo version with the current panels. This version is no longer used by default.

I will check with the original demo version, and with alterations of the phase length.
But for e-papers of this size or bigger a more complex waveform may be needed for fast partial update.

Jean-Marc

I feel comforted to notice that the demo version also has a "set floating" phase.
This makes sure that the driving signals become inactive at the end of the refresh phase, even if no power off command is sent to the controller.
I am not sure about this point, how the controller really behaves, and it may be hard to find out.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

mbarrettw

Hi Everyone, I really need some help.

I've got the waveshare 2.13 inch HAT (B) set up with arduino, and its all wired up correctly, I can run the demo code and it works fine. What I don't understand is how I then go about displaying my own images on there, as in what code do I change or add, I've tried experimenting but just get error messages all the time, I don't really understand how to use it and all the guidance seems to be for the 2.13 HAT module, and doesnt work with the 2.13 (B)

Essentially what I want to do by the end is to have a screen full of black dots or circles, and then use code to remove the dots over time until the screen is left clear.

Could really use help as I have no idea what to do and this is for my final year uni project!

Any advice appreciated :)


This is the demo code, I just dont understand how I can add/ remove things from the display:

Code: [Select]

/**
 *  @filename   :   epd2in13b-demo.ino
 *  @brief      :   2.13inch e-paper display (B) demo
 *  @author     :   Yehui from Waveshare
 *
 *  Copyright (C) Waveshare     July 17 2017
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documnetation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to  whom the Software is
 * furished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#include <SPI.h>
#include "epd2in13b.h"
#include "imagedata.h"
#include "epdpaint.h"

#define COLORED     0
#define UNCOLORED   1

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Epd epd;

  if (epd.Init() != 0) {
    Serial.print("e-Paper init failed");
    return;
  }

  /* This clears the SRAM of the e-paper display */
  epd.ClearFrame();

  /**
    * Due to RAM not enough in Arduino UNO, a frame buffer is not allowed.
    * In this case, a smaller image buffer is allocated and you have to
    * update a partial display several times.
    * 1 byte = 8 pixels, therefore you have to set 8*N pixels at a time.
    */
  unsigned char image[1024];
  Paint paint(image, 128, 18);    //width should be the multiple of 8

  paint.Clear(UNCOLORED);
  paint.DrawStringAt(8, 2, "e-Paper Demo", &Font12, COLORED);
  epd.SetPartialWindowBlack(paint.GetImage(), 0, 8, paint.GetWidth(), paint.GetHeight());
/*
  paint.Clear(COLORED);
  paint.DrawStringAt(8, 2, "Hello world", &Font12, UNCOLORED);
  epd.SetPartialWindowRed(paint.GetImage(), 0, 24, paint.GetWidth(), paint.GetHeight());
 
  paint.SetWidth(64);
  paint.SetHeight(64);

  paint.Clear(UNCOLORED);
  paint.DrawRectangle(0, 0, 40, 50, COLORED);
  paint.DrawLine(0, 0, 40, 50, COLORED);
  paint.DrawLine(40, 0, 0, 50, COLORED);
  epd.SetPartialWindowBlack(paint.GetImage(), 8, 72, paint.GetWidth(), paint.GetHeight());
 
  paint.Clear(UNCOLORED);
  paint.DrawCircle(16, 16, 15, COLORED);
  epd.SetPartialWindowBlack(paint.GetImage(), 64, 72, paint.GetWidth(), paint.GetHeight());

  paint.Clear(UNCOLORED);
  paint.DrawFilledRectangle(0, 0, 40, 50, COLORED);
  epd.SetPartialWindowRed(paint.GetImage(), 8, 144, paint.GetWidth(), paint.GetHeight());

  paint.Clear(UNCOLORED);
  paint.DrawFilledCircle(16, 16, 15, COLORED);
  epd.SetPartialWindowRed(paint.GetImage(), 64, 144, paint.GetWidth(), paint.GetHeight());
*/
  /* This displays the data from the SRAM in e-Paper module */
  //epd.DisplayFrame();

  /* This displays an image */
  epd.DisplayFrame(IMAGE_BLACK, IMAGE_RED);

  /* Deep sleep */
  epd.Sleep();
}

void loop() {
  // put your main code here, to run repeatedly:
ClearFrame();
}
 


Mike

asmala

If anyone wants to use Waveshare's own libraries for their 2.9" eink module then the depth meter screen project I've done might interest you. I've done it by modifying that code and creating a large custom font and all the code is in a Github repo :)

ZinggJM

#1436
Jul 18, 2019, 05:24 pm Last Edit: Jul 18, 2019, 05:46 pm by ZinggJM
@mbarrettw,

Quote
Essentially what I want to do by the end is to have a screen full of black dots or circles, and then use code to remove the dots over time until the screen is left clear.
And you know exactly where these dots or circles are, as you have drawn them by code?

This is easy if you have a processor with enough RAM for full buffered graphics, and use a library that supports full buffered graphics.
You just draw the same dots or circles with white colour over the existing graphics, and do either full screen or partial refresh for every dot or circle.

But this will look horrible for a 3-color e-paper display, with all this flashing for every refresh.

It would look nice on a b/w e-paper display that supports "fast partial update".

A candidate library would be GxEPD2, available from Library Manager. It uses Adafruit_GFX for graphics rendering to the buffer.

The Waveshare library does not support full buffered graphics afaik.
Yet maybe it does, a Paint object may cover the whole screen maybe.

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

mbarrettw

Thanks for that.

Is there a particular display that you'd recommend? (low budget)

I'm fairly new to this stuff, I'm a designer not used to coding -and am getting quite confused by all the different options out there, all I want to do is have the screen start more or less black, and slowly as the user uses the device more (its a meditation time log), the surface begins to clear, eventually leaving a completely blank screen. The method you described sounds like it would work well for what I need to do - but yeah a bit of guidance in terms of what screen would work better than the tri colour one I have would be very useful!

Thanks,

Mike

mbarrettw

Also I'm abit confused about how to add my own code to the demo code.

I notice that all the code in the demo is in void setup(), and when I add anything in void loop for example:

paint.DrawFilledCircle(16, 16, 15, COLORED);

it gives the error message "'paint' was not declared in this scope", even though it works fine in void setup().

Any advice appreciated.

Thanks,
Mike

ZinggJM

The paint object is declared locally in setup:

Code: [Select]
  Paint paint(image, 128, 18);    //width should be the multiple of 8


Either you declare a new one in loop, or you declare it globally (outside, above setup).

Unfortunately I barely know the Waveshare library, so my help is limited.

The best inexpensive e-paper with "fast partial update" is the 1.54" b/w 200x200.

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Go Up