1-Wire Weather Station

Hi everyone,

I wanted to share a work in progress with you that I've cobbled together from a lot of great resources here and a few from out on the internet.

I couple of Christmases ago I received a 1-Wire Weather Station(http://www.aagelectronica.com/aag/index.html?target=p_1.html&lang=en-us) which I was going to connect to my PC and record the various conditions.

For numerous reasons this didn't really happen ::slight_smile: for a start I didn't want the PC on 24 hours a day!

Anyway, having read some forum posts here of people using the 1-Wire temperature sensors I thought I'd give the code a go to read the various chips in the weather station...

...and here it is: http://www.paulandkate.f2s.com/wordpress/wp-content/uploads/2009/01/_1wireweatherstation.pde

I'm fairly happy with it as is stands, there's some scruffy code in there where I've bodged things to work but I've learned a lot about the system and what I can do!

Things I'd like to do:

  • Put it back up on the roof where it belongs instead of on the desk!!!
  • Log the values into arrays and work out averages.
  • Add a "North offset" to allow the unit to be positioned away from North.
  • Connect a display instead of using the serial output.
  • Maybe log values to download to the PC intermittently?
  • Buy and connect a pressure sensor.

Thanks, Easty.

Nice bus...

and some clean code.

Thanks!

I'm still playing with ideas for a project involving the bus!

A quick update on the weather station:
I scrabbled up onto a very well and slippery roof this afternoon to put the unit back up there.

It's now happily sending info to my PC for me to crunch tomorrow (gales expected this evening) and then I can start playing with displays.

If anyone's interested I connected the unit to the Arduino using the CAT5 I'd run last year, which must be about 10 metres. When I ran my sketch I just got a load of rubbish information. Eventually I dropped the value of the pull-up on the DQ line to 2k2 and everything started behaving!

Easty.

Cool... really!

You may wish to consider adding your code to my recently introduced MRMP.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232140631

In that way, you could easily add your code to my MRMP for debug and remote monitoring. The MRMP is rock solid and easy to learn.

Hope MRMP helps!

Thanks George, I'll take a look and see what I can do.

Hi,
thanks, great job.
This moved me to reassemble the long abandoned weather station and put it back work.

After some try and fail I managed to get it connected to the arduino (you have to remove the jumper that comes in the rj11 socket if you had it in parasitic mode before).

Wind speed gave me some trouble, I was getting 0 mps all the time, until I realized that one of the lines in the code should be moved above the previous one:

 case 0x1d://  DS2423  4k ram with counter
    WindCounter2 = GetWindCount();        //Get the current counter value
    timeDifference = millis() - time;     //Work out the time since the last count
    time = millis();                      //Reset the time count
    RevsPerSecx100 = CalcRevolutionsPerSecondx100(WindCounter1, WindCounter2, timeDifference);
    WindCounter1 = GetWindCount();        //Take the counter to compare next time

The last line in the code snipet was originally befofe the call to RevsPerSecx100, so WindCounter1 and WindCounter 2 were the same value.

My next task is to adapt the code to read a couple more temp. sensors.
Again, thanks for the excelent work.

Well spotted hombreman!

I'm glad the code (although it was wrong!) was of use to someone else.

Let me know how you get on with the extra sensors, I parked the project recently whilst I wait for additional funds!

Next will be adding temperature sensors and then writing the results to an SD card...

Howdo, i stumbled on this thanks to google :sunglasses:
I have an arduino board and one of these stations... so I guess its time to get it all working together :wink:

I'm wondering what software yu have running on your pc to display the reading?
Also how is the station linked to the board? is it via the network sheild or are there wire links direct to it?

Cheers for any info you can shed on the subject :slight_smile:

As for projects for your 'dub... erm mobile weather station? :wink:

I started just using the serial connection to display the output of the weather station then attached it to one of these:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225239439

Which looked quite nice.

It's all in bits again at the moment though so no more development so far!

Sorry forgot the other question, I had the cable from the weather station stuck into the headers on the Arduino! Not perfect but good enough before I build it it's own shield with an RJ11 socket.

Sorry no really good pictures, mine is a bit of a mess, I have CAT5 running down to an old modem cable I had lying around which is connected to a female to female converter and then another old modem cable. Not particularly standard! ::slight_smile:

http://davidbray.org/onewire/modular.html

The above is a link to an explanation of the RJ11 colour codes and why it can get a little confusing.

I've actually connected Red (pin 2) to 0V and Green (pin 3) for data.

Hope that helps.

Easty.

Do you have a picture of your rj11 shield?
Just thinking I might make one up as i don't fance putting the wires in the other way ;D

I'm thinking i might follow you lead on make up a disply for the read out, did yours use a lot of power? My (crazy) idea is to try and power the whole lot from solar charge batterys and have a infomation display in my van. Possably a small LCD read out or with leds indicating direction/streanth (if that makes sense!)

I won't promise it won't blow up but I've wired my 1-wire bus up the wrong way round loads of times and nothing's gone bang...yet!

I'm not sure about the power required for the display I used, I was also thinking about an LCD but I turned my attention to barometers instead and I was going to worry about displays after that.

Edit: Forgot to say I haven't built the RJ11 shield yet!

thanks, now I can use my old AAG again. just started with Arduino a few days ago. have to learn again and like to connect more ds18s20 sensors,a leaf wet sensor, etc, etc.
can you also connect a analog lm35 and the AAG? Or an old Davis rain bucket with a reed relais?

doornenburgweer, Let us know how you get on, I'm not sure about connecting your other bits and pieces but I'm sure the answers on this forum somewhere!

Eatsy.

just got a micro sd card module (libelium) but need to find out how I can get the data on this card. I use a Arduino mega. do not ask me why a mega. will work on it.

and when see your script I see an inside temperature and a outside temperature,but (sofar I know) the aag has only one temperature sensor.

Sorry doornenburgweer, I do have another temp sensor wired in, it's just connected to the 1-wire bus in the same way as the weather station.

I was trying to connect more but hit issues, I know someone on here found a resolution by altering the 1-wire library (sorry no time to dig the link out for you now...)

Not sure about your rain bucket but you should be albe to find out more about the LM35 on the forum (it's not something I've used though!)

I moved on to other projects so my weather station is just up on the roof spinning away with nothing connected...

Easty.

Hi All,

I have a AAG 1-wire weather station with an additional temperature sensor and an additional count sensor for my home made rain gauge. I am hoping to hook it all to my Arduino, LCD display and send the data on to my computer for logging on the internet. I will keep you posted on my progress.

Has anyone had any luck just using the serial interface module connected to the Arduino? I have one of those and a MAX232 chip as well.

Matt