User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Tue May 08, 2012 8:01 pm

I'm delighted to announce that my 1 wire weather station http://www.daria.co.uk/wx/ is currently running on a Raspberry Pi. Or, at least the data acquisition side of it is … the storage database (mongodb) and web generation remains handled by a mini-itx box.

The 1-wire data network uses a USB interface, which the Pi handles just fine.



The blue blob to the left is the DS9490R USB 1-wire adapter. I appreciate this is cheating and no where near as cool as hacking the GPIO.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Weather Pi

Wed May 09, 2012 9:24 pm

George James Symons would be proud! I"d love to see a picture of your actual weather measuring equipment too... And that little blue 1 wire thing , I"ve never come across such a thing. What is it?

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Weather Pi

Thu May 10, 2012 1:09 am

Nice work! I like your web frontend, what are you using for generating the charts?

Cool.Majkl
Posts: 15
Joined: Thu Aug 18, 2011 9:10 am

Re: Weather Pi

Sun May 13, 2012 6:00 am

That's awesome man ! Would you make some tutorial ? Do you think, that it would be possible to connect those sensors wirelessly ?

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Sun May 13, 2012 6:57 am

To answer the questions:

The blue blob is the USB to 1-wire adapter. It converts the Dallas-Maxim 1 wire protocol that the weather sensors use into a USB interface. There are some (old) images of the actual weather measuring equipment at http://www.daria.co.uk/wx/tech.html.

The charts are generated by ploticus http://ploticus.sourceforge.net/doc/welcome.html. This takes place on the Mini-ITX box.

It is not possible to connect the weather sensors I use wirelessly (the connection technology is '1-wire'; the wire part is not optional). There's more info at http://www.daria.co.uk/wx/tech.html, and I will do a tutorial some time, specifically addressing the RPi part.

Jancis
Posts: 25
Joined: Thu Jan 26, 2012 3:54 pm

Re: Weather Pi

Sun May 13, 2012 7:28 am

could graph generation be done by raspi too? i have nginx running for serving static content on mine and it performs VERY well.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24922
Joined: Sat Jul 30, 2011 7:41 pm

Re: Weather Pi

Sun May 13, 2012 7:58 am

I imagine you could easily use GNUPLOT to generate graphs on the Pi and serve them over a web interface.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

Fede
Posts: 14
Joined: Sun May 13, 2012 5:39 pm
Location: Italy

Re: Weather Pi

Sun May 13, 2012 5:41 pm

great project! I'll wait the Tutorial!
I'm curious, can I extend the lenght of the wire until 60 meters?
Thanks in advance,
Fede

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Weather Pi

Sun May 13, 2012 7:08 pm

Ploticus looks pretty nice. Thanks. Should run on the Pi too if you wanted to.

With some effort you could go wireless by adding a serial->1wire bridge like the DS2480 and a pair of those cheap 433MHz wireless UART modules.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Sun May 13, 2012 7:42 pm

Yes, you probably could <http://www.maxim-ic.com/app-notes/index.mvp/id/148>.

And on the subject of generating the graphs / pages on the RPi, the dependencies for my setup (ruby, gems, ploticus etc) are available in the Arch AUR (and for Debian). Generating my particular web pages is quite CPU intensive (it pulls down and processes 1 days worth of 10 sensors, each read every 2 minutes, so c. 7200 records, some of which then need maths to derive the 'user' value), however, the RPi generates the page and graphs (using ploticus) just fine, in about 25s (compared to 2.5s on the mini-itx box it normally runs on) -- a good performance considering the CPU and I/O disparity. lighttpd or nginx would then serve it just fine.

peterwit
Posts: 5
Joined: Mon May 14, 2012 2:26 am

Re: Weather Pi

Mon May 14, 2012 2:27 am

could you talk more about how you're talking to the 1-wire interface?
I'm looking into using 1-wire with an RPi for my EE senior project and don't really know where to start with it.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Mon May 14, 2012 5:42 pm

There are a number of options, based on existing Linux software, inter alia:
There are others, but these are (imho), the most useful. Both of these use USB or serial interfaces to the one wire network; bit banging the GPIO would be significantly more difficult, but somewhat more impressive. USB and serial adaptors are available from a number of vendors, such as HobbyBoards http://www.hobby-boards.com/ or HomeChip http://www.homechip.com.

peterwit
Posts: 5
Joined: Mon May 14, 2012 2:26 am

Re: Weather Pi

Mon May 14, 2012 7:29 pm

thanks for the info. Does your package have the ability to write to devices?
In particular i'm looking at the DS2408 to control a set of relays.
Alternatively do you have any experience with OWFS?
http://owfs.org/index.php?page=owfs

Fede
Posts: 14
Joined: Sun May 13, 2012 5:39 pm
Location: Italy

Re: Weather Pi

Tue May 15, 2012 1:31 pm

Hi,
the hobby-boards anemometer uses an anemometer board with this features:
- DS2423 counter for wind speed or general counting purposes.
- DS2438 A/D for wind direction or general A/D purposes.
I saw that the first one w1retap can support it, but no info regarding the second one?
It's still supported or not?
Thanks for the replies..

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Tue May 15, 2012 4:56 pm

peterwit wrote:thanks for the info. Does your package have the ability to write to devices?
In particular i'm looking at the DS2408 to control a set of relays.
Alternatively do you have any experience with OWFS?
http://owfs.org/index.php?page=owfs
I have used OWFS, at the time it didn't have all the features I needed, so I wrote w1retap. For many project it's good solution, particularly if you're writing to devices, rather than just logging.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: Weather Pi

Tue May 15, 2012 4:59 pm

Fede wrote:Hi,
the hobby-boards anemometer uses an anemometer board with this features:
- DS2423 counter for wind speed or general counting purposes.
- DS2438 A/D for wind direction or general A/D purposes.
I saw that the first one w1retap can support it, but no info regarding the second one?
It's still supported or not?
Thanks for the replies..
Currently, w1retap only supports the old wind sensor, not the new hobby boards device (oww supports both). If an owner of the HB wind indicator would like it supported (and is prepared to support remote debugging), then I'll add it. That's how many of the sensors get added, I don't own all of them.

Fede
Posts: 14
Joined: Sun May 13, 2012 5:39 pm
Location: Italy

Re: Weather Pi

Fri May 18, 2012 9:08 am

Thank's for the reply.
What about this: viewtopic.php?f=9&t=2812? :?:
What is the minimum interval that can i set with oww/owfs? For example, can i set 1 second interval for the anemometer and 30 sec for the rest of the sensors?

nr
Posts: 11
Joined: Wed Jan 11, 2012 10:04 am

Re: Weather Pi

Tue May 22, 2012 11:01 am

I have something very similar - a couple of DS18B20 sensors, and a DS2490 1-wire to USB bridge. The output is run through GD with a bit of perl to produce a graph of the temperature inside, and outside my shed:

http://www.ronketti.org.uk/temp.html

I'm also using net::twitter::lite to generate a tweet whenever I have a cup of tea. There's no good reason at all for this. Which is quite probably why I did it.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Weather Pi

Tue May 22, 2012 10:43 pm

Weather stuff is fun! I spent the weekend building a weather station - on an arduino, so not that relevant here, however it will be talking to a Pi to upload the data to a remote database in the fullness of time - however I did have a play with the SHT15 temperature sensor directly connected to my Pi:

Image

The LEDs are showing the temperature in binary...

The program is written in BASIC using my wirinngPi library and bit-bangs the data to & from the sensor (it's not quite I2C compatable)

http://unicorn.drogon.net/rtb/sht15.rtb

Gordon
--
Gordons projects: https://projects.drogon.net/

_John
Posts: 8
Joined: Wed May 23, 2012 4:15 pm

Re: Weather Pi

Wed May 23, 2012 4:48 pm

Hi,
as a complete NEWB to this area but as a thing I wanted to try and use the Pi for I would be really greatful if you guys could give me some general pointers where to read on things like this.

(warning the following is probably still in dreamland for me)
but in the longer run it would be great being able to run a Pi off a Solar charger and wirelessly transmitted and served up.

Admittedly that is in the very very long run, it would be great to get started with this kind of thing :D

Return to “Automation, sensing and robotics”