E-Ink 2.13" bonnet does not update bottom lines

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

Hello,

the last lines of my eink display cannot be updated. I'm using the chipset "Adafruit_SSD1680". It's the same issue as here: viewtopic.php?p=950977&hilit=eink#p950977

Extending the dimensions as suggested in the post did not help. I tried it on a Raspberry Pi Zero 2WH and 3b+ Is the display faulty?

Thanks for helping in advance!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

Which Ada product# of display are you using?

Which example program are you running?

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

I've got the following model: ADA4687

I run the weather example script from here: https://learn.adafruit.com/raspberry-pi ... ation-code

I added a screenshot which looks very similar to the one in the other thread I mentioned.
Attachments
PXL_20230512_070255249.jpg
PXL_20230512_070255249.jpg (872.95 KiB) Viewed 282 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

Are you running the current Adafruit CircuitPython EPD release (v2.11.0).

This issue of being off the SSD1680 being shifted by 4 pixels was identified and patched specifically for your 2.13" model.
The Adafruit_SSD1680 class increases its width parameter to the nearest multiple of 8 before constructing its framebuffers. This results in the framebuffer width not matching the display width whenever the latter is not a multiple of 8 (as is the case for the 122x250 resolution of the 2.13" E-ink Bonnet for Raspberry Pi). One consequence of this mismatch is that graphics are shifted (by 4 pixels in the case of the bonnet) when the rotation of the display is set to 1 or 2.

This was addressed for the SSD1675 and SSD1675B in 8022b34 by distinguishing between the width and stride of the framebuffer. The same fix should be ported to the SSD1680 driver.

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

Yes, I'm running the version 2.11.0. It actually sounds like my problem, but unfortunately the problem still persists. When setting display.rotation to 0 there are the same problems, since the ticket says "No regressions encountered with rotations 0 & 3."

Any more ideas? And thanks for the help!!!
Attachments
Bildschirm­foto 2023-05-14 um 20.06.44.png
Bildschirm­foto 2023-05-14 um 20.06.44.png (140.52 KiB) Viewed 265 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

We are probably looking at the same issue, but it apparently is unresolved.

Since the library is making some last minute calculations by increments of 8 try making a larger adjustment to the size parameter (overshoot the adjustments). Shift 122x250 to either 131x250 or 113x250. I moved the values by nine just both +/- since I’m not sure what effect they will have.

Code: Select all

 # Initialize the Display
display = Adafruit_SSD1680(     # Newer eInk Bonnet
    122, 250, spi, cs_pin=ecs, dc_pin=dc, sramcs_pin=None, rst_pin=rst, busy_pin=busy,
)

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

No luck unfortunately. I did some dimension tests, setting different height values:

* 113 until 120: display is totally distorted
* 121 until 128: bottom line pixelated (content moves up the more the value increases)
* 129 ...: display is totally distorted
Attachments
Case: display is totally distorted
Case: display is totally distorted
PXL_20230514_220729626.jpg (411.66 KiB) Viewed 259 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

Did you try the epd_simpletest.py?

I modified this to your model. Just curious if the demo code from the repo works since the library issue had already been patched.

Code: Select all

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import digitalio
import busio
import board
from adafruit_epd.epd import Adafruit_EPD
from adafruit_epd.il0373 import Adafruit_IL0373
from adafruit_epd.il91874 import Adafruit_IL91874  # pylint: disable=unused-import
from adafruit_epd.il0398 import Adafruit_IL0398  # pylint: disable=unused-import
from adafruit_epd.ssd1608 import Adafruit_SSD1608  # pylint: disable=unused-import
from adafruit_epd.ssd1675 import Adafruit_SSD1675  # pylint: disable=unused-import
from adafruit_epd.ssd1680 import Adafruit_SSD1680  # pylint: disable=unused-import
from adafruit_epd.ssd1681 import Adafruit_SSD1681  # pylint: disable=unused-import
from adafruit_epd.uc8151d import Adafruit_UC8151D  # pylint: disable=unused-import

# create the spi device and pins we will need
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
ecs = digitalio.DigitalInOut(board.D12)
dc = digitalio.DigitalInOut(board.D11)
srcs = digitalio.DigitalInOut(board.D10)  # can be None to use internal memory
rst = digitalio.DigitalInOut(board.D9)  # can be None to not use this pin
busy = digitalio.DigitalInOut(board.D5)  # can be None to not use this pin

# give them all to our drivers
print("Creating display")
# display = Adafruit_SSD1608(200, 200,        # 1.54" HD mono display
# display = Adafruit_SSD1675(122, 250,        # 2.13" HD mono display
display = Adafruit_SSD1680(122, 250,        # 2.13" HD Tri-color display
# display = Adafruit_SSD1681(200, 200,        # 1.54" HD Tri-color display
# display = Adafruit_IL91874(176, 264,        # 2.7" Tri-color display
# display = Adafruit_IL0373(152, 152,         # 1.54" Tri-color display
# display = Adafruit_UC8151D(128, 296,        # 2.9" mono flexible display
# display = Adafruit_IL0373(128, 296,         # 2.9" Tri-color display
# display = Adafruit_IL0398(400, 300,         # 4.2" Tri-color display
#display = Adafruit_IL0373(
    104,
    212,  # 2.13" Tri-color display
    spi,
    cs_pin=ecs,
    dc_pin=dc,
    sramcs_pin=srcs,
    rst_pin=rst,
    busy_pin=busy,
)

# IF YOU HAVE A 2.13" FLEXIBLE DISPLAY uncomment these lines!
# display.set_black_buffer(1, False)
# display.set_color_buffer(1, False)

# IF YOU HAVE A 2.9" FLEXIBLE DISPLAY uncomment these lines!
# display.set_black_buffer(1, True)
# display.set_color_buffer(1, True)

display.rotation = 1

# clear the buffer
print("Clear buffer")
display.fill(Adafruit_EPD.WHITE)
display.pixel(10, 100, Adafruit_EPD.BLACK)

print("Draw Rectangles")
display.fill_rect(5, 5, 10, 10, Adafruit_EPD.RED)
display.rect(0, 0, 20, 30, Adafruit_EPD.BLACK)

print("Draw lines")
display.line(0, 0, display.width - 1, display.height - 1, Adafruit_EPD.BLACK)
display.line(0, display.height - 1, display.width - 1, 0, Adafruit_EPD.RED)

print("Draw text")
display.text("hello world", 25, 10, Adafruit_EPD.BLACK)
display.display()

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

I tried the example and had to reboot my raspberry pi :-)
The pins for dc, rst, ... are different. Next to the chipset the comment says "2.13" HD Tri-color display", but mine is monochrome, but I guess it should be compatible. The test I reduced to just drawing a line diagonally and it still shows the pixelated bottom bar.

I tried then the chipset "Adafruit_SSD1675", which didn't show anything, BUT when I switched back again to Adafruit_SSD1680 the display almost showed the correct output.
I used this code to draw the line:

Code: Select all

display.line(0, 0, display.width - 1, display.height - 1, Adafruit_EPD.BLACK)
Please have a look at the attached image.
Attachments
PXL_20230515_202255522.jpg
PXL_20230515_202255522.jpg (379.44 KiB) Viewed 250 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

That diagonal line almost worked.

I think we are nearing opening an issue with the github repo. It seems the 1680 Mono 2.13" did not get the full integration package with additions to example code and guides.

One more thing to try that might be a useful data point. There is a epd_bonnet.py script which refers to the chipset as 1675B and was recently updated to support monochrome mode BMP (I think). Can you let me know what you see with this one? BMP File.

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

When using 1675B it's the same as 1675 and nothing happens on the screen. The buttons however work and I see logging info in terminal. When using 1680 the image and the drawing are shown (after pressing the buttons), however with distorted bottom lines again.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by mikeysklar »

Are you comfortable opening an issue with the github repo?

Something to the extent of bottom 4 rows of pixels are not aligning on Adafruit 2.13" Monochrome eInk (with 1680 based chipset). This can be seen using the Raspberry Pi E-Ink Weather Station or the examples/epd_bonnet.py. The issue has come up before and it got a patch, but it does not appear to be working with the current library.

Include a description of your hardware setup, photo of the offset problem, library versions and a link to this forum discussion.

User avatar
andrex32
 
Posts: 7
Joined: Wed May 10, 2023 10:16 am

Re: E-Ink 2.13" bonnet does not update bottom lines

Post by andrex32 »

Ok, will do.

Thanks for the help!

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”