Category: ,

Simple Weather Station

How to spend a lot of effort for seemingly nothing — and enjoy it.

At first glance, it might seem like this story is about a failed project. But that’s not the case! The project was completed in full and worked brilliantly. So why “seemingly nothing”? That will become clear at the very end.

So… The task: to construct a simple weather station with basic functionality for use in automating various smart home functions. Specifically, it will optimize the logic of a lawn irrigation system and indoor lighting control. And, of course, it will inform the meat sacks about all the horrors awaiting them outside should they dare to exit the airlock of their living module on this inhospitable planet.

As always, I’ll try to cover the topic a bit more broadly than just “solder this to that, shove it in a case, congratulations.”


Let’s say that every light switch in the house currently has a built-in sensor that measures the level of illumination. The automation of the switch’s operation is tied to this level, combined with a motion sensor.

In practice, assessing whether a room is “dark” or “bright” turned out to be a non-trivial task. After all, the sensor measures the level of illumination only at its own specific location. For instance, on a cloudy day, the sensor might determine that it is “dark” in its spot, even though there is still plenty of light overall in the room to avoid turning on the lamp. A similar situation arises in the evening when lights in other parts of the house turn on or off, altering the overall ambient light level throughout the home.

This means that the “dark” or “bright” parameter is not tied to the sensor’s actual readings but rather to very inconsistent and subjective human perceptions.

I conducted an experiment. Over the course of a week, at different times of day and night, I used a handheld lux meter to jot down the illumination levels at which I felt it was “dark” enough in the room to justify turning on the light.

The experiment showed that the same lux meter reading, taken at the same point in the room, could be subjectively perceived as “dark” in the evening or “bright” in the morning. The same value!

This discrepancy arises because the lux meter doesn’t account for a multitude of other factors that together create the overall perception of brightness for a person.

However, the problem can be solved. The solution is to elevate the measurement to a more global level, where lighting conditions are more consistent. Instead of creating complex algorithms to account for local light sensor conditions—incorporating time of day, coefficients, adjustments, checking the light level in an adjacent room, etc. — it’s simpler to just “look” at what the lighting conditions are like outside.

And it worked! The automation immediately began functioning as expected. This was proven by another experiment involving a prototype cobbled together from a controller and a photoresistor, placed outdoors for a couple of days.

So, what does all this talk about illumination have to do with anything? The answer is simple: “looking at how it’s like outside” is a direct task for a weather station.


Here’s another example.

I have this thing — an automatic lawn irrigation system for my yard. Essentially, it’s a primitive electronic timer that turns solenoids on and off according to a set schedule.

Now, here’s the problem… The weather constantly interferes with the lawn irrigation schedule. Watering grass under the scorching sun at its full 100,000 lx is a terrible idea — all the grass will “burn.” Fine, then we’ll schedule the irrigation for nighttime. Problem solved? No.

Because — subtropical climate. During certain seasons, rain is scheduled for the night. Watering the lawn during rain is a terrible idea. And even the day or two following rain — also not great. Fine, let’s manually monitor the seasons and switch the irrigation schedule to “once every three days,” hoping that our schedule won’t overlap with the rain’s timetable. Problem solved? No.

Because now we add the “human factor.” In the hot summer season, it’s quite pleasant to sit on the veranda in the evening over the weekend, enjoying the cool spray of working sprinklers. So, if we’re planning to relax on the veranda and watch the water spray, we have to switch the irrigation schedule to the evening on those days — but then remember to turn it off at night…

And so on. In the end, instead of having an automated system, we’re stuck with nearly manual control of the irrigation. Inevitably, this leads to forgetting when, where, and what needs to be turned on or off.

To make things worse, the ancient controller would sporadically reboot itself, resetting its settings to “default.” And its “default” was such a nightmare that the sprinkler system became a game of “Russian roulette.” The internal clock would reset to zero, the irrigation time would be set to some arbitrary “6 PM” relative to the reboot time, and the intervals for each sprinkler zone would be assigned completely randomly.

There was always a chance you’d be unexpectedly soaked head-to-toe at any random time of day or night.

This sprinkler system drove us mad for years!

Naturally, all these problems can be easily solved with a weather station that knows if it’s dark outside, whether it’s raining right now, when it last rained, what the current temperature is, the relative humidity, the day of the week, the season, and so on.

By tying the weather station’s data to the logic of the sprinklers, you can not only ensure comfort and joy but also save a significant amount of money for the family budget. Sprinklers are very water-hungry, and in our area, water is a precious resource.

How the new lawn irrigation control system was implemented is a topic for a separate article. But it was important to mention all of this here to provide a general understanding of why I need a weather station in precisely this form and not any other.


Of course, it’s clear without even discussing home automation that a weather station is also needed simply as an informational tool for people.

Additionally, it must be acknowledged that electricity, the internet, and cellular connectivity in our area are extremely unreliable. I can’t recall a single hurricane where at least one of these essentials didn’t fail. Often, they all go down simultaneously. By now, these outages are the subject of constant jokes and are considered part of the “local charm.”

Though, to be honest, there’s not much to laugh about. In recent years, the obvious shortcomings in electricity and communication infrastructure have snowballed into one of the city’s most serious problems. Efforts are underway to address them — but progress is slow.

Sure, “Houston strong!” and all that, but…

In any case, relying on weather apps to pull data from the internet isn’t always practical. Texas is vast, and one weather report doesn’t cover it all. In fact, it often isn’t enough to represent even just Houston. So, if your phone app tells you about pleasant, mild weather with a light breeze in the city, that doesn’t necessarily mean your house on the outskirts isn’t being torn apart by a hurricane at the exact same time.

In short, a personal, local weather station powered by batteries is a fixture in almost every household here. It’s considered as essential as a microwave or an iron.


Up until now, we had been getting by just fine with an old AcuRite weather station (I can’t even recall which model it was anymore):

A contraption with a “propeller” sat on the roof, while a display with pretty graphics was inside the house. No wires were needed. Batteries powered both the outdoor and indoor units — lasting over a year, depending on the brand of batteries.

For a while, I toyed with the idea of intercepting the data from the sensor array outside and routing it to my smart home server. Naturally, it didn’t support this “out of the box” — not surprising for a model nearly a dozen years old. Back then, no one really thought much about such integrations. There are several interesting DIY solutions online that I browsed through occasionally, but I wasn’t in any rush to pursue the project.

And then everything was resolved suddenly and without my involvement.

One not-so-great day, I glanced at the familiar station display on the wall and saw dashes where the values were supposed to be. A clear sign that data from the sensor array wasn’t being received. I figured the batteries might have died. But no… it wasn’t the batteries.

A brief trip to the roof revealed the grim remains of the weather station, which I promptly brought back to the ground:

Cthulhu had come through the night before with a thunderstorm, and apparently, that eldritch horror from the depths had finished off the already aging device. One arm of the anemometer had been carried off to R’lyeh. A severed vane feather lay separately on the roof, wedged into the shingles. Water had evidently gotten inside the station, wreaking total fhtagn on the electronics — the plastic casing had become as brittle as an eggshell, riddled with tiny cracks after a decade of exposure to relentless UV waves.

It was sad, of course, but the station had lived a long and honorable life. Almost 12 years! That’s no small lifespan for a household appliance. So, I had no complaints. It had repaid its $100 cost many times over. With due honors, it was laid to rest in the trash bin and remembered fondly.

Well, then — time to find a replacement. But this time, with all new requirements in mind. The choice between “buy” and “build” leaned toward “build.” First, the cost of reliable, modern stations that can integrate with smart home systems is around $200–300. That’s steep. Second, by that point, I already had the necessary knowledge, tools, and parts to build such a station myself without much hassle. Third, I was simply curious to give it a try. And fourth, who’s going to stop me?


The project was conditionally divided into two phases. Phase one — implementing the minimally required functionality. Phase two — adding extra features.

The minimally required functionality included: temperature, humidity, pressure, precipitation, and illumination. These were the data points eagerly awaited by a slew of smart home automations, practically squealing with impatience.

Things like wind speed/direction, a weather forecast through the end of the Holocene, alerts from the NWS, a live stream from Punxsutawney Phil, or readings from a “weather rock” were categorized as extra features to be addressed in phase two.

In reality, a weather station is laughably simple. It’s a beginner-level project that’s achievable for anyone even mildly interested in the subject.

To implement the minimal features, only a few existing, ready-to-use components are needed:

  • BME280: A reliable module for measuring temperature, humidity, and atmospheric pressure.
  • BH1750: A module for measuring illumination levels.
  • CPRSDBEX: A rain sensor.

At first glance, the BME280 could be replaced with simpler and cheaper options like the DHT22 or DHT11. However, these alternatives are not particularly suited for outdoor use. Their operating temperature range isn’t ideal for our climate — they’d barely be able to function at their limits. Moreover, they don’t measure pressure, only temperature and humidity. And pressure is a very important predictive factor for a weather station’s functionality. All in all, the BME280 is a reasonable choice — as long as it’s provided with proper environmental protection (more on that below).

The BH1750 for illumination is arguably overkill. A simple photoresistor would suffice. But in this case, I wanted to minimize the number of wires running from the sensors to the controller. And with that setup, the BH1750 can hang on the same wire as the BME280 since both work with the I2C bus.

The CPRSDBEX rain sensor from RainBird doesn’t support I2C. In fact, it doesn’t support anything. It’s just a clicky microswitch. Inside, there’s a column of cork discs on a stick. When water hits the discs, they absorb it, swell, and lengthen the column. The column presses on the microswitch, and it clicks into a closed state. Hooray, rain! When the cork dries out, the discs shrink back down, the column contracts, stops pressing on the switch, and it clicks back into an open state. Hooray, no rain!

Moreover, you can tighten or loosen the outer cap of the housing to adjust the threshold at which the cork column swells enough to trigger the switch. This allows you to fine-tune the amount of precipitation needed to activate the detector. For example, a small amount of rainfall might not cause the column to expand far enough to close the switch. Automation!

Naturally, such a sensor cannot provide precise measurements of the amount of rainfall during a storm. It can only tell you something like “more than a quarter inch,” but not exactly how many millimeters fell per hour. And, of course, the cork discs need regular replacement. Over time, they lose their ability to expand due to dirt buildup and mold growth. They should be replaced every year or two.


Ah, yes… Almost forgot. Of course, all of this needs a microcontroller.

Really, any Arduino would do if the station is planned to be standalone, without connecting to the outside world. There’s an abundance of ready-made solutions where you don’t even need to write your own firmware. They often come with colorful screens, buzzers, relays, and more right out of the box. Most of these solutions are offered completely free, ready-to-use, and widely available online. Many even include 3D-printable case models. Often, such setups provide functionality far surpassing that of my old weather station.

But I needed connectivity with other smart devices in the house. So, the simplest solution was to use an ESP32 microcontroller in its most basic and ancient form — the DEV KIT 1.0 version. I still have a bucketful of these, enough for several smart homes!

At some point, I had the “bright idea” to buy them wholesale on AliExpress during a sale — one dollar apiece. And now, for years, I can’t seem to rid my stash of them, even though I’ve shoved one into nearly every appliance in the house. I’m about to run out of router IP addresses for them, and yet the pile still doesn’t seem to shrink. And they just keep working, like Swiss watches, those little devils! They give me no reason whatsoever to throw them away. The oldest one in the house, which controls the shelf lights in the living room, has been running since September 2019 — more than five years now — and shows no signs of dying. Three different smart home servers have come and gone in that time, and it just keeps on running, occasionally getting a firmware update. Somehow, the Chinese managed to create an astoundingly unkillable device.

So, for the first phase of the project, all the necessary components are essentially ready. The only thing left is to assemble them together and put them into a case.


Изучив в этой связи весь зоопарк разновидностей “экрана Стивенсона“, выбрал для своей станции популярную в среде DIY-щиков конфигурацию “говно блюдца на палке”… Мнэ… Ну, когда оно в виде перевернутых блюдечек одно над другим, напяленное на общий стержень. Типа такого:

After examining the entire menagerie of Stevenson screen variations, I settled on a popular DIY configuration commonly referred to as “stacked saucers on a stick.” You know — the one where upside-down saucers are layered on top of one another along a central rod. Something like this:

This design is a favorite among DIY enthusiasts because it’s easy to make out of almost anything. People often use suitably sized drip trays from small flower pots. Plastic food containers? Sure, those work too. Anything vaguely saucer- or bowl-shaped that you can cut on your workbench will do. And if you have access to a 3D printer… Well, I do!

The envisioned construction looked something like this:

  1. Dome for the illumination module
  2. Stevenson screen saucers (5 pieces)
  3. Rod mounts (2 pieces)
  4. Sensor mounts (BH1750 on top, BME280 underneath)
  5. Modified saucer with a mount for CPRSDBEX (rain sensor)
  6. Rod (a cut section of PVC pipe)

With this layout, everything would be neatly secured and functional, providing both weather protection and adequate ventilation for the sensors. The design was simple yet effective — perfect for the project.


A very short but critically important preliminary step before beginning assembly: generously coat all modules with electrical lacquer sealer in several layers.

This step is absolutely essential! Without it, your device won’t last long outdoors. Even if there’s no direct exposure to moisture on the electronic components, condensation will always be present. The exposed semiconductors on the boards of these modules are not designed for outdoor conditions.

Лично я использую EL2000 от Spraylon. Еще ни разу не подводил. Обработанные им модули можно хоть из шланга водой поливать – выживут. Разумеется, лаком лить надо с умом, заклеив маскировочной лентой предварительно критически важные места. У фотосенсора – окошко фотосенсора, у температурного датчика – дырочку для вентиляции. Маскировочную ленту потом не забыть снять. Но все остальное – залить! В три-четыре слоя. Дать высохнуть. Потом повторить.

Personally, I use EL2000 from Spraylon. It has never failed me. Modules treated with this can even survive being sprayed with water from a hose. Of course, you need to apply the lacquer thoughtfully, using masking tape to protect critical areas beforehand. For the light sensor, cover the sensor window; for the temperature sensor, cover the ventilation hole. Don’t forget to remove the masking tape afterward! But everything else? Coat it all — three to four layers. Let it dry, then repeat the process.


The saucers for the screen are all identical. They were designed to stack neatly and allow for mounting brackets inside to hold the modules and the rod:

All mounting is done either through a through-hole with a nut or via a threaded insert embedded into the plastic if the hole is blind:

The dome on the very first saucer is made of glass. Not acrylic, not plexiglass. Genuine glass:

Originally, it was just a decorative piece. You know, the kind of thing that sits on a shelf or table as a fancy cover for some trinket, protecting it from dust. I found a variety of these in different sizes — my wife had asked for them for her collection of souvenirs on the shelf. I found them on Amazon; there’s an abundance of them in all sizes:

It turned out to be perfect for my purposes.

One of the trinkets on the shelf accidentally ended up without a dome. The Сat probably got playful! Really, it’s true…

The glass dome was glued into the saucer’s opening with transparent sealant all along the perimeter. The sealant not only holds the dome securely in place but also seals the joint to keep out rain.

The sensors were mounted on their respective brackets and attached to the very top saucer:

The BME280 wasn’t mounted directly but rather via a tall standoff. This places it roughly in the middle of the six-saucer stack, allowing the “Stevenson screen” to fully do its job:

All the mounting screws used were stainless steel. Real stainless steel, not the fake Chinese kind. They are genuinely rustproof.

One of the saucers was fitted with the rain detector:

This is the only “non-standard” saucer with a mount for the CPRSDBEX. In the future, it’s planned to be replaced when additional instruments like an anemometer, wind vane, and rain gauge are added to the array. In theory, this saucer will need to be reprinted with mounts for those instruments. But for now, for the minimal configuration of the project’s first phase, what’s there is sufficient.


In the end, all that was left was to mount this “Stevenson screen” onto the pole, achieving the desired result:

And to place it on the wall of the house, above the edge of the veranda roof, so it wouldn’t get drenched by water from the gutters:

The weather station is ready!


Ah, right… I forgot about the controller again.

The controller needs to have a standard, ready-made ESPHome firmware installed, configured for the onboard sensors. And that’s it. Any further adjustments, if needed, can be made remotely “over the air” via the central server.

So, the controller can simply be placed in a waterproof box and, along with the power supply… :

…and mount on the wall next to the weather station:

And then forgotten forever. There are no controls on it, because there’s nothing to control. All the data collected by the station is sent directly to the smart home server, where it becomes available to the rest of the automation system.

Admittedly, the box for the controller is oversized, but I had an idea to also fit the lawn irrigation control system in there. However, that’s a topic for a different project, and it still needs to be thoroughly planned out.


Summing up the project and returning to the very beginning of the article…

The DIY weather station proved to be brilliant! The home automation system seamlessly integrated its data and began operating as planned. The lawn irrigation system, which came soon after, was equally thrilled with the symbiosis.

Everything worked flawlessly for about six months. It survived the hottest season and even endured another hurricane. Nothing blew away, nothing glitched, and it consistently provided accurate information. The project was deemed a complete success, fulfilling all the objectives set for it.

Things were already moving toward phase two, where the weather station was supposed to gain additional instruments. But then something unexpected happened…


At some point, I stopped maintaining my blog and publishing new materials. This very article about the weather station was written long after those events and remained as a draft on the local version of the blog, stored on the home server where no one could see it. It sat among many similar drafts.

As a result, my friends couldn’t follow the progression of my “smart home madness” saga. The only thing available to them was my Amazon wishlist, where I had once, in a fit of inspiration, added an advanced weather station for “better times.” It was something I could theoretically use but deemed “too expensive for now.” This was before the old station died and before I even planned to build my own. I just stumbled upon it, thought about it, bookmarked it “for later,” and forgot about it. And so, it lingered in the wishlist for a long time. It was pricey, so people usually skipped over such items when looking for spontaneous gifts… But not this time!

One day, around Christmas, I found a box on my porch with the best wishes from friends encouraging me to keep indulging my smart home obsession. They figured, “To keep this madness alive, here’s a little something from all of us!”

Yes, believe it or not… Christmas miracles are real! Movies don’t lie — they do happen! Especially when you least expect them.

Inside the box was none other than the then-top-notch Ambient Weather WS-2000, packed with every conceivable feature for a weather station and full integration into a smart home:

And so, what “phase two”? It completely lost its purpose.

All that was left to do now was to hoist the new device onto the roof:

And hang yet another screen on the wall:

For a while, both stations operated in parallel. By then, I had set up quite a bit of automation tied to my DIY station. It worked so well that I didn’t want to risk switching everything at once to the new station, especially the data concerning rainfall. Field testing was needed to build trust in the new sensors’ ability to manage water consumption.

Gradually, over about a month, the new station took over all the functions. At the server level, its data was combined with online weather information, satisfying not only the “human factor” but also opening new opportunities for automation:

This also allowed me to compare the sensor readings shared by both stations. There were differences, of course, but they were minor — within about 1%, which falls well within the nominal inaccuracies of inexpensive modules. Although it’s hard to say which “turtle is lying,” it’s safe to say that at the “user” level, for this application, it doesn’t matter.

A note from the future:
The DIY station still sits on the roof, but now it’s just an experiment. Its data is ignored by the system, but I want to determine a few things through observation:

  1. How much longer will the lacquer-coated electronics survive in our climate?
  2. How long will the plastic of the screen (PLA+) last under our sun before degrading?

More than a year has passed. The electronics are still working. The plastic has gathered some dust and developed mold on one side, but it hasn’t lost its structural integrity and remains bright white (if it starts yellowing, it’s a sign the end is near). The experiment continues.

A secondary conclusion from the project:
If someone wants to build their own weather station from simple components — go for it without hesitation. It won’t be any worse than what you’d find ready-made on the market. And it will definitely be about three times cheaper. Sure, the secondary functionality will be more limited, but as a “user-level” weather station, it’s entirely adequate.

Personally, I have no regrets. Not about the time spent on my creation, nor about the arrival of the new station. The satisfaction of creating something worthwhile with your own hands — you can’t buy that for any amount of money! Just like Christmas miracles 🙂

That’s how it is…