Author Topic: Moteino + Spark Core gateway instead of Pi - Solar Powered Weather Station  (Read 58187 times)

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: Moteino using Spark Core as gateway instead of PI
« Reply #15 on: June 17, 2015, 06:00:38 PM »
You should at least get the DHT22. It's not expensive and much better than the DHT11.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino using Spark Core as gateway instead of PI
« Reply #16 on: June 18, 2015, 09:07:49 AM »
Or a WeatherShield :P

Moteino WeatherShield by Felix Rusu, LowPowerLab.com, on Flickr
« Last Edit: June 19, 2015, 12:37:55 PM by Felix »

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino using Spark Core as gateway instead of PI
« Reply #17 on: June 18, 2015, 10:39:51 AM »
Joe....I have a DHT11, DHT22 and the wired version of the DHT22 (AM2302) available.  I used the DHT11 since it was an indoor application and precision wasn't that big of a deal.  I'm saving the DHT22 for something else.  I was going to use the wired DHT22 on the outside unit until I found the BME180 which does temp/humidity and pressure in one chip.

Great ad Felix!

jra

  • Jr. Member
  • **
  • Posts: 81
  • Country: us
Re: Moteino using Spark Core as gateway instead of PI
« Reply #18 on: June 19, 2015, 12:20:33 PM »
You mean the BME280, right?  Did you make your own breakout or did you buy one (http://www.embeddedadventures.com/bme280_weather_multi_sensor_mod-1022.html maybe)?  I thought it was pin compatible with the BMP280 (temperature + pressure, no humidity) and would work on something like http://www.watterott.com/en/BMP280-Breakout but an email exchange with them indicated that the BMP280/BME280 packages are slightly different.  They plan on having a BME280 breakout available somewhere towards the end of June.  The standard interfaces (I2C/SPI) are definitely a plus and the ability to monitor three parameters with a single sensor can simplify the HW design.  How have you found the temperature accuracy?  I was under the impression that the temperature sensor on the Bosch unit was there primarily to compensate the barometric sensor as the accuracy specs are not as good as something like an MCP9808 (temperature only) or a HDC1000 (temperature + humidity).  I'm looking at doing something slightly different (monitor/control the environment inside a coldframe/greenhouse).

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino using Spark Core as gateway instead of PI
« Reply #19 on: June 19, 2015, 01:39:00 PM »
Yes, sorry.....BME280.  I did get the one from Embedded Adventures.  I am also using the code they provided.  I love being able to measure voltage and current for the LIPO, solar panel and the Moteino and sensors all at the same time.  I've found the temperature accuracy to be as good as any other sensors I've used (DHT11, DHT22, DSB1820).  I also have one of the MCP9808's that I got when I first started learning the Arduino a couple of months ago.  I've also noticed that the BME280 is faster in reacting to quick temperature changes.  Bringing the unit indoors or putting it outside used to take a few seconds to start to compensate but IMHO this unit is much faster.


syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino using Spark Core as gateway instead of PI
« Reply #20 on: June 30, 2015, 10:59:07 AM »
Attached is a picture showing the outdoor unit with the newly painted tray to attach it to my deck.

It also shows the newly painted temp sensor shield.  I painted it with several coats of off-white and by placing a commercial temp sensor next to it I found that in direct sun of 90+ degrees it reduces the reported temp around 15-20 degrees.  The BME280 is hanging inside around the 3rd bowl from the top.  There is enough room for air to blow throw but hopefully keep out the rain.  The top is solid and the rest of the bowls have a 2" cutout down the middle.  Three 1/4" threaded rods and 1/4" tubing for spacers complete the unit.

I'll take a few screen shots of the indoor unit LCD and post them in a few minutes.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino using Spark Core as gateway instead of PI
« Reply #21 on: June 30, 2015, 11:16:11 AM »
LCD screens from the indoor unit:

Currently I have a timer for each of three different displays:

1)  Indoor temp & humidity: 4 seconds
2)  Outdoor temp/humidity/pressure/heat index or wind chill: 4 seconds
3)  Current wind speed/average windspeed/max windspeed:  3.5 seconds

If the proper conditions for either the heat index or wind chill it is displayed, otherwise just a 0.0.  The average/max windspeed calculations are done over the last hour.  The outdoor unit is sending in temp/humidity/pressure/heat index or wind chill every 30 seconds and wind every 10 seconds.

The barometric pressure indicator (up/down arrow) uses a running average to compare each new reading.  I'm meeting a "big data" professor friend of mine and will hopefully come up with a more statistically-relevant algorithm but for now it's OK with me.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino using Spark Core as gateway instead of PI
« Reply #22 on: June 30, 2015, 11:24:56 AM »
Ok, this is sticky worthy  8)

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
I'm guessing "sticky worthy" is a good thing Felix?

BTW, I just ordered the lightning sensor from Embedded to add to the project.  I'm also thinking about adding a DHT11 to the outside box to report on temps inside the box.   You can't have enough sensors, right?


TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Moteino using Spark Core as gateway instead of PI
« Reply #24 on: June 30, 2015, 12:01:08 PM »
I painted it with several coats of off-white and by placing a commercial temp sensor next to it I found that in direct sun of 90+ degrees it reduces the reported temp around 15-20 degrees.  The BME280 is hanging inside around the 3rd bowl from the top.  There is enough room for air to blow throw but hopefully keep out the rain.  The top is solid and the rest of the bowls have a 2" cutout down the middle.  Three 1/4" threaded rods and 1/4" tubing for spacers complete the unit.
This weekend I saw a weatherstation where someone had enclosed his THP sensor in a cedar box with louvers in the side and an RV Solar powered vent in the sloped top.  The owner claimed that he had good accuracy measuring the outside ambient temperature without 'environmental' issues (like blizzards).  The vent looked similar to this one: http://www.etrailer.com/Enclosed-Trailer-Parts/Ultra-Fab-Products/UF53-945001.html but was around 4" diameter, for a sewer pipe, I believe.

You can probably shop around and find a less expensive one.

Tom

BTW, I like that your weather station has a place to open a beer!
« Last Edit: June 30, 2015, 12:09:12 PM by TomWS »

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Thanks Tom....you have to have your priorities!

I'll take a look at your suggestion.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Was watching some great Cornell classes on MCU's and started learning more than I wanted to about hardware timers.

Ended up adding a watchdog timer on the outdoor unit of 8 seconds and one on the indoor unit of 2 seconds.  Just a simple system reset if not reset.  Might get fancy at some point and write the current date/time into EEPROM so I see when it crashes.

I might end up tweaking these two values after some more experimentation.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino + Spark Core gateway instead of Pi - Solar Powered Weather Station
« Reply #27 on: November 09, 2015, 04:04:08 AM »
We changed the heat shield from the plastic bowls to what was originally a humming bird feeder.  We took out the insides and ran a dowel down the middle.  We attached the BME280 to the dowel and attached the cable.  Slats were installed to allow for fresh air flow.  A fresh coat of white paint and the new heat shield was born.


syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Moteino + Spark Core gateway instead of Pi - Solar Powered Weather Station
« Reply #28 on: November 09, 2015, 04:12:25 AM »
Another note....I changed the BME280 drivers from the one that came from Embedded Adventures to the version provided by Adafruit.  Over time I was getting way too much variation from other devices.  Over 50% of the day, the humidity was always showing 100%.  Since replacing the drivers the results are much closer to that of other devices, and something that I can actually trust.

I also changed the timing and battery management by converting from "delays" using millis() to the following:

1.  Grab/display the wind speed.
2.  Go into a 4x loop:
  - grab/display the wind speed
  - radio.sleep()
  - lowpower.sleep(8s)
3.  Grab/display the temp/humidity/pressure
4.  Grab/display the 3 voltage/current measurements
5.  radio.sleep
6.  lowpower.sleep(8s)

This has dramatically saved battery, especially now the weather is changing and we're getting days with very little sun.  Another change I'm going to make is to turn off power booster for the anemometer (5v->7v) while sleeping.  We found that it only takes about a second to turn the power booster back on and get a reliable sample.  We're going to use one pin on the Moteino with a small power transistor to do the on/off switching.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino + Spark Core gateway instead of Pi - Solar Powered Weather Station
« Reply #29 on: November 09, 2015, 08:46:05 AM »
Very nice, good progress  8)
You still haven't considered a WeatherShield?