Go Down

Topic: 1-Wire Weather Station (Read 6815 times) previous topic - next topic


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



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!



Cool... really!

You may wish to consider adding your code to my recently introduced MRMP.

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.


Feb 22, 2009, 09:35 pm Last Edit: Feb 22, 2009, 09:42 pm by pz2b3r Reason: 1
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: [Select]

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  8-)
I have an arduino board and one of these stations... so I guess its time to get it all working together  ;)

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

As for projects for your 'dub... erm mobile weather station?  ;)


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


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


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.



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


Mar 24, 2009, 01:53 pm Last Edit: Mar 24, 2009, 01:53 pm by Easty Reason: 1
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!


Go Up