Close
0%
0%

CALE Low Energy Eink wallpaper

Long-life battery powered photo frame that renders a calendar/website every morning and goes to Deepsleep. All configurable and open source

Public Chat
Similar projects worth following
The idea is to provide two open source parts:
1. ESP8266/ ESP32 Firmware using in C++ using GxEPD library and supporting Eink displays with different resolutions.
2. A server-side script that will take care of making an screenshoot of any website and return a BMP image that this display can read. An example in php is provided but it can be done in any language. The firmware does not care as long it returns a bitmap non-compressed image.

Once the Espressif board is online an UX interface is exposed for some minutes in case you want to render a custom website or text and then it will go to sleep.
In Deepsleep mode it should consume no more than 1 milliampere to avoid draining your battery.

ESP8266 demo without download compression

About composer

We use composer to install php dependences. Just go to the screenshot folder and run:

composer install

That's it. It will create vendors folder and download all required libraries. Make sure the other scripts reference this vendor/autoload.php with the right path.

Google calendar reader

In the directory screenshot/g_calendar you can find a very easy and configurable example to generate a webpage with your google calendar:

https://github.com/martinberlin/eink-calendar/blob/master/screenshot/g_calendar

Screenshot tool

The single file php script needs two things to work. First :

wkhtmltoimage

That is the responsible to take a website screenshot and return an image. And after this the php-imagick extension that in most Linux servers you can get installed with one command line.

Imagick is a PHP extension to create and modify images using the ImageMagick library. You can use also a different library to convert the image to BMP like :

https://www.php.net/manual/en/ref.image.php

As long as the output is a 1 or 4 bits depth BMP image. The firmware will read also a 24 bits depth image but is unnecessary large when we just want to render a monochrome image.

About colours

I find the two colours eink that I've tested very slow compared to the only black ink models. So the firmware can support with gxepd library two color models but is up to you to implement it.

waveshare-7.5-preview.png

A fast preview to get an idea how it looks

Portable Network Graphics (PNG) - 52.86 kB - 01/19/2020 at 23:09

Preview
Download

back-eink.blend

Blender file for the back 7.5 Waveshare eink

x-blender - 735.16 kB - 01/19/2020 at 23:07

Download

back-eink-V1.1.stl

STL preview, notice that the idea is to edit the Blend file and add your custom walls for battery, ESP32 and so on

sla - 322.64 kB - 01/19/2020 at 23:07

Download

Schematic_CALE_ESP8266.pdf

Schematic for any SPI display and a ESP8266

Adobe Portable Document Format - 23.57 kB - 12/23/2019 at 13:53

Preview
Download

  • 1 × ESP8266 board Optionally ESP32 but not needed in v1.0
  • 1 × E-ink display with Hat exposing SPI interface Any size you like. Waveshare has nice ones like 800*480 pixels. We prefer b/w without any colours since it refreshes faster
  • 1 × Powerbank at least 10000 ma Even if it's 5000 mA will last for long days. I'm tired of adding Lion power and charging circuits like adafruit that proved so far to be non efficient

  • Back-case that you can edit in Blender

    Martin Fasani2 days ago 0 comments

    When it arrived per post, the new V2 seven inch Waveshare, I was a bit unmotivated when I saw the plastic thin original case:

    My face expresión was: Meh :( No space for anything right fellas? Not even a tiny ESP32, let’s forget the battery. But my eyes shined when I saw the nice close design with 12 magnets. That’s it, let’s use the front that looks nice, and discard the back that is useless unless you put the controller and battery outside of it.

    So I put my 10% Blender knowledge at work and come up with this:

    That was the first test print. No compartments just plain STL box, with the right size to press the 5 mm diameter magnets.

    Attached to the Files section of this project.

  • ESP32 supports ZLIB compression. A note about deepsleep

    Martin Fasani01/13/2020 at 10:58 0 comments

    I found time in the weekend to test the ESP32 version in the branch feature/compression

    https://github.com/martinberlin/eink-calendar/tree/feature/compression

    The idea is to take advantage of ESP32 bigger memory to receive a Zlib compressed Bitmap, which reduces in about factor 4 the download time (4.5 seconds vs 0.9 seconds)

    Proof-of-concept serial output with 800*480 px Waveshare eink
    
    displayWidth: 800 height: 480 File size:48146 Compressed: 3995
    Image Offset:146
    Header size:124
    Width:800 Height:480 Bit Depth:1
    Planes:1 Format:0
    
    Read=48032 bytes. Sending BMP pixels to display
    Eink isRendered: 1 BENCHMARKS:
    Download: 908 ms Decompress: 4 ms Total Rendering including download: 10 seconds

    As for what deepleep goes, my father reported in his Wemos D1 ESP8266, about 0.8 mA in deepsleep mode.

    In the ESP32's I have currently available, I still get higher values for deepsleep, here a thread I started on the bluebird: 

    https://twitter.com/i_grr/status/1216235263149522944 -> Follow me for more updates on my projects here

    Lolin 32 v1.0.0: 19 mA in deepsleep
    Heltec            : 10 mA (turning off the oled)


    DFRobot Firebeetle V2: <1mA (But costs up to 19€)

    So I highly recommend if you want to achieve low consumption to start with a modern Lolin D32 and make a small research to get a board that is design with lower consumption in mind. Many out of there in the 5 to 7 € price range are consuming too much when on deepsleep.

    Some of the options mentioned after researching this topic where the DFRobot Firebeetle ESP32 and also the TinyPICO a project by UnexpectedMaker. There may be many others and even ranger at lower prices, please make your research and comment about your favourite pics. 

    18uA is what TinyPICO consumes on deep sleeping and that would be an ideal candidate for a Battery operated CALE, not only for the deepsleep consumption but also for it's mini-size which will fit in very small cases. 
    Another alternative to consume less is to reduce the CPU Frequency to 80Mhz in platformio.ini

    board_build.f_cpu = 80000000L
    This will of course make the processing and decompression slower but only minimally at the adventage of using less battery. 

  • Interesting E-ink project: Inkplate-6

    Martin Fasani01/08/2020 at 16:22 0 comments

    I spotted this quite late since they are already backed up:
    https://www.crowdsupply.com/e-radionica/inkplate-6

    I would love to give it a try. So I'm considering making a CALE version also for this display. 

  • Keeping your deepsleep at minimum consumption

    Martin Fasani12/30/2019 at 20:55 0 comments

    Is the key for battery lifespan.

    And there is a bit more to research in this field. For example if the VCC consumption of this Eink is below 12 mA why don’t to power it with a gpio of our Espressif board? 

    That will keep it from draining unnecessary energy when we are in deepsleep. Doing that simple improvement and taking control of the VCC took the deepsleep consumption from 1.3 mA to 0.84 mA

    Here is the proof of concept update: https://github.com/martinberlin/eink-calendar/commit/978d062e7fcd446acce91535a6a3a0db4df43762

    Needless to say, but check what is the max consumption that is allowed in your microchip specs, going over it may damage your board!

  • ESP32 version is ready to be tested

    Martin Fasani12/28/2019 at 08:20 0 comments

    To compile the Firmware in this two different boards is now easier after this update:

    https://github.com/martinberlin/eink-calendar/commit/3a054bdb4976a6e7d708e9a14b2bc374a373d020

    Update the line in platformio.ini to define in what board you want to compile:

         ; espressif8266 OR lolin_d32
        default_envs = espressif8266

    And set the SPI Pins in Config.h
    We decided to use just GPIO integers and not anymore this D1->D8 Constants to keep it uniform across different environments:

    // ESP8266          |  ESP32 in comments
    int8_t EINK_CS = 5;    // GPIO 5
    int8_t EINK_DC = 0;    // 17
    int8_t EINK_RST = 2;   // 16
    int8_t EINK_BUSY = 12; // 4

    That's it. As a reference here is a Wemos D1 ESP8266 GPIOs

    Lolin ESP32:

  • Plans for an ESP32 version

    Martin Fasani12/26/2019 at 08:21 0 comments

    To be implemented: 

    1. Compression using zlib. In server side we wil compress with PHP as an example. On the Firmware will decompress with miniz.
    2. BLE configuration. To make it portable, this will enable an easy configuration via an Android application, so it will just wait for Bluetooth if WiFi credentials are not set or cannot connect
    3. Speed improvements

    Point 1 is on the works and so far the most interesting at the moment since it will improve the download time about 8 times:

    https://github.com/martinberlin/eink-calendar/issues/1

    It could be rendering the image in 3 seconds instead of 12 which is a great speed improvement and also a battery lifespan increase.

    Info about server side PHP compression: 

    https://github.com/martinberlin/eink-calendar/blob/feature/compression/screenshot/compress.php#L105

    It will use PHP native and fast: gzcompress with a high compression ratio. 

    Serial output decompressing a 640 x 384 BMP / 1 Bit Depth: 

    Done downloading compressed BMP. Length: 3078 
    uncompress status: 0 length: 30866 millisDownload: 806 millis Decomp: 4 ms
    BMP headers: Output File size: 30866
    Width * Height: 640 x 384 / Bit Depth: 1

  • A case for CALE

    Martin Fasani12/25/2019 at 07:15 0 comments

    I still have pending to design my own take on a case. If you want to check existing designs for 3D printing there are some here:

    https://www.thingiverse.com/search?q=Eink

    https://www.thingiverse.com/search?q=E-paper

    On my design I will take care that there is enough room to place a 10000 mA power bank. Of course no needed if you plan to keep this plugged permanently with an USB charger.

    Just take care to order the right Eink display that fits the design and it’s also supported on the gxEPD library for the firmware:

    https://github.com/ZinggJM/GxEPD#supported-spi-e-paper-panels-from-good-display

     I would suggest something above 2.7 so there is some render space for your calendar entries.

    Till end of January 2020:

    If you live in Europe I can print it out for free in black if you pay the shipping cost just send me a private message with the link to download the model and the display model you want to use.

View all 7 project logs

  • 1
    Select a board that you want to use: ESP8266 or ESP32

    Either will work. 8266 will consume less but ESP32 will have another powerful features that make it a nice partner to travel with like zlib compression and bluetooth configuration

  • 2
    Get PlatformIO and the Framework from your selected board installed

    https://fasani.de/2018/11/24/platformio-an-alternative-to-arduino-ide-and-a-complete-ecosystem-for-iot If you still use Arduino is also fine, but I recommend to try Platformio since is a very nice way to package dependencies in your project

  • 3
    Build and compile

    Edit the default_envs line if you want to switch to lolin_d32 (ESP32) or just select your board to match it exacly
    https://github.com/martinberlin/eink-calendar/blob/master/platformio.ini#L5

    And make a copy of lib/Config.h.dist into lib/Config.h
    Add there your SSID / PASS so the board knows how to connect to your Router

View all 6 instructions

Enjoy this project?

Share

Discussions

Martin Fasani wrote 12/23/2019 at 14:27 point

This one is a 7.5 inches Waveshare. The new version looks even better since it has more resolution: 800x480 
https://www.waveshare.com/wiki/7.5inch_e-Paper_HAT

This takes about 4.5/5 seconds to load using ESP8266. In the branch feature/compression there is an ESP32 version supporting zlib (miniz decompression) downloading a compressed BMP image reduces this download time to 900 miliseconds

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates