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

Details of EPD_Sleep #8

Open
makew0rld opened this issue Mar 15, 2021 · 11 comments
Open

Details of EPD_Sleep #8

makew0rld opened this issue Mar 15, 2021 · 11 comments

Comments

@makew0rld
Copy link

What are the specifics of EPD_sleep? All we get in the code is this cryptic message:

# Do not use for a long time, please save the white screen to save
print("clearing and go to sleep...")
epd.clear()
epd.EPD_Sleep()

Why does it need to be cleared to sleep? Seems to defeat the purpose of sleeping to me. Are they worried about burn-in?

And all it says on the wiki is that the panel can be damaged if it's in use for a long time:

the e-Paper is damaged because of working in high voltage for long time.

Please set the e-paper to sleep mode or disconnect it if you needn't refresh the e-paper but need to power on your development board or Raspberry Pi for long time.Otherwise, the voltage of panel keeps high and it will damage the panel

I plan on using my panel for long periods of time, and I thought e-ink was made for that. For what length of waiting should EPD_Sleep be used for? Is there a wakeup call for use afterwards?

cc @MediumFidelity because you use the product

@MediumFidelity
Copy link

There are two concerns:

  1. Leaving the panel powered on
  2. Storing the panel for a long period of time

For the power issue, you need to power down the panel (with the epd.EPD_Sleep() call) when you aren't drawing to it (which you'd want to do anyway to save power!). I've come across some other projects that leave an E Ink panel powered on between updates, and that cuts down significantly on the longevity of the panel.

For long term storage, I don't think that's one you need to worry about if you're actually using it. If you decide you're going to shelf your project for a long period of time (months? years? not sure) then it's best to store it "cleared" with a white display.

@makew0rld
Copy link
Author

Thanks, that clears things up. Two of my questions remain though. For what length of waiting should EPD_Sleep be used for? Like is a break of 1 minute okay? Because obviously I shouldn't be calling sleep for the two second wait, but where's the line? And is there a wakeup call for use afterwards.

@MediumFidelity
Copy link

I'd call EPD_Sleep() right after drawing. Since the epd12in48 panel take 8 seconds and the epd12in48b 16 seconds to refresh, you probably won't be updating it too often.

Right now I think EPD_Init() is needed, but that's probably overkill. I think some stuff can be pulled out of that into a EDP_Wakeup() function or some such.

@makew0rld
Copy link
Author

Do you mean epd.Init()? So that should be called after sleeping? Thanks. But yeah, a wakeup function would be useful too.

@makew0rld
Copy link
Author

There is a TurnOnDisplay method, is that related? What does that do?

@makew0rld
Copy link
Author

@MediumFidelity any idea about my comments above? Thanks!

@makew0rld
Copy link
Author

@MediumFidelity @fpammer any idea about this issue overall? Thank you!

@MediumFidelity
Copy link

Sorry for the delay.

The EPD_Sleep() function powers off the panel (POF command) and then puts it into deep sleep (DSLP command). The panel needs to be init'd and reset to be able to draw to it again. For example, if you had hastily written Dogecoin price display, the update loop would look like this:

while Dogecoin != ToTheMoon
    epd.Init()
    get_dogecoint_price()
    draw_price()
    epd.display()
    epd.EPD_Sleep()
    sleep_for_5_min() 

Note, I'd use something like APScheduler (https://apscheduler.readthedocs.io/en/stable/) to invoke that task every 5 minutes.

There is another low power mode that's not deep sleep. It has the advantage that the configuration registers of the panel are kept, so you wouldn't need to init again. I don't know what the power draw is in that state, so for something with minutes in between updates, the deep sleep way is probably better.

Hope that helps!

@makew0rld
Copy link
Author

Thanks for explaining and the example. Do you also know what the TurnOnDisplay method does?

There is another low power mode that's not deep sleep.

Is there a way to activate this? And how would you get out of it, just drawing?

Seems like I'll use EPD_Sleep for my code though, thank you.

@MediumFidelity
Copy link

Do you also know what the TurnOnDisplay method does?

It powers on the display (PON) and does a display refresh (DRF).

Is there a way to activate this? And how would you get out of it, just drawing?

There needs to be a new function that only puts the panel in the "power off", but not deep sleep. To bring it back to life, it'd be powered on, then a refresh display command issued. I think. That was from skimming the data sheet. EPD_Sleep is what I'm using for my display.

I don't have the tools to measure the power draw of the display when it's not in deep sleep, but perhaps the Waveshare folks can comment on that.

@makew0rld
Copy link
Author

Interesting, thank you. What would one use TurnOnDisplay? Is it useful? Just curious at this point.

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