I bought in Spakfun DS-15901 weather station (wind direction, wind speed and rain) and a BM280 (temperature, humidity and pressure) to monitor the weather at home.
I decided to use the MKR100 that give me also the possibility to check from internet the information that the sensors send.
The connection it is very easy. The DS-1901 has switches that close when the wind vane moves, the anemometer spin and the bucket inthe rain detector fills, you can see the connection in the diagram bellow.
The BME280 was hooked using I2C and the connection is straightforward.
I build a library (WeatherStationLib) for the weather station and the BME280and I also used this WebSocket library to send the data retrieved from the sensors. I used an little unorthodox method to use the Adafruit library to read the BME280. When I tried to use their library in mine's the Arduino hangs, and it looks that hangs, when the method.begin() from Adafruit library is called. So, to overcome this problem I included the Adafruit library in my library but I called that method from the main sketch.
I also inclued a libray to connect the MKR1000 to wifi (WiFiConnect).
I use a client coded in HTML to connect the MKR100 to wifi and display all data.
Please see the example sketch on how to use the HTML Client in this repository.
One last thing, when you try the Arduino connected to external power source (without a computer) , please comment the following lines in setup():
Serial.begin(9600)
while (!Serial) {}
Addendum Rain Bucket Calibration.
After the comments of David Stacer, I did a simple calibration or the rain bucket just to see if the teorethical value (0.2794mm/bucket) was far from the practical (0.30mm/bucket or 0.36mm/bucket).
I know that this is not a field calibration but give me an idea of where I am.
What I did was the following:
1) I Calibrated a dropper to see how much water gives in 120 seconds. I'm calling this Rate and the value was:
Rate = 40.3cm3/120 sec = 0.336cm3/sec
2) I measured the time elapsed to fill 10 bucket. Here I got two different measures. One was when the dropper was just above the hole in the rain counter and the other I aim the dripper 3cm from the hole. With that I was trying to see if the water drain influenced the measurements. I call this values:
RainxBucket_1 = 1.9 cm3/bucket
RainxBucket_2 = 1.6cm3/bucket
3) Finally, I measured the surface of the rain collector that as:
Sup = 53.4cm2
4) I calculate both results with the following equations
Rain (mm /Bucket) = Rate * Rainxbucket_n / Sup * 10
Rain_1 = 0.36 mm /Bucket
Rain_2 = 0.30 mm/bucket
I calculate the error propagation of my measurements and it was 5%, so more precise are:
Rain_1 = 0.36 ±0.02 mm /Bucket
Rain_2 = 0.30 ± 0.02 mm/bucket
I think that the difference between those values are consequence of the draining and the surface tension of the eater and the container.
The value that come with the DS-1901 were 0.2794 mm/bucket.
Comments
Please log in or sign up to comment.