Arduino Color E-Paper Weather Station

This E-Paper Weather Station is a project I’ve wanted to build for over a decade now. I’ve finally made it and I am really excited– a battery-powered weather station project. I’ve built many weather station projects in the past, but this one is different. It can last on batteries for months. The reason for this is the amazing E-Paper display it uses. Let me show you how I built this project and how you can build your own using the same or a similar display. 

First of all, let me explain what this project is and how it works.

As you can see, we have a large, 6-inch E-Paper display that can display 7 colors combined with an ESP32 microprocessor. Among all the e-paper boards I’ve used in the past six years, this is the best. I created a video about this display board a week ago. You can check it out here for an in-depth presentation and all the reasons I like it so much.

How it works

On the display, we show the temperature, humidity, barometric pressure, and weather forecast. We get the temperature, humidity, and barometric pressure from two sensors, and the weather forecast from the internet.

We also have some graphs here. This line graph shows the temperature readings of the last 24 hours, this bar graph shows the humidity readings of the last 24 hours, and this bar graph shows the barometric pressure readings of the last 24 hours.

The last bar graph is the most useful of them all, in my opinion. We can take these values and, using a specific algorithm, the Zambretti algorithm, generate our own weather forecast. This algorithm was developed and used more than 100 years ago, and it claimed to have 90% accuracy. How cool is that! Human ingenuity at its best.

I would love to implement it as well. It won’t be as accurate as the forecast we get from the internet, but I would still love to explore this topic and learn more about it.  Do you want to create a video about this algorithm and explore its usage with Arduino? Let me know what you think in the comments section. If you want to, I will definitely create such a video because I find it fascinating. Now back to the project.

The reason I used an E-Paper display is that it requires no power when it is not updating, making it energy-efficient. Its large size makes it practical for displaying weather information. I built a low-power weather station six years ago, but it used a very small display that wasn’t practical at all. Now, six years later, this project represents a significant step up. It’s much more practical and far easier to build.

The project operates by taking temperature, humidity, and pressure readings every six minutes. It then enters deep sleep mode, where the device is nearly completely disabled, consuming only 15µA of current. The display, even though it is inactive, is still displaying the previously recorded readings, which is the main reason I chose it.

Since deep sleep mode disables all device memory to conserve power, any data stored in RAM is lost. Therefore, before entering sleep mode, I save all readings to the device’s EEPROM memory, a permanent storage solution. Upon waking, the device retrieves all readings from the EEPROM and updates them.

Every 10 wake-up cycles, or 60 minutes, the device obtains temperature, humidity, and pressure readings and updates the graph accordingly. Every 60 wake-up cycles, or 360 minutes (6 hours), the device connects to the internet to retrieve the weather forecast. This process is limited to four times a day to conserve power, as WiFi connectivity consumes a significant amount of energy.

By implementing these power-saving strategies, the battery life can extend for months. I’m currently using a 1200mAh battery, and I’ll keep you updated on its longevity. The project has been running reliably for the past 3 days       , I couldn’t wait 6 months to share this project with you.

Connecting the Parts

Now let’s see the parts we need to build this project. We just need three parts. 

E-Paper Display Board: https://soldered.com/product/inkplate-6color-color-e-paper-board-copy/

DHT22 Sensor: https://educ8s.tv/part/DHT22

BMP180 Sensor: https://educ8s.tv/part/BMP180

BME280 Sensor: https://educ8s.tv/part/BME280

You can also use a BMP280 sensor and lower the part count to two. That sensor measures temperature, humidity and barometric pressure, I just didn’t have one available and I couldn’t wait to build this project, so I used the sensors I already had available.

The connection is really easy. I soldered some header pins to the board and connected the sensor to them. The BMP180 sensor uses the I2C interface so we have to connect power and two more wires to SCL and SDA pins of the board. The DHT22 sensor needs power and a single wire which I have connected to pin IO13. The connections are ready. Now let’s see the software we need.

Software

In order for the project to compile we need 4 libraries, the Inkplate library for the display, a library for the BMP180 sensor, a library for the DHT22 sensor and the ArduinoJson library to parse the data we get from the internet.

The software of this project consists of many files. I decided to use Object Oriented Programming to make this project easier to work with. Each functionality of the project has its own Class. So we have a Class that retrieves the weather forecast. Then we have a class that reads the sensors. Then we have a Class that is responsible for reading and writing data to the EEPROM memory. Another class we need is a class that holds all the historical sensor data and finally a class that is responsible for drawing on    the display. This way, if you want to use a different display you only need to write your own Display class. If you want to use different sensors, let say the BMP280 you only need to modify the sensors class. All the other code will work just fine. You can find a link to code below. It is completely open source, and you can expand it with other functionality if you wish. I would love to see what you are going to build with this code as a starting point . Also, if you are new to object oriented programming, do you want me to create an in-depth tutorial about it, that will explain everything? Let me know in the comments.

Before running the project for the first time it is a good idea to run this small program once. This small program will initialise the values of the EEPROM memory we are going to use to zero and it will erase any data that was stored there previously. This is needed because we read the EEPROM memory every time we wake the chip up, and if the EEPROM is not reset, we will encounter issues.

Now, in the project code we need to enter 4 values. First of all we need to enter the SSID and the password of our WiFi network so the board can connect to the internet to retrieve the weather forecast. Now to retrieve the weather forecast we will use the Openweathermap free api. To use it, we have to create an account. When we create an account we will get access to a personal API key. We need to enter the key in this variable. The last thing we have to enter is the ID of the city we want to get the weather forecast. Just search for your city, and note down the ID that appears at the end of the URL. You need to enter this value in this variable. That’s it. Our code is ready to be uploaded to the board. 

The device now displays all the data gathered from the sensors and the weather forecast. However, the graphs are not yet visible as they lack historical data. It will take 24 hours for the graphs to be properly drawn.

Conclusion

To enhance the appearance of the device, it’s time to enclose it. I’m using the original enclosure that comes with the board, but you can design and 3D print your own if you prefer. I simply made a hole for the sensors to protrude from the enclosure, enabling them to collect data effectively. It looks so cool on my desk, I can’t stop staring at it.

I hope you like this project. It is one of my all time favourites. I always wanted an e-paper weather station that would look like this. I can’t buy it because nobody makes such a device commercially. So, I built my own. We are lucky that we live in an age where we can make anything we want by ourselves in just a few days. We are also lucky because with the help of the internet we can find all the knowledge required and get in touch with like minded people. So, if you like what I do on this channel and want to follow me on my journey Subscribe to my channel and you will be notified when I create a new project. 

Thanks for watching, I will see you in the next video.

Also, if you are interested in a version of the Pong game with a color display, you can check out this other video.

Thank you very much!