Monitoring the Weather Remotely with an Arduino IoT Cloud-Powered Station

This Arduino IoT Cloud weather station uses Wi-Fi connectivity to send current weather readings to users remotely.

A quick overview

Viewing current weather conditions both around your house and within it can be important, especially when tracking energy efficiency and seeing the minimum/maximum values throughout the day and even over a larger interval of time. But instead of building and configuring a custom webserver which could be vulnerable to external attacks and quite complicated all on its own, Clem Mayer from element14 Presents wanted to integrate Arduino IoT Cloud functionality onto a compact wireless device that could send temperature and humidity data at regular intervals to the cloud.

Gathering the parts

For this project, Mayer opted to use an Arduino MKR WiFi 1010 development kit for a few reasons. First, the Arduino Cloud service is able to automatically detect and configure the board, thus making setup extremely fast and easy. Second, the onboard pin headers and JST battery connector/charging circuitry are quite useful when it comes to attaching external sensors and a LiPo cell for extended outdoor readings. And finally, the WiFi 1010 supports the massive collection of Arduino libraries, meaning that a wide variety of sensors could be connected at any one time.

On the topic of sensors, Mayer chose the DHT11 temperature and humidity sensor due to its low cost and ease-of-use, although a future revision might also include a gas and/or light sensor for extra information.

Building an enclosure

Because all of this is meant to sit outside in the elements, the possibility of rain, dust, and other matter getting into the housing was a pressing concern for Mayer since it could cause a short or other damage. The core of the device is situated within a tightly sealed enclosure that has both the battery pack and Arduino MKR WiFi 1010. Sensors are connected externally through a sealed barrel plug, and the clear acrylic top allows the user to see the current color of the RGB status LED.

Configuring the Arduino IoT Cloud

With the MKR WiFi 1010 added as a new "Thing," Mayer moved onto adding several cloud variables that store the temperature and humidity as floating-point numbers and the status LED as a boolean. Next, a new dashboard was made with two gauges and graphs that each show either temperature or humidity, along with an LED toggle switch.

The code

The program starts by initializing the DHT11 on pin 2 and setting the RGB status LED. Within an infinite loop, data is read from the DHT11 every eight seconds and is sent to the Arduino IoT Cloud. Sleeping is performed by using the Arduino LowPower library to conserve battery life for far longer than would be possible by running the processor and full-speed all the time.

Testing it out

To test his weather-monitoring project, Mayer set the sealed device outside just within the range of his Wi-Fi access point. After letting it run for a few minutes, the resulting data began to populate the dashboard. As seen in the humidity graph, taking it outdoors caused a rapid drop from over 70% RH to around 45% RH - success!

You can view the code and design files for this project here in Mayer's element14 community post.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles