Pages: [1] 2   Go Down
Author Topic: 1-Wire Weather Station  (Read 3463 times)
0 Members and 1 Guest are viewing this topic.
Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :smiley 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.


Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice bus...

and some clean code.
Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 83
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
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.
« Last Edit: February 22, 2009, 03:42:07 pm by pz2b3r » Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Howdo, i stumbled on this thanks to google  8-)
I have an arduino board and one of these stations... so I guess its time to get it all working together  smiley-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  smiley


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


Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!   :smiley

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: March 24, 2009, 07:53:58 am by Easty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Bagshot, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1] 2   Go Up
Jump to: