Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Sunshine sensor

For discussion of DIY weather equipment - sensors, accessories, improvements to existing kit etc
thegasman
Posts: 23
Joined: Sun Mar 24, 2013 6:42 pm
Weather Station: WMR88
Operating System: Raspbian on Pi2
Location: Ayr, Scotland, United Kingdom
Contact:

Sunshine sensor

Postby thegasman » Tue May 03, 2016 8:05 am

Hi,

I run Cumulus MX on a raspberry pi, with an OS WMR88 connected to it.
I have long wanted to add a measurement of sunshine to this setup, but there don't seem to be any off-the-shelf solutions.
OS don't make a solar radiation sensor, although they do have a UV sensor (which I have). This isn't sensitive enough to measure early/late sunshine, or indeed any sunshine for about half the year at my latitude.

I am therefore planning to make my own solar sensor, using the solar cell kit from http://www.instesre.org/construction/py ... ometer.htm, attached to an ADC on the pi, and write some software in Python to log the data.

I expect this bit to be reasonably straightforward. The difficulty it seems to me will be getting the data into Cumulus. I've spent quite some time reading the forums to hunt for options, but haven't come up with any good ones. Possibilities I see are:

1. Write the data in Easyweather format for Cumulus to import. Cumulus only seems to be able to import from one source at a time, so if I set the weather station type to Easyweather it won't read from my WMR88 as well. Then I'd have to write all the routines to read the data from the WMR88 to the Easyweather file as well, a daunting prospect. I don't even have access to the WMR88 protocol.

2. Emulate a B-L sun recorder and get Cumulus to import the data. What is the spec for that anyway? That will only give me sunshine or not anyway, no W/m2.

3. Get my software to edit the monthly logs and dayfile.txt regularly to insert the sunshine data. As cumulus seems to hold all this data in memory unless it is restarted, I don't think this will show in the live data screens. It may allow me to make and display historical records of sunshine though. There is a possibility of clashing with Cumulus for access to the files leading to data loss.

None of these options is straightforward or totally satisfactory. Is there another easier way of doing it that I've missed? Can Cumulus read extra sensor data from a formatted text file for example?

Thanks for any suggestions.

Martin

User avatar
mcrossley
Posts: 4979
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sunshine sensor

Postby mcrossley » Tue May 03, 2016 9:12 am

As far as I know Cumulus will only accept external 'sunshine' detectors, not solar irradiation, so unless you put 'something' between Cumulus and your station + solar sensor I think you are out of luck.

Another possibility is to use a SQL database for your web site, and inject the solar data into that, then use the DB to construct your web pages.

Also for your solar sensor, I think you would be much better using a photodiode rather than a PV panel as the sensor.

AllyCat
Posts: 997
Joined: Sat Feb 26, 2011 1:58 pm
Weather Station: Fine Offset 1080/1 & 3080
Operating System: Windows XP SP3
Location: SE London

Re: Sunshine sensor

Postby AllyCat » Tue May 03, 2016 9:26 am

Hi,

There might be an "option 4" which is to emulate a Davis station (interface) which of course Cumulus supports. That's the approach which has been adopted for the WeatherDuino project. There are several relevant threads on that forum, but this is perhaps a good place to start.

Yes, as you say, the B-L Sun Recorder basically only supplies a "Sunshine Hours" figure to Cumulus, which it does by continuously updating a file that Cumulus accesses.

Personally, I've been developing a "Solar Add-On" for the ubiquitous Fine Offset stations, for a considerable time now (that's a hint not to expect the development to come to a conclusion any time soon). It's planned as a "loop-through dongle" on the Wind Sensors' cable (which IMHO is more useful than FO's design intercepting their Rain cable). It will "borrow" power from the FO External Transmitter and take advantage of both its radio link and the Data Logger (in the Console). As such, it is highly dependent on the FO hardware and interface protocols, so is unlikley to be applicable to any other hardware such as the WMR88. But in the long term I do hope to add an option to transmit Solar Data in the WeatherDuino format.

IMHO a BPW34 is a more "professional" sensor (than used by Brooks in your link), available not only with a "normal silicon" response (IR + Light), but also in "Blue-Enhanced" and "Filtered Infra Red" (Visible filtered out) versions. However, (rather against my initial instincts) I'm currently experimenting with a small PV panel similar to that employed with the WeatherDuino link above.

Cheers, Alan.

thegasman
Posts: 23
Joined: Sun Mar 24, 2013 6:42 pm
Weather Station: WMR88
Operating System: Raspbian on Pi2
Location: Ayr, Scotland, United Kingdom
Contact:

Re: Sunshine sensor

Postby thegasman » Tue May 03, 2016 10:07 am

Thank you both for the ideas. I note the suggestion to use a photodiode, I'll look into it.

Of the suggestions, running a database driven website and injecting my solar data into it sounds the most promising. I have looked at your website before Mark, and would love to emulate it. Unfortunately the words 'database driven website' alone are enough to make all the blood drain from my head! I can code a bit in Java, C#, visual basic, and am familiar with SQL, html etc, but I wouldn't really know where to start with developing a database that cumulus writes too and a website to display it. Can you give me any pointers or outline how you did it?

Martin

thegasman
Posts: 23
Joined: Sun Mar 24, 2013 6:42 pm
Weather Station: WMR88
Operating System: Raspbian on Pi2
Location: Ayr, Scotland, United Kingdom
Contact:

Re: Sunshine sensor

Postby thegasman » Tue May 03, 2016 10:54 am

Just had a brainwave :clap:

A much simpler starting point would be to process my sunshine data in my Python script and save it as 'mysolardata.json', add this file to 'extra web files' in the Cumulus setup to get it uploaded to my website, and edit cumuluscharts.js to replace 'solardata.json' with 'mysolardata.json'. That should get my data data displayed on the charts page of my website with minimal brain strain! :D I can do the same for sunshine hours.

I can think about database driven websites once I get that working.
PS. Mark, if you were willing to share some of the source code for your website with me I would be delighted.

Martin

freddie
Posts: 263
Joined: Wed Jun 08, 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 17.04)
Location: Hyssington, Powys, UK
Contact:

Re: Sunshine sensor

Postby freddie » Tue May 03, 2016 11:44 am

thegasman wrote:I wouldn't really know where to start with developing a database that cumulus writes to
This is already built in to MX. Have a look at the announcement thread for new releases, and you will find some useful stuff.
Freddie
Image

User avatar
geoffp
Posts: 322
Joined: Tue Jun 28, 2011 2:06 pm
Weather Station: Oregon Scientific WMR 200
Operating System: Windows 7
Location: Harwich, Essex
Contact:

Re: Sunshine sensor

Postby geoffp » Sun May 22, 2016 6:31 pm

Has anyone suceeded in producing a sunshine recorder to use with Cumulus? :groan:

Geoff
Regards,

Geoff

WOW Site No. 147808

AllyCat
Posts: 997
Joined: Sat Feb 26, 2011 1:58 pm
Weather Station: Fine Offset 1080/1 & 3080
Operating System: Windows XP SP3
Location: SE London

Re: Sunshine sensor

Postby AllyCat » Sun May 22, 2016 7:59 pm

Hi,

What do you have in mind, "real time" data display/logging or just a "Sunshine Hours" figure?

Several commercial stations (for example from Davis and Fine Offset) can provide solar data input for Cumulus and of course there is the Blake-Larson sensor interface.

But probably the most available "Homebuilt" hardware is part of the WeatherDuino project (which emulates the Davis protocol). In particular, see the link above the blue paragraph there.

Cheers, Alan.

User avatar
geoffp
Posts: 322
Joined: Tue Jun 28, 2011 2:06 pm
Weather Station: Oregon Scientific WMR 200
Operating System: Windows 7
Location: Harwich, Essex
Contact:

Re: Sunshine sensor

Postby geoffp » Sun May 22, 2016 8:24 pm

Hi Alan
Thanks for your reply, I have an Oregon WMR 200 and running Cumulus, I need a device to register in the Solar section i.e Solar Rad. I have an Oregon UV sensor so that side is taken care of.

I used to have a Fine Offset set up but I had so much trouble with data errors I ditched it for the WMR 200

Geoff
Regards,

Geoff

WOW Site No. 147808

AllyCat
Posts: 997
Joined: Sat Feb 26, 2011 1:58 pm
Weather Station: Fine Offset 1080/1 & 3080
Operating System: Windows XP SP3
Location: SE London

Re: Sunshine sensor

Postby AllyCat » Sun May 22, 2016 9:06 pm

Hi,

AFAIK Oregon don't even have a defined protocol to tranmsit Visible/IR Solar data, so you would need some additional system (such as the Blake-Larsen file input to Cumulus).

Very recently, somebody has started developing an Oregon Interface for the WeatherDuino hardware. But it can't handle both protocols (Oregon and Arduino) at the same time, so you would still have a problem with the "missing" Oregon wireless protocol.

Cheers, Alan.

User avatar
geoffp
Posts: 322
Joined: Tue Jun 28, 2011 2:06 pm
Weather Station: Oregon Scientific WMR 200
Operating System: Windows 7
Location: Harwich, Essex
Contact:

Re: Sunshine sensor

Postby geoffp » Mon May 23, 2016 7:07 am

Many thanks Alan, I think the best thing I can do is to forget the idea,I can not aford £300 plus for a Blake Larson sensor out of my OAP,

I know in WD you can pop a temp sensor in a jar and get solar details that way, was not sure if any of the bofins on here had invented anything like that for Cumulus, would be good if they could :lol:
Regards,

Geoff

WOW Site No. 147808

AllyCat
Posts: 997
Joined: Sat Feb 26, 2011 1:58 pm
Weather Station: Fine Offset 1080/1 & 3080
Operating System: Windows XP SP3
Location: SE London

Re: Sunshine sensor

Postby AllyCat » Mon May 23, 2016 10:06 am

Hi,

The problem is not really "Cumulus", but obtaining suitable hardware to deliver the Solar data.

For a considerable time I have been developing a low-cost "Solar Add-On" for the Fine Offset stations, which may be appreoaching a "complete" design. But it's still rather too soon to provide constructional details. Longer-term, I hope it may be able to (also) transmit the "WeatherDuino" protocol, but there's no hope for an Oregon if the wireless/data protocol doesn't exist.

Cheers, Alan.

User avatar
geoffp
Posts: 322
Joined: Tue Jun 28, 2011 2:06 pm
Weather Station: Oregon Scientific WMR 200
Operating System: Windows 7
Location: Harwich, Essex
Contact:

Re: Sunshine sensor

Postby geoffp » Mon May 23, 2016 10:21 am

Hi Alan, yes, I understand fully, I was not moaning about Cumulus it is a great program, with so many bits of hardware on the scene it must be very hard to sort out the coding for all types.

I had a fine offset but with so much problem with wrong data like temperature 290c and wind speeds of 500mph I got very fed up with it that is why I went onto Oregon, at least it is stable.
Regards,

Geoff

WOW Site No. 147808

uncle_bob
Posts: 459
Joined: Wed Aug 17, 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: Sunshine sensor

Postby uncle_bob » Mon May 23, 2016 1:04 pm

geoffp wrote:I had a fine offset but with so much problem with wrong data like temperature 290c and wind speeds of 500mph I got very fed up with it that is why I went onto Oregon, at least it is stable.


Me too, but I went with the WeatherDuino as I had a supply of Anemometers Rain Gauges etc from the crappy Fine Offsets. And funny enough, no spikes ever since!

thegasman
Posts: 23
Joined: Sun Mar 24, 2013 6:42 pm
Weather Station: WMR88
Operating System: Raspbian on Pi2
Location: Ayr, Scotland, United Kingdom
Contact:

Re: Sunshine sensor

Postby thegasman » Tue May 24, 2016 1:42 pm

In answer to the question, yes, I succeeded in getting a solar sensor working for £50!

I used the kit mentioned earlier from www.instesre.org. This is a wired connection to a an ADC breakout board on a Raspberry Pi. A couple of small Python scripts to log the data every minute, and to calculate the number of sun hours per day. Use cumulus extra files feature to upload the results to the website.

Results at www.doonfootweather.x10.mx/cumulus on the solar tab in trends.

Martin


Return to “Homebuilt”

Who is online

Users browsing this forum: No registered users and 1 guest