repaper / gratis

EPD Source codes and Documentation
238 stars 132 forks source link

finer temperature dependency #70

Closed tvoverbeek closed 7 years ago

tvoverbeek commented 7 years ago

Code copied from David Lowe’s repository (https://github.com/campag/gratis). See updated README.md for details

The finer granularity allows you better control over the max update rate (especially with partial update) as function of temperature. You can easily reach rates > 10 fps.

campag commented 7 years ago

Hi - David/campag here.

That exponential curve-fit to the discrete staging-time-factor vs temperature values as published in the datasheet (& used in the previous code) can be seen here.

There were some assumptions made, since the published factors are for a range of temperatures, not a single point on the graph as I have depicted. Maybe there exists more data to derive a better curve?

tvoverbeek commented 7 years ago

Found the table in the COG Driver Interface TIming document on page 33 (http://www.pervasivedisplays.com/_literature_220873/COG_Driver_Interface_Timing_for_small_size_G2_V231). The table is exactly what is implemented in the original code (See the staircase curve in my README.md). Would indeed be interesting to know if there exists more data.

shawaj commented 7 years ago

@CharmingSu @repaper can you help with this? Is there more data available?

repaper commented 7 years ago

Hi @tvoverbeek, Do you mean the TF table? This table is generated by our experiments in chamber to run the compensate of driving time to get the best optical performance. Less than the total time of TF by stage time will still work but you will see slight ghosting. What more data do you need exactly?

campag commented 7 years ago

More data, so as to refine the curve if needs be eg I had to arbitrarily assign the TF value of 1 to 25C, listed in the datasheet's table as a range 20-40C. Likewise for the other datapoints:

C      TF*10
-14 170
-9  120
-4  80
6   40
11  30
16  20
25  10
31  7

Does the curve look reasonable to you?

repaper commented 7 years ago

Refer to the flow chart at the same page 33 and 32. You will see the stage time for 2.7" is 630ms. You need four stages to complete an update cycle. In the room temperature (25C), every stage needs to run 6301 ms, total 2.52 seconds. When -9C, every stage needs TF=12 630ms gets 7.56 seconds at least, total 30 seconds for a complete update cycle. TF is not that you assign arbitrarily value.

campag commented 7 years ago

Hi - yes I appreciate that the recommended staging time is a function of temperature: longer at lower temperatures, to achieve an 'acceptable' level of ghosting.

I suspect that the table of staging times in the timing datasheet is a simplification, and that the staging time to achieve acceptable ghosting varies continuously with temperature. That simplification results in the recommended staging time doubling when the temperature drops from 21C to 20C. My physical intuition tells me that's a bit odd.

My motivation in trying to replace that stepwise function TF=f(T) with a continuous function was two-fold:

  1. To tune the staging time to match any loop rate in use eg when displaying data from sensors coming in at 1.5Hz, lengthen (better ghosting performance) or shorten (compromised ghosting) to match.
  2. To investigate whether the epd gives an acceptable display at higher frame rates (shorter than recommended staging times for a given temperature). I have been pleasantly surprised how good the results are in this respect.
repaper commented 7 years ago

Hi Be careful to test the scenarios you've planned. E-Paper driving is not that your imagine. The compensate time by temperature and sufficient stage time are the most important keys to drive the particles to a stable state. The total movements of either black or white particles in an update cycle need identical and also require inverse them with toggling to extend their life time and ghosting free. Partial Update is an imbalance driving like you read kindle but it also has a blinking (standard global update) after few partial updates automatically. The stage time for 2.7" is 630 ms which is what we can guarantee to have the best optical performance by our defined four stages behavior. Per your MCU, you will need to get a frame time to refresh from (1,1) to (264,176). If we assume you get 60 ms to complete a frame update (find page 29 in the COG document). The more the better. You will need to repeat 10 times at least (60 ms * 10=600ms) per stage and run next stage. According to our experiments, 5 frames above per stage is suggested. In lower ambient temperature, giving the standard stage time with as more as possible of the frames is highly recommended, otherwise the ghosting obviously.

tvoverbeek commented 7 years ago

Superseded by PR #74