Page 1 of 1

Sunshine sensor

Posted: Tue 03 May 2016 8:05 am
by thegasman
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

Re: Sunshine sensor

Posted: Tue 03 May 2016 9:12 am
by mcrossley
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.

Re: Sunshine sensor

Posted: Tue 03 May 2016 9:26 am
by AllyCat
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.

Re: Sunshine sensor

Posted: Tue 03 May 2016 10:07 am
by thegasman
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

Re: Sunshine sensor

Posted: Tue 03 May 2016 10:54 am
by thegasman
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

Re: Sunshine sensor

Posted: Tue 03 May 2016 11:44 am
by freddie
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.

Re: Sunshine sensor

Posted: Sun 22 May 2016 6:31 pm
by geoffp
Has anyone suceeded in producing a sunshine recorder to use with Cumulus? :groan:

Geoff

Re: Sunshine sensor

Posted: Sun 22 May 2016 7:59 pm
by AllyCat
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.

Re: Sunshine sensor

Posted: Sun 22 May 2016 8:24 pm
by geoffp
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

Re: Sunshine sensor

Posted: Sun 22 May 2016 9:06 pm
by AllyCat
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.

Re: Sunshine sensor

Posted: Mon 23 May 2016 7:07 am
by geoffp
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:

Re: Sunshine sensor

Posted: Mon 23 May 2016 10:06 am
by AllyCat
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.

Re: Sunshine sensor

Posted: Mon 23 May 2016 10:21 am
by geoffp
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.

Re: Sunshine sensor

Posted: Mon 23 May 2016 1:04 pm
by uncle_bob
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!

Re: Sunshine sensor

Posted: Tue 24 May 2016 1:42 pm
by thegasman
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