Tuesday, January 5, 2010

Weather station

The Weather Station is finally complete! That is at least the beta stage!
(the beginning of the development was a long time ago)
Here is a picture of it standing outside:

It has been there for a few weeks now, since the 13th of December, enduring the snow and ice that this winter has brought us, sending a packet every 10 minutes.

The station is based on a JeeNode, with a LDR to sense the daylight, an SHT11 to sense temperature and humidity, and a home made anemometer to sense the wind speed. Here are some photos:

Complete setup, fits nicely inside an electrical box fit for the outside.

Details of the main box. The JeeNode is visible on the left. I had to take about half a millimeter from it in order to fit inside the box. I painted pin 1 of each port with tippex and put a dot in each of the ports to know which one is which as I kept having to refer to the datasheet. The whole thing is powered by 3 AA Alkaline batteries. The wholes that lead to a sensor are covered with corks to prevent water from coming into the brain of the station..

Detail of the light sensor: an LDR. The window I made by warming up a package of hard(ish) plastic and pushing it into the whole using a small spoon. All the electronics for each of the sensors are near the sensor itself, and only 3 cables leave the sensors: Vcc, Gnd and signal (except for the SHT11).

Detail of the SHT11. This one is floating, protected inside a little cheese box, painted white using tippex (I was too lazy to use proper paint...and it was cold outside to use it anyway...and the tippex was right in front of me...and I don't use tippex for anything...)

Detail of the anemometer. I used the center of a CD spindle, attached 3 half's of ping-pong balls, and improvised a bearing from a VHS recorder roller. It fitted nicely in some electrical tube. The sensor is a optical emitter/receiver in the same package. It has not been calibrated, as I only need an indication of the amount of wind, in order to automatically lift the sun screens.

The nice thing is that I initially built the sensors to work with 5V, as I always used arduinos, then the JeeNode uses 3.3V, so I thought I had to adapt some things...not for the light sensor, as it is a basic divider, but for the optocoupler. But I tried it, and it worked fine even at 3.3V!

I spent a lot of time fighting with low power modes of the JeeNode, and finally got it to some sort of power down...which I believe will allow it to work for a few months from the batteries...lets see...I will try to make a post about that soon, as it is also of interest for the JeeLabs community.

So far it has sent 3271 packets. Here are the latest ones:

3267 1 0 0.5 87.4 @ Tue Jan 5 21:26:58 2010
3268 1 0 0.5 87.2 @ Tue Jan 5 21:37:17 2010
3269 1 0 0.5 87.3 @ Tue Jan 5 21:47:37 2010
3270 1 0 0.4 87.6 @ Tue Jan 5 21:57:57 2010
3271 1 0 0.3 87.6 @ Tue Jan 5 22:08:17 2010

The sequence of numbers corresponds to: sequence number, light level, wind level, temperature in Celcius and relative humidity in %.

I have now to put the JeeLink receiver in the server to be able to put all data into a database and use it for something useful!

(2 posts in a day! great! it must be the cold outside...)


David said...

How far is the JeeNode from the receiver? Do you know if there will be any reception problems when it is snowing/raining?

Alex said...

Hi! The JeeNode is about 10 meters from the receiver, with quite a few cement walls in between. I didn't have reception problems, but sometimes a packet or 2 gets lost - I don't have any acknowledge protocol, it is all "fire and forget" - but not much rain/snow gets in the line between the sender and the receiver, although the other day it was almost buried in snow, and it kept sending.

Richard said...

Congratulations Alex a great looking piece of innovation. I've been working on a similar approach for a different application. I'm a sailer and have modified ( read gutted ) a lacrosse weather station to make a wind direction and speed instrument for my sailboat. Same basic idea ... use a jeenode to collect and transmit data. I hope to pass the data to the "processing" application to generate some graphical gauges on the computer screen. Ok enough about me. I've questions regarding the anemometer. Did you have the sensor counting rotations generate an interrupt? Did you average the count values and if so by how much. Any chance you would be willing to share your code??



Richard said...

Hi again Alex,

Found your code on the Jee Labs Wiki. I was able to quickly borrow ( read hack ) your approach to the anemometer and had things working in about an hour. I've no problem with power being available for its operation so I'm not concerned with the complications of putting things to sleep. Makes life a lot simpler.

I am indebted to you and others who have made the world of "physical computing" so accessible to all.

Kind Regards


Alex said...

Hi Richard!

thanks for the nice words! feel free to use all you can, and to ask if you have any questions.
I didn't manage to use interrupts to count the revolutions of the wind sensors, as the millis() gets confused when interrupts are used. That was my first intention also.
As for averaging, I once wrote a averaging routine for averaging temperature readings on an arduino. If you want it I can send it to you - maybe it is available in the post about the temperature logger somewhere else in the blog...
Have fun!


Richard said...

Hi Alex,

Very kind of you to offer. I'm going to try adapting the "smoothing" code from the Arduino hacking section and see if it will do the job. If not, I may bother you again.

I'm so impressed with the Arduino/JeeNode community. People are so helpful. Kinda reminds you that mankind really has progressed.

Again, Thank You.

Kind Regards


Bob Basant said...

Hi, Alex what is your contact email adres?