Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding 5-bit waveforms #3

Open
vroland opened this issue Jan 23, 2021 · 5 comments
Open

Decoding 5-bit waveforms #3

vroland opened this issue Jan 23, 2021 · 5 comments

Comments

@vroland
Copy link

vroland commented Jan 23, 2021

Hi,
First of all: Congratulations on your work on this despite so little information being out there!
That's also the reason I'm asking here. I'm currently working on an open hardware e-Ink controller (https://github.com/vroland/epdiy). Up until now, we use a very simple waveform based on trial and error to drive them.
For better quality and less temperature dependence I'm now trying to look into decoding the vendor waveforms for the use in the driver (this is completely software-driven, so no proprietary e-Ink controller to decode the waveform for us).

Unfortunately, all waveforms I could find are 5-bit per pixel waveforms. The only pice of information I could find on them is this: https://www.waveshare.net/w/upload/c/c4/E-paper-mode-declaration.pdf, which does not go into the file-level encoding.
Since you got this far: Do you have any information or ideas on how the actual waveform data is encoded? Any resources I could look at?

Regards,

Valentin

@Juul
Copy link
Member

Juul commented Jan 24, 2021 via email

@vroland
Copy link
Author

vroland commented Jan 25, 2021

Hi, thank you for the talk, that was quite informative.
I've played around a bit and it seems that the 5-bit waveforms are indeed just larger look up tables with a similar encoding, but there is some additional information. In the phases, after the 0xff + random byte end marker there is additional data. The LUTs look reasonable if I ignore it, so it might be the "separately-supplied image preprocessing algorithm" the waveshare document speaks of.
Since the odd positions are almost always zero / ignored I hope just using the 16 even positions will be approximately correct.

Regarding generating waveforms: By looking at the transitions, one could maybe derive some general rules, like "when going from gray to a darker shade, go to completely dark first". Maybe even a simplified model of how those particles move.
Then, fine-tuning the waveforms using a rig would be much easier, as the search space would be greatly reduced.
According to my experiments, destroying the displays by applying charge for too long is not actually that easy. But in some kind of automated rig in continuous operation, faults may build up.
Sounds like a fun project overall, I'm just not sure if I want to sink the time into it ;)

@Juul
Copy link
Member

Juul commented Jan 26, 2021 via email

@vroland
Copy link
Author

vroland commented Jan 26, 2021

I got the waveform files from this thread: https://community.nxp.com/t5/i-MX-Processors/How-to-convert-wbf-waveform-file-to-wf-file/m-p/467926/highlight/true
But yes, the legal side of sharing them is a bit troublesome. It would be nice to have some files I can freely distribute with the library.
Regarding the boards: You can find my e-mail address on my github profile, would you mind just sending me a message there?

@vroland
Copy link
Author

vroland commented Feb 20, 2021

@Juul My current approach to using the waveforms for my project is to export a JSON file from my fork of inkwave and then use a python script to generate a header from it.
What do you think, would a JSON export to dump the raw data make sense to add to inkwave? If yes, I'd clean up my code and make a pull request to add that. Otherwise, I'd write my own tool for that based on inkwave. Which do you prefer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants