How to connect a weather station WS2355 (or WS2300) to Weather Underground with Arduino

By on November 30, 2011
Pin It


 

There are several softwares that enable the publication of the weather data of a professional weather station, but they all work on PC, so we should connect the weather station to a computer and leave it on, the idea is not good because the computer takes up space and consumes a lot. At a time when we should spare the energy, its not a good thing.
The project we’re talking about instead operates as a stand-alone application and allows you to publish the weather station data independently on http://www.wunderground.com, “forgetting” the PC consumption and even the desk space.

Arduino controls the dialogue with the weather station to acquire the data and also the Ethernet interface to transfer them, by making the necessary connection to the Internet via ADSL, passing by a router pointing to the IP address of the Weather Underground site and transferring information using the TCP / IP.

 

Our project

This circuit reads data from a weather station with serial interface and upload the data collected on http://www.wunderground.com.
Not all stations are equal, therefore, our circuit can not be universal but it is indicated specifically for stations La Crosse WS2355, WS2300 or WS2350.

The choice of weather station WS23xx was dictated primarily by a consideration: it has a convenient serial interface to connect and dialogue with a microcontroller such as Arduino.
We chose www.wunderground.com site because it allows anyone to upload their weather data, but also to monitor the temperature, humidity, pressure, wind etc. on line. Also on this site there are many widgets that allow you to integrate data in website or blog.
An example is the Widget for the home page of Google.
The data sent by users are publicly available, then from the home page we can specify the geographic area that interests us and we will see a screen that lists all of the corresponding stations.







How does it work?

The system has two circuit: one is the famous Arduino UNO and the other is a shield that integrates the Ethernet module WIZnet (you may, of course, use the the original Ethernet Shield), as well as a TTL/RS232 logic level converter MAX238 type. The converter allows you to adapt the serial levels of weather station to the TTL levels of Arduino.
Please be aware that the communication port of the weather station is not a simple RS232, because it has no ground reference. The DTR line must have a negative voltage while the RTS must be positive. The lack of common ground leads to the hypothesis (remember that there is no official document) that these two lines are taken as a reference of logic levels used in communication. It is a system that not only allows the use of serial connections relatively long, but also gives the opportunity to agree devices with different voltage levels on the serial port.
To communicate with La Crosse, the speed of the serial device (in our case, the Arduino module) must be set to 2,400 bps, with blocks of 8 bits, no parity and one stop bit (2400-8-N-1).
The memory map of the weather station, like many other unofficial information on the WS2355 is on the site http://www.lavrsen.dk/foswiki/bin/view/Open2300/WebHome.

 

The hardware

The jumpers on the lines T3IN and R3OUT (respectively RS232/TTL converter output and RS232/TTL converter input) let you choose which lines use for Arduino communication: we give you the opportunity to choose if use the serial hardware TXD and RXD or the two I/O digital D2 and D3 emulating a serial port with the appropriate library that can be downloaded from the website http://arduiniana.org/libraries/newsoftserial.

 

[code]

[/code]


 

 

The sketch

For the connection we uses the serial port pins 2 and 3 of module Arduino for this reason we have used the library NewSoftSerial that lets you emulate a UART using the generic contact I/O such as serial lines.
Periodically, the Arduino microcontroller polls the weather station and stores the data for the date, time, outside temperature, outside humidity, wind speed and direction, rain fell in one hour and 24 hours, the atmospheric pressure and dew point. The constant UPDATE_INTERVAL defines after how many seconds Arduino public the data collected on the site www.wunderground.com.
In order to publish the data of the control unit on this site, as already mentioned, you must have an account, once registered, there is assigned an ID that will be introduced during the connection to the site in order to proceed with publication.
In the sketch for the Arduino you must enter your ID and password, so that the publication will be successful, otherwise our system will point to the site but will not get access.
For the publication of data is sufficient to recall the page http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php,
passing data to the URL. For example, you have to compose a string like this:
http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=KCASANFR5&PASSWORD=XXXXXX&dateutc=2000-01-01+10&winddir=230&windspeedmph=12&windgustmph=12&tempf=70&rainin=0&baromin=29.1&dewptf=68.2&humidity=90&weather=&clouds=&softwaretype=vws%20versionxx&action=updateraw.

As you see, the user ID and password are inserted in the string. The data temperature should be expressed in Fahrenheit degrees and the wind speed must be in mph (miles per hour). The conversion of the data read by the control unit is made directly from the sketch, so as to spare you the burden to proceed with the manual calculation.

The use of the site www.wunderground.com for the publication of meteorological data is free and subject only to the rules of the provider, there are also advanced features, including the addition of photos and images from a webcam filming on location is the weather station and sent through the Internet.

 

 







About Boris Landoni

Boris Landoni is the technical manager of Open-Electronics.org. Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.

18
Leave a Reply

avatar
15 Comment threads
3 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
6 Comment authors
MarthinusBorisLandoniFraschizzatonicolasKim Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Bob
Guest
Bob

Hi, I encounter few problems with your code. I would like to read just the temperature in the first time and it does not work. Are you sure about your “leggi” function because I obtain a string with a length of 1 or 2 max. This is my Arduino code : Thank you for your help void loop() { int incomingByteSer; if (Serial.available() > 0) { incomingByteSer = Serial.read(); Serial.flush(); if (incomingByteSer == ‘a’) { Serial.print(“Get temp “); readws(); } else{Serial.print(“Error “);} } } void readws(){ String temp; temp=getTemp(0); Serial.print(“Temp=”); Serial.println(temp); } String Leggi (int mem[]) { //Serial.print(“Leggi”); String inString;… Read more »

Bob
Guest
Bob

I use a max238CNG and my weather station is a WS2355.
I have a communication (the synchronization works, I received “2”).

Bob
Guest
Bob

I can’t upload the firmware as I see because I don’t have ethernet port. I save data on microSDcard. Normally, with the code in my first comment, it should work.
So I don’t understand where is the problem. The synchronization is ok, but when I want to read the temperature, I obtain a string whith a length of 2 (FF, F0 or FC…).

Bob
Guest
Bob

On your schematic , the pin 24(T3out) is connected to the pin 3 of the subd9 connector and pin 23(R3in) to pin 2 and on your PCB this is the contrary. What is the truth ?

Bob
Guest
Bob

Are you sure ? Because I switched the connections and now I received nothing. My config : 24 => 2 et 23 => 3

Bob
Guest
Bob

and 19 with D3(Tx), 22 with D2(Rx). On your schematic, I do not understand where are Tx and Rx from Arduino ?

Kim
Guest

Hi
I found your project and thing its great.
So would like to connect I to my WS-2355, but have a question.
Would it be possible to use an other Interface Controller than the MAX 238 ?
Because currently I only have MAX 232 Controllers lying around.

nicolas
Guest
nicolas

hello,
thank you very much for your realization, I did the same but the Arduino is connected to my ws2355 by xbee. it works for some hours and more after submission of data on weather underground but arduino read data of ws2355? I do not know of a problem or an idea comes?
with which version you have to compile your arduino sketch? the latter does not support the commands.
I can to make it work with version 0.23
thank you again for your project.

Fraschizzato
Guest
Fraschizzato

Tried that sketch but there is no way to get communication with WS… The only difference between your sketch and mine in SoftwareSerial instead NewSoftSerial due to 1.0.5 IDE… Any Idea about that?

BorisLandoni
Guest
BorisLandoni

WS???

Fraschizzato
Guest
Fraschizzato

WS2355

BorisLandoni
Guest
BorisLandoni

Have to work, but probably somethign changed in the library.

Marthinus
Member
Marthinus

Dear Boris,
What version of Arduino IDE should I use to compile this sketch? . If I use !.8.5 it will not compile it.
Best Regards,
MP