Comments (2)
The LUTs have always managed to just hover at the very fringes of my understanding, but some wisdom from the original Inky pHAT library may help.
The codes in the phase tables of the LUTs represent the different positive and negative voltages set on each step. The voltage that affects the ink particulate is the difference between Black and VCOM or White and VCOM. Generally any pair of codes that pull the ink in one direction will, when reversed, pull it in the other.
On power on these are the bits and voltages they correspond to:
VSS = 0b00 = Ground
VSH1 = 0b01 = 15V
VSL = 0b10 = -15V
VSH2 = 0b11 = 5.4V
But these voltages can be configured and, indeed, are changed for the Yellow LUTs in this code.
You'll notice patterns like 0b01000100
across the A, B, C and D steps of each Phase. This pulses the ink in the desired direction, followed by a settling period. The numbers in the duration table below the phase LUTs correspond to how long each pulse will last, and the "Repeat" number is how many times that particular phase should be repeated.
Now taking our default black LUTs I can explain - more or less - what's happening:
'black': [
# Phase 0 Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6
# A B C D A B C D A B C D A B C D A B C D A B C D A B C D
0b01001000, 0b10100000, 0b00010000, 0b00010000, 0b00010011, 0b00000000, 0b00000000, # LUT0 - Black
0b01001000, 0b10100000, 0b10000000, 0b00000000, 0b00000011, 0b00000000, 0b00000000, # LUTT1 - White
0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, # IGNORE
0b01001000, 0b10100101, 0b00000000, 0b10111011, 0b00000000, 0b00000000, 0b00000000, # LUT3 - Red
0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, # LUT4 - VCOM
# Duration | Repeat
# A B C D |
16, 4, 4, 4, 4, # 0 Flash
16, 4, 4, 4, 4, # 1 clear
4, 8, 8, 16, 16, # 2 bring in the black
0, 0, 0, 0, 0, # 3 time for red
0, 0, 0, 0, 0, # 4 final black sharpen phase
0, 0, 0, 0, 0, # 5
0, 0, 0, 0, 0, # 6
],
Phase 0 - Flash the display to try and avoid image retention
- Set the Black, White and Red stages at +15V and VCOM at Ground for steps A and C
- Pulse step A for 16 counts (I think this is milliseconds but I don't recall) followed by B, C and D for 4 counts
- Repeat that pulse pattern 3 more times
Phase 1 - Clear to white, by pulling all inks down
- Set the Black, White and Red stages to -15v and VCOM at Ground for steps A and B
- Do... something... for the Red on step C and D. I'm not sure these are even effective
- Pulse step A for 16 counts, B C and D for 4, repeat 3 more times
Phase 2 - Pull the black ink back toward the front
- Set the black stage to +15 for step B only and the white to -15 for step A only. VCOM at Ground.
- Pulse for 4, 8, 8, 16, repeated 15 more times. Note: In this case the last 8 and 16 might as well have been 0 and 24 since all elements are at Ground during those rest stages
Phase 3, 4, 5 and 6
Unused since we're dealing with just black, but these would usually jiggle things around until we get some semblance of the sharpness/clarity/colour we want.
Conclusion
From this we can conclude that the black particles will move toward the front of the display when pulsed with VSH1 (+15v) and will move away when pulse with VSL (-15v). If you're particularly brave you can see what happens when you set VCOM to -15v and black to +15v creating a 30v differential to give things a little extra kick. You'll notice I do this with the Yellow LUTS since that Yellow/Black mix is a pain to shunt around.
The long and short of it is that I don't know much about how exactly these LUTs should be set up to achieve a desired outcome and we do most of our LUTs via trial and error. Hopefully some of what I've detailed above will give you a better idea what you're telling the hardware to do!
from inky.
I hope no-one minds me posting this, but this video is the reason I ended up buying an Inky wHat.
"E-paper hacking: fastest possible refresh rate" By Applied Science on YouTube.
I think the display he has in the video is the same model as the Inky wHat, with potentially the same driver. In the video he explains in quite a bit of detail how e-ink displays work and some of the theory behind the LUTs. I think it's a valuable resource for anyone who wants to tinker with the displays beyond standard library usage.
I have seen the DEPG0420R01V3.0.pdf datasheet linked at various places, but only ever referring to the pHat. Does this one also match the wHat?
from inky.
Related Issues (20)
- Inky Developer + HAT Mini (Host) not working HOT 2
- pHAT weather example stopped working HOT 2
- Feature request: faster monochrome updates on Inky Impression HOT 2
- eeprom.py SMBus needs to be closed HOT 1
- SSD1608 Custom Lookup table HOT 2
- How to map palette to impression 7.3 colours and avoid dithering
- Make inky work with NVIDIA Jetson Nano HOT 1
- Magic number and checksum for eeprom HOT 1
- Pi Zero W - Not Enough Ram to pip install seaborn HOT 1
- `InkyMockImpression.set_image` fails with `AttributeError`
- `InkyMockImpression` class doesn't easily support multiple resolutions
- Use on any non-Pi machines? HOT 3
- Treating Inky pHAT-Red as Black/White doesn't work
- Busy Wait error - Line 323/333 HOT 1
- AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
- Odd permissions issue on new Inky Impressions 7.3" HOT 1
- error: externally-managed-environment HOT 1
- Forcing black and white only on 7 color. HOT 2
- Partial Update or Single Pixel Update for all Inky Impression HOT 1
- Incompatible with Raspberry Pi 5B? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inky.