Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Arduino and 1-wire based home built weather station.

For discussion of DIY weather equipment - sensors, accessories, improvements to existing kit etc
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

For temperature you can't beat the Dallas/Maxim DS18B20 1-wire digital temperature sensor. Accurate to half a degree C and a massive temperature range (quite sufficient for freezers for instance). Just connect to Gnd pin and a digital input, with a 4.7K pull-up resistor from input to +5v. For humidity as well there's the DHT22 which has the same temperature spec and half percent accuracy for relative humidity. That also goes down well below zero. -20C I think but forget the exact spec now. It's predecessor, the DHT11 doesn't go below freezing. The DHT22 is connected in the same way as the 1-wire. Really very simple. You can download libraries to add to your Arduino IDE setup for all these extras. I'll post all the links later.

I may come up with alternatives to the 1-wire devices I've used for the wind and light sensors later on if anyone is interested.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
41south
Posts: 70
Joined: Mon 04 Apr 2011 11:35 pm
Weather Station: 1-wire Windblown solution
Operating System: Win XP
Location: Wellington, NZ
Contact:

Re: Arduino and 1-wire based home built weather station.

Post by 41south »

I'm really interested to see the Arduino sketch that you use for this Gina. I still wouldn't mind playing with the Arduino and the things like the Hobby Boards UV and solar sensors. I could just never fine the information to read them properly.

My 'Winblown' station is working just fine - but getting it all working with an Arduino has always been on the "to do" list :D
Image
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

I don't think it should be too difficult to collect the data. Wind speed and rainfall is just a matter of counting events in a given period. Wind direction converted from Gray code to standard binary. Light level is already a number as are humidity and temperature. I think atmospheric pressure will be too. All these values are then saved to SD card file using println as comma delimited text. This process is then repeated at the data sampling period. When a computer accesses the system it simply reads the data from the SD card file. Each data line will be prefixed with the date and time in text form, provided by a real time clock module.

That is the simple system, whether I add extra data processing in the Arduino sketch remains to be seen.

Access could be either by USB or Ethernet. The latter would require some extra code to present the data in a suitable form. I see no problem at this time in making the USB port of the Arduino respond to the same commands and present the data in the same form, as the F.O. weather stations.

Having said all that, it remains to be seen if everything is as straightforward as it appears. Problems often come up unexpectedly in programming.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

I've had a look at the pole head instrument assembly (of my 1-wire weather station) and checked the storm damage. Two of the three buckets on the anemometer need replacing. I have a spare ping pong ball and doweling so no problem. The vane is cracked but I think it'll hang together though a couple of drops of hot glue might help. Shouldn't cause too much turbulence. The central hub section seems fine but can't tell until I get it connected up again.

The Arduino logger shield came as a kit which I've now built it so will be ready to try out a sketch soon.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
jim-easterbrook
Posts: 111
Joined: Thu 09 Jul 2009 10:47 am
Weather Station: WH1081, Elecsa AstroTouch 6975
Operating System: openSUSE 13.1, Raspbian, OpenWrt
Location: Epsom, UK
Contact:

Re: Arduino and 1-wire based home built weather station.

Post by jim-easterbrook »

Gina wrote:Here's a photo I took of my test setup for the DHT22 humidity and temperature sensor. You can also see a 1-wire digital temperature chip in a little copper P clip plus LCD display and breadboard.
If you fancy a more retro looking display, I was much taken by this I read about today: http://www.seeedstudio.com/blog/2012/09 ... r-arduino/
Jim
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

Repaired/rebuilt the anemometer :)
Anemometer_01.jpg
Anemometer_02.jpg
You do not have the required permissions to view the files attached to this post.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
41south
Posts: 70
Joined: Mon 04 Apr 2011 11:35 pm
Weather Station: 1-wire Windblown solution
Operating System: Win XP
Location: Wellington, NZ
Contact:

Re: Arduino and 1-wire based home built weather station.

Post by 41south »

Love it! I want one - or 10. :lol:
jim-easterbrook wrote:
Gina wrote:Here's a photo I took of my test setup for the DHT22 humidity and temperature sensor. You can also see a 1-wire digital temperature chip in a little copper P clip plus LCD display and breadboard.
If you fancy a more retro looking display, I was much taken by this I read about today: http://www.seeedstudio.com/blog/2012/09 ... r-arduino/
Image
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

jim-easterbrook wrote:
Gina wrote:Here's a photo I took of my test setup for the DHT22 humidity and temperature sensor. You can also see a 1-wire digital temperature chip in a little copper P clip plus LCD display and breadboard.
If you fancy a more retro looking display, I was much taken by this I read about today: http://www.seeedstudio.com/blog/2012/09 ... r-arduino/
Ha ha :) I remember Nixie tubes :D We also had numerical displays made from 10 sheets of Perspex with dots engraved in for the digits and edge lit with tiny bulbs. Then there were 7 segment displays made with neon bulbs (long and thin) - a variation on the Nixie tube I guess you might say. Having been in the electronics business and then continuing as a hobby for half a century, I have seen quite amazing progress - it's been a very interesting life and it's nowhere near over yet and the progress continues exponentially! :)
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
User avatar
Super-T
Posts: 890
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Arduino and 1-wire based home built weather station.

Post by Super-T »

It wouldn't stand up to all that sun you get in Wellington :-)
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

We don't usually have any problem with too much sun in the UK :D
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

I'm working out some details of the data format and logging interval and such like. The new station will be able to hold far more data than the FO station. The FO logger can hold 4080 entries or lines. With 10m logging interval that represents about a fortnight's worth of data - with 1m interval it's only a couple of days. I can't remember how many bytes it uses per record but it would be something like a hundred or so making the FO data memory around half a megabyte. Now I shall be using gigabytes of data storage in either SD or micro SD cards. The data logger shield takes SD cards and I have 8 and 16GB cards on hand and the Ethernet shield takes micro SD cards. I have 2GB micro SD cards. Even the 2GB card is 8,000 times the FO memory! So my memory will take several years of data :)
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

Thoughts so far on the data format (as CSV file - maybe one file per day) :-

Record number (index)
Date/time - yyyy/mm/dd hh:mm:ss
Wind speed - dd.d
Wind Direction - LLL (N ENE NE etc.)
Light Level - ddd
Outside Temperature - dd.d
Outside Humidity - dd
Rainfall - ddd
Atmospheric Pressure - dddd
Inside Temperature - dd.d
Inside Humidity - dd

That is the basic raw data. If I make it FO compatible I may do some data processing to make the data into the same format. Things like wind gust and wind average speed, rain in last period and total rain, atmospheric pressure and pressure trend...

To reduce the data logging rate I might do some data processing anyway. Many data values change very slowly while some such as wind speed can change quite quickly. I might, for instance, take the wind speed and calculate average and gust values. I might average wind direction to even out what's left of the short-term variations.

Currently, my weather station software doesn't broadcast the indoor temperature and humidity as to my thinking it isn't of any interest to anyone outside the house. But I may take the temperature and humidity values in the observatory scope room or warm room depending on where I put the unit.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
jim-easterbrook
Posts: 111
Joined: Thu 09 Jul 2009 10:47 am
Weather Station: WH1081, Elecsa AstroTouch 6975
Operating System: openSUSE 13.1, Raspbian, OpenWrt
Location: Epsom, UK
Contact:

Re: Arduino and 1-wire based home built weather station.

Post by jim-easterbrook »

Gina wrote:Thoughts so far on the data format (as CSV file - maybe one file per day) :-

Record number (index)
Date/time - yyyy/mm/dd hh:mm:ss
Wind speed - dd.d
Wind Direction - LLL (N ENE NE etc.)
Light Level - ddd
Outside Temperature - dd.d
Outside Humidity - dd
Rainfall - ddd
Atmospheric Pressure - dddd
Inside Temperature - dd.d
Inside Humidity - dd
I'd store the wind direction as a number, either 0..15 or 0..360. It's easy to turn this into a string ('ENE') but not quite so easy to go the other way. You can also do arithmetic on numbers, e.g. summing the speed-direction vector to get the dominant wind direction over the last hour.
I'd also store the date time in ISO format (YYYY-MM-DDTHH:MM:SS) as I like to use standards when I can.
And I wouldn't bother with the record number, but no doubt you have your reasons.
Jim
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Arduino and 1-wire based home built weather station.

Post by Gina »

Thanks Jim :) Yes, I would agree with that - I was going by a format I found for WS data.
jim-easterbrook wrote: I'd store the wind direction as a number, either 0..15 or 0..360. It's easy to turn this into a string ('ENE') but not quite so easy to go the other way. You can also do arithmetic on numbers, e.g. summing the speed-direction vector to get the dominant wind direction over the last hour.
Good idea, I like that :)
I'd also store the date time in ISO format (YYYY-MM-DDTHH:MM:SS) as I like to use standards when I can.
Yes, I agree with using standards where possible too.
And I wouldn't bother with the record number, but no doubt you have your reasons.
I wondered about that - I can't see a need for it either. The date/time is a unique index.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
AllyCat
Posts: 1124
Joined: Sat 26 Feb 2011 1:58 pm
Weather Station: Fine Offset 1080/1 & 3080
Operating System: Windows XP SP3
Location: SE London

Re: Arduino and 1-wire based home built weather station.

Post by AllyCat »

Hi Gina,

Some of those fields look a little "tight", but it may depend on the units chosen.

External temp is likely to need a "sign" (or hundreds for degrees F), but you can hopefully get away without a "hundreds" wind speed, at least in mph. :)

What units for rain? I would have thought at least one decimal place if mm, particularly if you're not recording the rain rate separately. Does the pressure sensor resolve to a decimal place?

Presumably Light Level would be in watts/m2, which should at least stay below 1k in the UK. With peak sunlight in winter not much over 100, maybe a decimal place could be useful. But FO do seem to go OTT with their Lux display of nnnnnn.n (400k max Lux and a dp, but not displayed concurrently), especially as their "accuracy" seems no better than about +/- 30% (+/- 15% claimed)!

Cheers, Alan.
Post Reply