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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

Rain calculator for WS-2080

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
barbarian
Posts: 5
Joined: Sat 25 Nov 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Rain calculator for WS-2080

Post by barbarian »

Hi.
This questions might be asked... but i will try
I need to find a formula to convert raw rain counter value
to a precipitation rate (per hour or so).
My station is WS-2080.
The console is completly dead. I managed to crack the protocol.
The only problem is to calculate the rain value.
Did anybody have the same problem?
Thanks.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Rain calculator for WS-2080

Post by steve »

Cumulus just takes the difference between the current counter and the value 5 minutes ago, and multiplies it by 12, to give mm/hr. It’s not a very sophisticated way of doing it, but it’s good enough for most purposes.
Steve
barbarian
Posts: 5
Joined: Sat 25 Nov 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Post by barbarian »

Oh that is nice. will try it out.
Did you know how they represent the temperature. it has 2-byte value but the high byte changes unpredictably.
Anyway the temperature isn't necessary, still curious anyway.
Well... if someone needs a source code of the reciever for atmel microcontroller for this specific station i can share.
thanks a lot
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Rain calculator for WS-2080

Post by steve »

I’m assuming that you mean in the data between the transmitter and console, and I don’t know anything about that, sorry. I’m sure someone else here does, though.
Steve
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: Rain calculator for WS-2080

Post by AllyCat »

Hi,
barbarian wrote:Did you know how they represent the temperature. it has 2-byte value
Welcome to the forum. I believe the temperature is coded in pure binary, in tenths of a degree above -50 degrees C (eg. 0x01 0xF4 for 0 degrees C). Only the low nibble of the upper byte is used for temperature; I thought the upper nibble was used only for the "device address", but I'm not certain.

Receiver code for an Atmel chip might be of interest; I'd like to see support for the Fine Offset transmitters (not sensors) added to the Weatherduino project (currently only Auriol protocol in addition to its native Virtualwire). ;)

Another way to estimate rain rate is to measure the time between rain tips and calculate accordingly (0.3mm / tip for the Fine Offset). However, you can only calculate that when you have at least two tips (0.6mm) ! I believe the Davis drops back to "zero" if there are no more tips after 15 minutes.

Cheers, Alan.
barbarian
Posts: 5
Joined: Sat 25 Nov 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Post by barbarian »

Yes it is all working now!
For my station the value which i should substract from the actual measurment is 0x190.
So for temperature 26.1 (0x1295) if i don't use the high nibble it will be (0x295 - 0x190) = 0x105 (261) * 0.1 = 26.1 C.
Nice...
Do you know which model of a barometer sensor they are use btw?
Only pressure is missing now.
Here is the code nothing complicated.
Atmega8 16 mhz crystal
You do not have the required permissions to view the files attached to this post.
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: Rain calculator for WS-2080

Post by AllyCat »

Hi,

We have an external temperature range of more than 25.6 degrees here in the UK. ;) Also note that the Rain counter is 16 bits, the Wind direction byte includes flags for Low Battery and "Bad Direction", and there's an 8 bit CRC at the end of the message.
barbarian wrote: Do you know which model of a barometer sensor they are use btw?
No sorry I don't. It's probably made by "Hope RF" (who appear to have some connection with Fine Offset) but I don't even know if it uses the I2C, SPI or some kind of "dumb" serial data protocol. Also the WS-1080 and 3080 hardware have different architectures and even stations with the same model number can have some hardware differences (not just the RF carrier frequency, but the air protocol as well).

Cheers, Alan.
barbarian
Posts: 5
Joined: Sat 25 Nov 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Post by barbarian »

Hi Alan,

It seems like i missed the last byte (checksum) of the frame.
But I think it impossible to find out the checksum algorithm. i've been trying to guess it, but no one matched;

Here are the frames i am getting:
a5 01 91 4a 00 00 00 60 0e b8
a5 01 92 4a 00 00 00 60 0d e1
a5 01 92 4a 00 00 00 60 0e b2
a5 01 94 49 00 00 00 60 0d 0c
a5 01 94 49 00 00 00 60 0e 5f
a5 01 95 49 00 01 00 60 0c 4f
a5 01 95 49 00 00 00 60 0c d4
a5 01 95 49 00 00 00 60 0c d4
a5 01 95 49 00 00 00 60 0c d4
a5 01 95 49 00 00 00 60 0e b6

I think i left this task; will be using few fields to determine a frame integrity.
As i understood the rain tick equals to 0.3 mm for this bucket. (Rain buckets are probably the same for most of the stations). Is it correct?
Also note that the Rain counter is 16 bits
My rain couter (low byte) haven't overflow yet. I Can't imaine where the rest of it can be hidden :( ;

Thanks for the help.
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: Rain calculator for WS-2080

Post by AllyCat »

Hi,

Yes the nominal rain tip is 0.3mm and the High byte is immediately before the Low byte. It's easy to make the Rain Counter overflow, just plug the anemometer into the Rain socket of the Transmitter. ;)

Kevin Sangeelee wrote some code for the Raspberry Pi (on their forum and this one) but the Basic header code that I use is:

Code: Select all

;Example : FF AE B2 59 2D 05 06 0000 15 33 = CRC OK

symbol FOruno	 = 0	; Fine Offset Runin byte offset (=FF) 
symbol FOaddro	= 1	; Address (1.5 bytes)
symbol FOtemHo	= 2	; Temperature High byte (in low nybble) 0 = -50 degC
symbol FOtemDo	= 3	; Temperature Low byte (tenths of a degree)
symbol FOhumo	 = 4	; Humidity byte (binary)
symbol FOwinAo	= 5	; Wind Average speed byte (0.75mph/unit)
symbol FOwinGo	= 6	; Wind Gust speed byte (0.75mph/unit)
symbol FOraino   = 7	; Rain Counter Word (High byte first)
symbol FOvaneo	= 9	; Wind Vane (in low nybble), $10= Low batt,$80=Bad direction
symbol FOcsumo	= 10	; CRC checksum (CRC-8 shifting left)
symbol POLY 	  = $31	; CRC Polynomial  ; x8+x5+x4+x+1 
Cheers, Alan.
barbarian
Posts: 5
Joined: Sat 25 Nov 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Post by barbarian »

Hi Alan,

That is a valuable piece of information!
I actually tried maxim polinomial before for crc8. It didn't match. Although, maybe I missed something.
Anyway, This will help me very much. I thougth the wind was represented as meters per second :oops: Thanks.
Post Reply