Part 2 - DIY Home built weather station
In
Part 1 I built a radiant heat shield out of plastic bowels. I shared the design but never did the follow up showing the final product (better late than never)?
For this post I will detail the design to it with all sorts of gadgets and powered it using a battery and a charged the battery using a solar panel. The station was remotely deployed in the back yard to avoid interference from blacktop and other structures. It sent its data using a nRF24l01 transmitter to a Raspberry pi running another nRF24 transmitter. I never really went into the details, so here are what I deployed 8 years ago. (Yes, there is much better hardware options available now!)
Weather Instruments
I wanted to collect remote temperatures that are not affected by the driveway, so I started with the DHT11, then moved to a DHT22 during testing. While browsing I found an
AHT20, which is an outdoor version of the DHT22. This fits perfectly since it is already wired and can just hang inside the shield. To collect barometric pressure, I added the BMP085, which also includes a temperature sensor which can be used to keep the DHT22 in check. To keep track of sunlight I added a simple
Photocell to track sunlight brightness.
Power & Charging
To power the Arduino I added the Adafruit
USB / DC / Solar Lithium Ion/Polymer charger - v2 with a 1200mAh Lithium ion battery. Since the weather station would be outside in NJ and be subjected to occasional cold days I added a
10K Thermistor that would stop charging the battery when the temperatures are hot (50°C) or cold (0°C). This was powered during the day via a 165mm x 165mm 6v Solar panel mounted above the station.
GutsOnce all the instruments and power was setup I used an Arduino
3.3V Pro Micro to read the instruments. This would run and gather the results and transmit via a nRF24l01 transmitter to a Raspberry Pi which collected the results and posted them to a mosquito MQTT broker which displayed them on a Home Assistant (
all outside the scope of this article).
Data
The data transmitted include the temperature from the DHT22 as well as from the BMP180. The humidity was also captured via the DHT22 which was then used to calculate the dewpoint. The photocell calculated the light level. Some additional metadata was included for tracking system performance including the voltage of the battery, if the battery was currently charging or done charging,
Packaging
To deploy I soldered the Arduino to a small double sided PCB
board that would fit into a small metal Sucrets tin (this was before I owned a 3d printer). I cut holes in the tin to be able to hook a USB cable into the Arduino and update code (in retrospect I wish I would have left the cable attached). I also had to fish the wires out and leave a connection to the solar panel. In the end everything fit snug.
Code
Since this was running on a battery and on a solar panel I wanted to take advantage of the
LowPower module to put it to sleep since I only need to read the temperatures every few min. I also take and grab the temperatures into an array and only send the average every min. The code also includes a simple python version for the Raspberry pi to read the data and decode the RF stream and print the struct out.
The code is located
here on github.
Finished Project
Parts list: