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

Rain calculator for WS-2080

Discussion and questions about Cumulus weather station software version 1. This section and its subforums are the main place to get help with Cumulus. Anything which is not specific to the type of weather station goes in here; for anything specific to a type of weather station, please use the appropriate subforum. Use the 'website development' section for any questions relating to creating or running a web site for Cumulus data. Discussion of the stations themselves in these sections is fine.
barbarian
Posts: 5
Joined: Sat Nov 25, 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Rain calculator for WS-2080

Postby barbarian » Sat Nov 25, 2017 3:14 pm

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: 26374
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in Spain
Contact:

Re: Rain calculator for WS-2080

Postby steve » Sat Nov 25, 2017 3:31 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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

Re: Rain calculator for WS-2080

Postby barbarian » Sat Nov 25, 2017 3:50 pm

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: 26374
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in Spain
Contact:

Re: Rain calculator for WS-2080

Postby steve » Sat Nov 25, 2017 3:54 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

AllyCat
Posts: 1009
Joined: Sat Feb 26, 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

Postby AllyCat » Sat Nov 25, 2017 5:13 pm

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 Nov 25, 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Postby barbarian » Sat Nov 25, 2017 6:35 pm

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: 1009
Joined: Sat Feb 26, 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

Postby AllyCat » Sun Nov 26, 2017 10:10 pm

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 Nov 25, 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Postby barbarian » Tue Nov 28, 2017 10:47 am

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: 1009
Joined: Sat Feb 26, 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

Postby AllyCat » Tue Nov 28, 2017 1:05 pm

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 Nov 25, 2017 2:54 pm
Weather Station: WS-2080
Operating System: 10

Re: Rain calculator for WS-2080

Postby barbarian » Wed Nov 29, 2017 7:26 pm

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.


Return to “Cumulus 1”

Who is online

Users browsing this forum: No registered users and 7 guests