Weather Clock Arduino ESP32

by billbill100 in Circuits > Arduino

178 Views, 7 Favorites, 0 Comments

Weather Clock Arduino ESP32

20240917_164149.jpg
Capture5.JPG

An ESP32 based weather clock, which connects via wi-fi, to regularly update the time and local weather.

The original project has open-source firmware.

I found a few issues that would stop many people being able to build this weather clock.

These have been overcome, allowing anybody to make the weather station.


First issue was hardware. The firmware (open-source) is designed to run on bespoke hardware, which is both expensive to purchase and expensive to ship. This issue has been overcome by re-writing the code to work on cheap Aliexpress parts.


The second, is the firmware itself. It is very complex and unless the user is familiar with python, Visual Studio and Platform IO, they would not be able to load the firmware.

Solution here is to re-write and compile the code, so the user can easily flash it directly to the ESP32.

In order for the user to set their WIFI, time-zone, daylight saving, location, language etc, a new menu has been written, allowing the user to easily add or change these details. Once added, they are saved internally and will remain after a power-cut.


This project is based on the original open-source code and project details found here.

ESP32 WiFi Color Display Kit Grande • ThingPulse

Note The firmware code used for my version has been heavily modified to make it much simpler to build and use.

The original open-source code will work, if you want to try it, but will require editing as all of the user credentials are hard coded.

You will also need to change the TFT pin configuration, either in the code or on the hardware.

Supplies

The parts required can be bought as one complete module, comprising of ESP32 microcontroller, 3.5" TFT screen and a pcb which connects the two together.

Details below.

Weather Station Parts

Capture7.JPG

The parts required can be bought as one complete module, from the link below. Current price is £12.

It comprises of a 3.5" TFT screen, an ESP32 microprocessor board and a pcb, which connects the two, thus saving having to wire the ESP32 and TFT together.

You can of course buy a TFT display and ESP32 board separately & connect with Dupont wires.

A schematic showing the wiring is included, if you are not using the three part module, or if you have the three part module & wish to write your own code.

Ensure you purchase the ILI9488 version

3.5 Inch TFT SPI LCD Display Module 320RGBx480 ILI9488 With/Without Touch ESP32 Screen - AliExpress 502

Hardware Build

20240916_172828.jpg

This is simple, just plug the ESP32 board into the pcb and then do the same with the TFT screen BUT ensure you put them in the right way round, else damage could easily occur.

Referring to the photo above, the green PCB should have the writing upside down, with the bottom left pin labelled VIN and the bottom right, 3V3. These will match the legends painted on the ESP module.

Take care when inserting the boards, to ensure no pins are bent.

The boards (well the ones I bought anyway) already had test firmware on them. Connecting to USB power, you should see a keypad. When you get to step 5 Arduino IDE Software load and open the Serial Monitor, when pressing the keys & Send on the tft screen, the numbers will appear on the computer screen

Wiring Guide

If using the three-part set, no wiring is required.

If using your own parts, then the ESP32 and TFT board can be connected using suitable Dupont wires.

A schematic showing the wiring is included.

Downloads

Adding the ESP32 Driver to Your Computer

The ESP board has a built in USB port, making it easy to connect to the computer.

The driver may require installing to your computer. Follow the PDF guide to see if your computer already has the driver & if not, how to load it.

Arduinio IDE Software Load.

A computer program called Arduino IDE has to be installed on the computer. For our project, it is only used as a terminal, to input your setup detail.

Follow the guide for how to do this.

Firmware Load

Firmware is downloaded directly to the ESP32 board. This saves all of the problems with loading Python, Visual Studio, Platform IO onto your computer, followed by all the source code and then learning how to use it all!

To download the firmware, a small stand-alone program is required.

Follow the guide to install it and upload the firmware to your Weather Clock.

The firmware can be found at the link below

billbill100/Weather-Clock: Arduino ESP Weather Clock. Takes time and local weather data from the Internet and displays it on a 3.5" TFT screen (github.com)


Collect User Settings to Set Weather Clock

The Weather Clock requires user data to be entered

Some data you should know, your WIFI SSID and password, for example.

The other data you will need to find out from the great Interweb.

The document below describes how to find this information.

Put all of the gathered information into a text file, using notepad or similar.

The result should look something like:-

------------------------------------------------------------------------

SSID = your-WIFI-SSID

WIFI_PWD = your-password

TIMEZONE = GMT0BST,M3.5.0/1,M10.5.0

METRIC or Imperial = Metric

OPEN_WEATHER_MAP_API_KEY = 4b1234567890bf49d54c40a5b12345678

OPEN_WEATHER_MAP_LOCATION_ID = 2644559

DISPLAYED_LOCATION_NAME = London

Language = en

-----------------------------------------------------------------------

Note: - That although the language is selected, this only applies to data downloaded from openweather.org.

The source code was hard coded to English. I have added multi-language support, which currently is fr and cz.

Selecting either of these should give the whole screen in that language.

It is laborious to add each language, so I will only add additional languages when requested to do do by users.

Drop me a message if you would like additional language support.

User Instructions

Hopefully you have been able to follow the preceding documents and now have an ESP32 board which as the Weather Clock firmware installed on it.

All that is left is to add your user credentials, how to do this is described in the document below.