Home Projects Articles

ESP32 weather station

I wanted to make a DIY weather station for some time—it's nice to know how the humidity affects my mousepad glide, the air quality around me, and the UV index (for sunscreen).

I first started with Arduino IDE to get the project working. It turned out I bought the wrong UV sensor (a newer version of the sensor I bought only had a light sensor, no UV), so I ended up making it with only environmental and air quality sensors. I also got a button to switch the screens on my OLED (e.g. screen1: environmental stats, screen2: air quality), but it ended up not reaching my breadboard when plugged in, so I gave up on that.

Initially, I also had an RTC connected to it, but I ended up disconnecting the station too often for it to make sense—I'd have to set the correct time each time after unplugging it for longer amounts of time.

working station

The weather sensor required some soldering to stay in place (it would randomly disconnect if it was just propped up by something), so I borrowed a soldering gun and did my first soldering work ever. The gun was definitely too imprecise for electronics, and my skills were also ass, but it did work even if it looks bad. It's more solid now, but I still have to wiggle it around sometimes, probably because I didn't use any flux and just rawdogged it with solder+gun.

bad air quality example

air quality close to a forest fire

2026 Soldering update

better solder

After getting an actual setup for soldering I went back to improve it. Having flux and an actual soldering iron (Fnirsi HS-02A) helped a lot. I think it looks decent now, but I used too high of a temperature (335 degrees C, I now use 305 degrees C) and the PCB looks a little burnt but it works just fine. I tested the connections with a multimeter and everything works fine.

Actually learning stuff from it

I got the project working with pre-made libraries in Arduino IDE. It's pretty much a plug-and-play process there, so I decided to make it in ESP-IDF too—this time reading to and from the sensors/screens myself. This way I'd actually learn how everything works—things like reading from a sensor, using I2C and UART, and displaying stuff on a screen.

TODO