Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

  • Announcements

    sgl_imaging_challenge_banner_widefield.jpg.36065d79cb2625eb299137a5b4432c96.jpg

Gina

Arduino Based Weather Station

Recommended Posts

Gina    8,764

Probably my most ambitious Arduino project is a weather station. I have already have most of a "1-wire" weather station built (from scratch). I was going to add the humidity and atmospheric pressure using 1-wire components but Arduino components are much cheaper and everything Arduino based seems much simpler and better supported than basic 1-wire. A big plus for the Arduino is that it directly supports 1-wire so all my 1-wire stuff will connect directly without modification.

Before I go into the detail, here is a block diagram of how I'm planning to do my latest weather station.

post-13131-0-58222200-1347298555_thumb.p

Share this post


Link to post
Share on other sites
ncjunk    212

looks good, I think this thread will be another good read!

I like those ethernet shields, I have one on my power box arduino and it acts as a web server to display a page to switch the relays on and off.

They are great fun :D

Share this post


Link to post
Share on other sites
JamesF    7,846

I've had an eye on the Arduino 1-wire support, too. It looks quite interesting.

James

Share this post


Link to post
Share on other sites
Gina    8,764

Yes, I think it's all very exciting :)

  • Like 1

Share this post


Link to post
Share on other sites
Gina    8,764

Here's the 1-wire circuit for the wind instruments. The vane direction is read using 4 LEDs and 4 photo-transistors with a Gray encoded plastic disc between (a duff CD with some of the coating scraped off, in fact). This resolves the 360 degrees into 16 directions - compass points.

1-wire_wind_optical.png

Share this post


Link to post
Share on other sites
Gina    8,764

This shows how I used three tracks on the encoding disc to provide 4 data bits.

00-vane-angles-optical-11-02-07-sml.png

And this diagram shows the construction details of the mahneticall damped wind vane and sensor.

1-wire-wind-sensors-11-03-09.png

Share this post


Link to post
Share on other sites
Gina    8,764

That funny word is "magnetically". A rare earth super-magnet and an aluminium saucepan lid provide damping to stop the wind vane from waggling about and give a smoother and more accurate wind direction. The diagram also shows the construction details of the anemometer (made from half ping pong balls and bottle tops).

Share this post


Link to post
Share on other sites
Gina    8,764

Diagram of the sensors at the top of the mast - wind and light sensors.

post-13131-0-25684100-1347397138_thumb.p

Share this post


Link to post
Share on other sites
Gina    8,764

Here's a diagram showing the construction of the anemometer using ping pong balls, bottle tops, wooden dowelling and some 6mm plastic sheet.

post-13131-0-59629400-1347397745_thumb.p

Share this post


Link to post
Share on other sites
Gina    8,764

Add to the description above ... Oh, and a tiny ball bearing, rare-earth magnet and reed switch, and some aluminium tube. Fixed together with hot melt glue. Wonderful stuff (if you can keep it off your fingers!!!)

Share this post


Link to post
Share on other sites
Gina    8,764

I've had a look at the pole head instrument assembly (of my 1-wire weather station) and checked the storm damage. Two of the three buckets on the anemometer need replacing. I have a spare ping pong ball and doweling so no problem. The vane is cracked but I think it'll hang together though a couple of drops of hot glue might help. Shouldn't cause too much turbulence. The central hub section seems fine but can't tell until I get it connected up again.

The Arduino logger shield came as a kit which I've now built it so will be ready to try out a sketch soon.

Share this post


Link to post
Share on other sites
JamesF    7,846

How do you calibrate the anemometer, Gina?

James

Share this post


Link to post
Share on other sites
Gina    8,764

That's avery good point James :D I've copied the Fine Offset (versions sold by many companies including Maplin) commercially made anemometer dimensions and their conversion factor. Calibration depends on many factors including height of anemometer and surrounding obstructions. Standard MET Office figures are for a height of 10m in a clear area of ground (as in the middle of a field). In the domestic environment these perfect conditions are rarely met and a compromise has to be made. This generally results in a lower wind speed reading. By how much is a guess.

Share this post


Link to post
Share on other sites
JamesF    7,846

Middle of a field I can manage. Erecting something 10m high might have the neighbours making complaints though :) Being on the top of a hill I start to get nervous about lightning strikes, too. There are a few trees around here that show the signs of coming off second best after a lightning strike.

Having thought about this a bit more though I have some niggling memory which I can't quite drag out into the open that there is some sort of correction factor you can apply for height above ground. I might have to leave it a few days to see if it comes back to me.

James

Share this post


Link to post
Share on other sites
Gina    8,764

Yes, 10m high isn't practical. You need planning permission to erect a mast of that height if it has guy wires to hold it up. An unguyed mast doesn't as long as it isn't too high - I forget how high ATM. I currently have a 6.5m high unsupported mast carrying my Maplin anemometer and wind vane. The 1-wire one was 5m high supported on the corner of the goat shed with it's bottom end about 2m above ground level. The 6.5m mast will be replaced when I get round to it as it is a slight obstruction to the NE for my scope - though only once have I been imaging in that direction. That was erected long before I built my obsy.

I think I'll give up on the Maplin/FO weather station once I get my new home made station up and running. The FO station is not very reliable and there have been all sorts of interference problems, particularly from a nearby electric fence. I've added all sorts of extra circuits and screening to attempt to reduce this with some success but I still get occasional huge spikes in the temperature data. The wind instruments stop sending data every so often for no reason that I can determine. I've not had any real problems with the radio link from the Tx unit, but then again it's a fairly short distance with line-of-sight propagation path (through a window).

I'm currently planning to use wired comms rather than the radio link used in the FO and other commercial weather stations. That means there are no problems with making everything as low power as possible. However, another Arduino project I have in hand does use radio comms and transmitter in a handheld remote control and that will need minimal power for the battery powered handset. Experience with this project could rub off onto the weather station project and I might be able to produce a "wireless weather station" later on.

Share this post


Link to post
Share on other sites
Gina    8,764

I'm working out some details of the data format and logging interval and such like. The new station will be able to hold far more data than the FO station. The FO logger can hold 4080 entries or lines. With 10m logging interval that represents about a fortnight's worth of data - with 1m interval it's only a couple of days. I can't remember how many bytes it uses per record but it would be something like a hundred or so making the FO data memory around half a megabyte. Now I shall be using gigabytes of data storage in either SD or micro SD cards. The data logger shield takes SD cards and I have 8 and 16GB cards on hand and the Ethernet shield takes micro SD cards. I have 2GB micro SD cards. Even the 2GB card is 8,000 times the FO memory! So my memory will take several years of data :)

Share this post


Link to post
Share on other sites
Gina    8,764

Thoughts so far on the data format (as CSV file - maybe one file per day) :-

  1. Record number (index)
  2. Date/time - yyyy/mm/dd hh:mm:ss
  3. Wind speed - dd.d
  4. Wind Direction - LLL (N ENE NE etc.)
  5. Light Level - ddd
  6. Outside Temperature - dd.d
  7. Outside Humidity - dd
  8. Rainfall - ddd
  9. Atmospheric Pressure - dddd
  10. Inside Temperature - dd.d
  11. Inside Humidity - dd

That is the basic raw data. If I make it FO compatible I may do some data processing to make the data into the same format. Things like wind gust and wind average speed, rain in last period and total rain, atmospheric pressure and pressure trend...

Share this post


Link to post
Share on other sites
Gina    8,764

To reduce the data logging rate I might do some data processing anyway. Many data values change very slowly while some such as wind speed can change quite quickly. I might, for instance, take the wind speed and calculate average and gust values. I might average wind direction to even out what's left of the short-term variations.

Share this post


Link to post
Share on other sites
Gina    8,764

Currently, my weather station software doesn't broadcast the indoor temperature and humidity as to my thinking it isn't of any interest to anyone outside the house. But I may take the temperature and humidity values in the scope room or warm room depending on where I put the unit.

Share this post


Link to post
Share on other sites
JamesF    7,846

Given the time, I would like to set up some sort of brokering system on a central computer with all this sort of data being passed through it such that other applications can say "I'm interested in data of type X" and when a data item of that type arrives it gets passed to that application as well as being stored in a database. The aim eventually being to add bits of automation software that can do different things based on the data that various sensors are collecting or the actions that other applications are taking.

James

Share this post


Link to post
Share on other sites
Gina    8,764

Given the time, I would like to set up some sort of brokering system on a central computer with all this sort of data being passed through it such that other applications can say "I'm interested in data of type X" and when a data item of that type arrives it gets passed to that application as well as being stored in a database. The aim eventually being to add bits of automation software that can do different things based on the data that various sensors are collecting or the actions that other applications are taking.

James

You run Linux don't you James? That's an ideal OS to do what you want :) Edited by Gina

Share this post


Link to post
Share on other sites
JamesF    7,846

I know. And the majority of the work to create a brokering system has already been done. It's just a question of finding time to hang it all together.

James

Share this post


Link to post
Share on other sites
Gina    8,764

Some amendments to the data format :-

  1. Date/time - yyyy-mm-dd hh:mm:ss
  2. Wind speed gust - dd.d
  3. Wind speed average - dd.d
  4. Current Wind Direction - dd (0 - 15)
  5. Predonimant Wind Direction (average over a period) - dd (0 - 15)
  6. Light Level - ddd
  7. Outside Temperature - dd.d
  8. Outside Humidity - dd
  9. Rainfall - ddd
  10. Atmospheric Pressure - dddd
  11. Inside Temperature - dd.d
  12. Inside Humidity - dd

The "Inside" temperature and humidity will be for the obsy, scope room or warm room, as that is where I plan to install the weather station main unit (with Arduino).

Edited by Gina

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×