Close
0%
0%

Epaper Deepsleep digital clock

Powered by an ESP32 this inefficient, imprecise and over-engineered digital clock can be a great learning resource for ESP-IDF beginners

Similar projects worth following
Even an impresice click is right at least once a day.
This project's mission is to make an epaper digital clock with the lowest power consumption in ESP32

It will do this 3 things and this three things only:

1. It will Sync with internet time using our own super fast IoT API to retrieve time once a day
2. The epaper will render the day, Month and in next line the Hour:Minute just as any digital clock
3. It will go to seep N minutes defined in the beginning of sleepMinutes (Does not matter, can be 2 minutes, 5 minutes, etc)

This is a demo project made with the intention to learn more about C++ and ESP-IDF framework and about epaper partial refresh. Check a small demo of how it updates:

https://twitter.com/martinfasani/status/1278385134501351424

ESP-IDF is a great framework to build small embedded devices. This project does not use Arduino-esp32 framework but only Espressif IoT framework. As a pre-requisite to compile this you should be familiar with ESP-IDF framework and know how to use the idf.py tool to build and flash your ESP32 board.

Disclaimer: Because of the nature of ESP32 deepsleep this clock it's not precise. It may differ 4 or 5 minutes a day, depending on temperature and other factors that are deeply out of my understanding. That's precisely why is cool to research and use this concepts for other Internet of the Things applications.

The idea is to have fun making an over-engineered, imprecise, and cool ESP32 digital epaper clock that is fully customizable. Along the journey you can gain experience with many Espressif things, like NVS key-value storage, epaper displays and using C++ in ESP-IDF.

Learning IDF

It's a nice example to learn how to store values in Non Volatile Storage of the ESP32 where you can store value types like integers and \0 terminated strings in a way that is persisted even if the chip is powered off. I call \0 terminated strings char arrays but I'm not sure if that is the best denomination. Is also interesting to practice doing short internet queries and to learn how to do it in Espressif's own IoT development framework without any Arduino boilerplate functions on top.

  • 1 × TTGO T5s (2.7 inch epaper) Or any other epaper display connected with an SPI interface to ESP32
  • 1 × If you don't use a TTGO then any ESP32 If possible with a very good deepsleep consumption under 1 mA. Tinypico.com consumes 0.08 mA/hr when sleeping
  • 1 × A 3D printed case from Thingiverse https://www.thingiverse.com/movil/designs -> You can find many in my designs including TTGO T5 & Good display 4.2 and 5.83
  • 1 × Any supported epaper with an SPI interface Check the GitHub wiki to see the supported eink displays
  • 1 × A 3.7v Lithium Ion battery If the esp32 board does not have battery management you will have to build one or use an external Adafruit module

  • Wrist esp32 epaper watch get's a housing and updated C++

    Martin Fasani07/20/2020 at 14:46 0 comments

    As a preamble, due that this is very small, I used a tinypico.com ESP32. I took the steps done by Unexpected maker to turn off the Dotstar led so it consumes as less as possible in deepsleep (My measurement 0.08 mA)

    With a Lipo battery of 80 mA tt has been working since Friday 11:30 am (146 hrs aprox.)
    If my maths are not wrong 80/146 is approx. 0.54 mA per hour consumption. Updating every 4 mins the epaper and WiFi sync only once per day less than 2 secs online using esp32 tinypico.

    3D model ready for the printer:

    https://www.thingiverse.com/thing:4546700

    Smallest epaper option that I used is an Heltec 1.54 inches (200x200) Please note that at the moment I'm not measuring battery level, when it's over it will simply not update anymore, and you may see small droplets of black in the epaper (Current is not enough to turn it full black I guess) This is how it looked when it stopped:

    I cannot guarantee that it will last that much, but provided connects only one per day to sync, then it should consume only what the epaper needs to refresh and go again to sleep.

    Repository is the same just in branch refactor/oop:
    https://github.com/martinberlin/cale-idf/tree/refactor/oop/main
    C++ source: demo-sleep-clock-v2.cpp
    Happy builds!

  • Wrist digital Epaper watch

    Martin Fasani07/12/2020 at 08:09 0 comments

    While on holidays I found in the studio of my father a small 1.54 inches epaper

    Why not to add a tinyPICO esp32 as a controller and make a real epaper clock using a customized version of the clock firmware?

    Me thinks is a cool idea and will be a cheap make, with the exception of the esp32 that is about 22 dollars. But is worth it!

    The difference with cheap boards makes it a good choice:

    • Deepsleep consumption with dotstar led Turned off is 0.08 mA
    • Has 4 MB spiram (pseudo static ram)
    • It’s super small!

    Additionally we will need a:

    1. Small battery
    2.  3D printed case for the watch body
    3. Watch strap

    no buttons for now! It will be a button less digital clock

    A small preview just with the epaper on my wrist :)

    Do you like the idea? Would you walk with an esp32 in deepsleep mode on your wrist?

  • New 7.5 inches build

    Martin Fasani07/09/2020 at 06:57 0 comments

    This 800*480 epaper is sold by Waveshare but the display's brand is Good display. Never understood 100% how it is between those two but my thoughts are that waveshare adds electronics on top. Like the SPI interface. Or in some models even a PCB ready for an esp32. But the epapers for makers since ages are mostly from http://www.good-display.com

    This new model I made for my father that is the one who really knows about electronics and usually compiles and tests some of my firmwares. He added some custom modifications in this branch:

    https://github.com/martinberlin/cale-idf/tree/carlos/7.5-digital

    Battery is 5000mA and esp32 used is a http://tinyPICO.com (0.08 mA/h deepsleep consumption w/dotstar turned off)

    We added a microseconds int64 correction to compensate boot time. Doing so I realized the Boot-Time correction so the clock is more precise is about 0.3 seconds. That means when you power on the esp32 it takes aprox. 0.3 seconds to arrive to the startTime first measurement. It does his update, with internet sync or not depending on the hour, and at the end measures endTime. So it discounts that time to the next sleep round plus our correction time that we called microsBootPrediction. In other words the program runtime the is discounted from the minutes sleep round.

    That number is discounted from the N minutes Deepsleep you select. As is given in microseconds calculation is done in this function:

    void deepsleep(){
        esp_deep_sleep(1000000LL * 60 * sleepMinutes - microsCorrection + microsBootPrediction); // + microsBootPrediction
    }

  • CalEPD is the epaper component behind this clock

    Martin Fasani07/04/2020 at 20:37 0 comments

    cale-idf Wiki is where CalEPD component is being developed but also where each epaper module testing is being documented.

    You can use this module to drive your ESP-IDF epaper project too independently from this project. CalEPD has it's own repository so you can use it as a git submodule for your ESP-IDF firmware.

    If your epaper class is not there just add an issue in the repository.

View all 4 project logs

  • 1
    Clone the cale-idf repository
  • 2
    Swith to the nightly development branch: refactor/oop

    cd cale-idf
    git checkout refactor/oop

  • 3
    ESP-IDF set the target for your project
    idf.py set-target esp32 


    Alternatively this Firmware will run also in the ESP32S2. If you want to build it for that target:

    idf.py set-target esp32s2 

View all 6 instructions

Enjoy this project?

Share

Discussions

Martin Fasani wrote 07/04/2020 at 07:30 point

Thanks. All my housing designs are available in the Thingiverse link. Per request I can also send the .blender file for custom modifications. Make one :)

You will like this fun clock. Thanks for the support!

  Are you sure? yes | no

Waldo Wolmarans wrote 07/02/2020 at 20:16 point

Nice 3D printed case design.

  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