Weather Station Project

Hi all.

I plan to build a Weather Station that will allow me to see what the weather is doing at home, and build up an archive of weather data over several years.

My plan was to use a radio or wifi enabled Arduino or Picaxe to control the sensors and relay the data back to the house for display on a small LCD screen and also store them on SD card. The SD card would allow transfer of the data to PC.

I have some cheep 'n cheerful wind speed, direction and rainfall detectors, which will do for now but could be upgraded one day. I would also want to add temp, humidity, barometric pressure, light level, perhaps even one of those lightening storm detectors.

While searching for radio/wifi devices, I stumbled across Spark Core and it seemed to be a great way to get this data onto the internet so I could monitor the weather on my android phone or PC while at home or away. I would like to power the sensors and circuit with solar panel and SLA battery.

While waiting for my Spark Core to arrive I will be experimenting with the sensors on breadboard using my Arduino Nano 3, writing some code to turn the sensor signals into usable data.

In terms of experience: I used to be a professional programmer, and I am building up a reasonable level of electronics experience. I have designed and built small circuits to control lights in our Chicken house, monitor soil moisture and control watering in the greenhouse, plus other more “bling” projects like a 4x4x4 led cube and Conway’s Game of Life on Arduino displayed on a 128x64 graphic LCD. I have no experience of web-based APIs, but I can write simple HTML.

Any thoughts or suggestions welcome.

Paul

6 Likes

This image shows a rain gauge and wind direction sensor connected to Arduino Nano. The breadboard also has a Dallas 18B20 1-Wire temperature sensor connected.

Very cool - where’d you get those sensors? Curious what’s going on inside the rain gauge.

I´m planing an almost similar project, but I’m thinking about the temperature range of the SparkCore…
It will be placed outside and therefore it will be used somewhere between -30°C and +60°C.
By now I wasn´t able to find any information about this.

Can anyone tell us more about this problem (Temperature Rating)?

Thank you

The sensors are made by Fine Offset and widely available (e.g. eBay) as spares for their weather stations.

Here is a picture of the internals of the rain guage. As the see-saw tips, a magnet sweeps past a reed switch.

Rain guage internals

1 Like

As I learn more about these sensors (windspeed, rainguage, dht11 temp/humidity etc) its looking like I will need to use interrputs a lot, rather than polling pins, to avoid missing events. There’s an Arduino library to support interrupts on pin changes. Will something like that be needed on the stm32 chip that spark core uses? I wouldn’t be surprised if a more advanced chip like that has a more sophisticated interrupt system than the good old atmega. Also, is the spark core firmware likely to cause timing issues with the kind of interrupts I’m suggesting?

The STM32 is better at handling interrupts than the ATmega; you can take interrupts on any pin. We’re actually working on the interrupt implementation right now; @mohit’s been working on it this week. There are currently some conflicts with the CC3000 with a couple of the pins due to overlapping peripherals but we’re going to clean this up, and by the time of delivery you will definitely be able to do interrupts on most pins, if not all of them.

This a fun idea. If you need help, I documented a similar project using a mbed microcontroller (ARM M3) using the same weather sensors. I went more with the addition of a Cellular Modem, Windows CE, and GPS sensors.
https://mbed.org/users/mafischl/notebook/weather-station/

Good luck on your project !!

Thanks!

I now have temp, humidity, pressure, wind speed, wind direction & precipitation sensors working (in a very basic sense) with Arduino. Lots more do, even before Spark Core arrives.


I have added a DS3231-based RTC. I’m hoping I won’t need this with the Spark Core? I don’t expect the Spark Core’s built-in RTC to be as accurate as a DS3231, but then perhaps it doesn’t need to be, because I can get it to sync up with an internet time source on a regular basis?

1 Like

Our built-in RTC should be sufficiently accurate for what you’re doing, and yes it’s true that you can always sync up with an internet time source.

Thanks Zach, hopefully the spark core’s built-in rtc will be st least as accurate as a ds1307, so syncing up once per week will be enough. Will there be some example code for doing this , when you guys get some time?

Absolutely; hard to say what level of documentation we’ll get to before delivery vs. afterwards, but we will be both documenting all of the functions available on the Spark Core (both Arduino and additional ones that we’ve created), and creating annotated examples to show how to do common things like this.

Hi Zach, does any documentation exist at this stage or still have to wait till delivery started?

Even though its not specific to Spark Core, what would be useful pre-reading? Nothing too long or expensive please!

Sorry guys, nothing yet - we’re putting together some documentation behind the scenes but it’s still a mess so we’ll be cleaning it up and publishing it shortly before delivery. Sorry it’s not out yet, but our focus has been on manufacturing and software/firmware development, and once everything is fully built then we can focus on documentation :slight_smile:

Hi @PaulRB, what kind of hardware interface has the wind direction sensor you use? And what is the resolution of the sensor?

Its a very simple and inexpensive sensor containing a small magnet and 8 reed switches. Each reed switch is connected to a different value resistor. The output is connected to a 4K7 resistor to form a voltage divider and fed into an analog input on an Arduino (currently). 16 directions can be resolved in theory because the maget can activate 2 switches at once. However, this does not work well and in practice only 8 directions can be resolved reliably.

Paul

Spark Core running off 12V SLA battery. Well, not directly of course!

I’m using a DC-DC convertor to feed 3.3V to the core, bypassing the regulator. Working perfectly and using around 45mA of current @12V, which corresponds to around 150mA @3.3V assuming about 90% efficiency.

Connected to the Spark are: SHT21 Temp & Humitity sensor, BMP085 Temp & Pressure sensor, and an LDR to measure light level.

3 Likes

Wind direction sensor connected…

3 Likes

With the help of @BDub’s remote Spark controller as a starting point, I now have a basic web page to view the sensor readings:

5 Likes