Skip to content

Jozer99/ESP32-Epaper-Weather-Display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This project began with the goal to create a user friendly weather display using the Lilygo T5 EPD ESP32 development platform. Several existing projects go partway to addressing this goal, and I borrowed liberally from them, in particular:

My code is user friendly in three ways:

  1. The code can be flashed unmodified to the ESP32 platform. User settings can be changed once the code is installed, rather than requiring modification of the code in the IDE.
  2. I personally find the simplified display of my project provides just the right amount of information about the current and upcoming weather, rather than too much or too little.
  3. The code can be flashed unmodified to the ESP32 platform. User settings can be changed once the code is installed, rather than requiring modification of the code in the IDE.

I personally find the simplified display of my project provides just the right amount of information about the current and upcoming weather, rather than too much or too little.

The project works on both the older 5 button (ESP32 based) and newer 3 button (ESP32-S3 based) Lilygo T5 4.7 EPD development kits.

Normal Mode

Installation

This code can be flashed to the the Lilygo module without modification. It should be flashed using PlatformIO or compatible platform (such as Visual Studio Code with the PlatformIO plugin). The included configuration file means that all that is required is to clone the git repo, load up the code in your development environment, plug in the Lilygo board by USB, and press the "Upload" button. The same code has been adapted to work with both the five button and three button T5 4.7 EPD development kits All the user has to do is select the appropriate target before building and uploading in PlatformIO:
  1. On the bottom status bar of Visual Studio code, click the "Project Environment" icon, which should cause a drop down to appear near the top of the screen.
  2. Select env:esp32dev for the older 5 button kit, or env:T5-ePaper-S3 for the newer 3 button model.
  3. On the development board, hold down the "boot" button and tap the reset button. This puts the development kit into programming mode. See the illustration below for which buttons to press.
  4. In Visual Studio, on the bottom status bar, click the right pointing arrow to build and upload the code.
Button Layout

Use

Once installed, the weather display must be configured. This is done by putting the module into "setup mode" by pressing a special combination of buttons. I recommend doing this while the module is fully charged (if it has a battery installed) or while it is plugged into USB power, as setup mode has considerable power draw due to wifi.

On the old 5 button model, hold buttons 3 and 5 while tapping button 1 briefly. On the newer 3 button model, hold button 1 while tapping button 3 briefly. After a few seconds, the unit will boot into setup mode and display directions on screen. All buttons can be released at this point.

During setup mode, the unit acts as a Wifi Access Point with the SSID "ESP Weather Station". Connect to this access point with a computer, tablet, or smartphone, and go to the URL 192.168.4.1 in a web browser. This will display the configuration page where you can fill in the correct settings:

Setup Mode

  • OpenWeatherMap API Key - Weather data is provided by OpenWeatherMap, which provides free forecast data. You will need to establish an account at https://openweathermap.org/ and request an API key through their website. The API is free for up to 1000 calls a day. With the default configuration, the unit makes only 24 API calls per day, so this is plenty.
  • Wifi Network - The weather station must connect to the internet in order to collect weather forecast data. Provide SSID of your wifi network for it to connect to.
  • Wifi Password - Provide the password for your wifi network.
  • Location String - This is the name of the location that weather will be provided for. The recommended format is "City, State, Country" or similar. You can use the search bar on the homepage of https://openweathermap.org/ to determine the appropriate location string if you are unsure.
  • Units - This will switch between Imperial (US) and Metric (everywhere else) units for displaying weather information.
  • Update Frequency - This sets the frequency at which the weather display is updated. The default is every 60 minutes. Increasing the frequency will increase battery usage and API calls.
  • Start Time - This determines what time of day the unit starts displaying updates. For instance, setting this to 6AM means the unit will not fetch and display updates between midnight and 6AM. This increases battery life. The default value is midnight.
  • Stop Time - This determines what time of day the unit stops displaying updates. For instance, setting this to 8PM means the unit will not fetch and display updates between 8PM and midnight. This increases battery life. The default value is midnight.
Website

Once you have entered your settings, click the "Save and Reboot" button on the webpage. The unit will take a few seconds to reboot, then should start displaying weather data. Any problems will be indicated on screen.

In my experience, with the default settings, battery life should be about one month using a single 18650 cell or equivalent lithium battery. Battery life can be increased by reducing the update frequency and/or adjusting the start and stop times to do fewere refreshes per day. Power use in standby is extremely low, while power draw is relatively high while updating.

License

This code is released under GPL v3.0, as were the projects upon which it is based. Modification and commercial use is allowed, but source code of derivative projects must be released for free, and proper attribution must be made.

Things that could be better

This code is by no means finished. Here are a list of things I would like to address in the future:
  • Getting an API key is a bit of a steep ask for users, it would be great to find a weather source that does not require registration and limited API keys
  • The battery percentage tracking code is OK, not great. The voltage detection seems to be pretty good on my unit, but the percent reading leaves something to be desired. Fully fixing this will require a deep dive into lithium battery technology. Since these are kits and everyone will be using a different battery, I doubt there is a universal solution which will offer good performance for everyone.
  • Fonts - This project seems to use standard Adafruit GFX style fonts, but trying to display any fonts other than the ones included with the original project results in crashing. It would be nice to get to the bottom of this so that I could lighten up the font weights a bit, and perhaps make a few important pieces of information larger on screen than is currently possible.
  • Fonts - This project seems to use standard Adafruit GFX style fonts, but trying to display any fonts other than the ones included with the original project results in crashing. It would be nice to get to the bottom of this so that I could lighten up the font weights a bit, and perhaps make a few important pieces of information larger on screen than is currently possible.

See my blog post here: https://www.jozerworx.com/esp32-epaper-weather-station/

About

Weather Station designed for the Lilygo T5 4.7 inch Epaper Development Platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published