Showing posts with label ldr. Show all posts
Showing posts with label ldr. Show all posts

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...)

Sunday, September 20, 2009

Weather station

Finally, I decided to progress in the weather station front! mainly due to having received my JeeLink, and having successfully gotten it to work with the JeeNode!

So, the plan was to get a wind speed and amount of light measurement so that I could automate the sunscreens at my place. Of course, I didn't want to buy a commercial weather station, because the ones that do interface with the PC are expensive and you do not have much control, not to talk about Linux, which they probably won't support. So i had decided to take it in my own hands and build it myself!

Some time ago I got a light meter to work, and temperature I had already mastered, so all I needed was wind speed, and maybe direction, and a way to send data around, which was solve by the JeeStuff!

I have built the anemometer before the holidays, but did not have the opportunity to blog about it, so here goes a picture:



It was just a check of whether it moved in the wind, and if you look carefully you can even notice that it is rotating!

And today I bought a weather proof electrical box, and started the process.

First, the JeeNode did not fit inside, by an estimate 0.5 millimeters, so i had to get the dremel tool out and get a some of it sanded into dust, in order to fit.



Then I devised a transparent lid for the light sensor, which I will show you in a future post, when I get a decent picture of it. I did it by warming up some rigid package plastic and forcing it into the hole with a rounded end of a spoon. Then I cut it and inserted it, screwed it and it looks great! (in my opinion!)

I also made some sort of plugs/shield, but I am not yet 100% sure of how it should be.

I did decided to change all the electronics for the sensors to work with 3.3V.

The initial plan was to run it from 5V, but since the JeeNode has a 3.3 LDO regulator, it would be a waste of energy to have say 6V, converted to 5V for the sensors, converted to 3.3V for the jeeNode. And since soon this will all run from a battery and solar panel, the less power the better!

So tomorrow (or today, since it is pretty late) I'll have to redo the detection of rotations for the annemometer, and install the whole thing temporarily to see if all is functional!

I still have to figure out the temperature measurement, but I'll probably end up going with one of those temperature/relative humidity digital combined sensors, instead of the good old LM35.

Saturday, May 30, 2009

Daylight measurements

The next project, now that the door bell growls in the mac and the power orb is orbing like mad, is to make a small weather station, with a wind speed meter and a daylight meter in order to control the sun shade in the kitchen.

In the late afternoon the kitchen gets a lot of direct sun, and while that is a good thing in the winter months, it is not as nice in the summer, as it makes it very hot and the refrigerator has to work overtime.

I have an electric sun shade, of the extending type, which is connected to an ELV device making it controllable from the server. However, I cannot lower it automatically, since if it is raining or windy or simply cloudy, it is not a very wise thing to do. I do raise it automatically every day at 20:30, which should cover it most of the year, and in case I need to go out of the house and don't come back till late while the shades are off.

So I started the weather station by getting an LDR and connecting it to the arduino. Using the standalone temperature logger I made a few months back I could leave the arduino in the kitchen the whole day logging the amount of light.


The results are great I think! with the steep rise around 14:00 which is when the sun comes around the bend, and a clear difference between the times when the sun shines and when it doesn't. I think a threshold at around 800 will do the trick.
Furthermore I am quite happy with the excursion of the sensor, going from 0 to 916 at least, which is a 89% coverage of the 5V conversion range!
Now, off to the wind speed! Already spent the night disassembling an old VCR, and got some promising parts out of there!

One more note. I thought a lot about how to make a rain sensor. Not necessarily measuring it, but just to detect if it is raining or not, but concluded that if it is rainy, the sky will be overcast, so it won't be necessary to lower the shades!