Raspberry Pi - Internet weather station and webcam for under £150

The Raspberry Pi has become viral within the hobbyist electronics community. Many enthusiasts try to incorporate the Pi into any idea they can think of- weather its completely overkill or utterly underpowered.. we are pushing the boundaries of this wonderful device.

Here is my attempt to create an Internet enabled weather station with webcam feed for under £150
Raspberry Pi Server Essentials Book
Buy Raspberry Pi Server Essentials.
Contains some information
about this article.

Does £150 sound like too much for you? Then go and search a bit on the internet for similar devices. Do not close this page because i know you will back, curious with one question on your mind.. "How the hell?"

What I will be using.

  • £29.95 - Raspberry PI Model B (From Farnell)
  • £63.69 -  Sparkfun's weather meters 
  • £28.00 - Wyolums alamode (This really makes life easier!)
  • ~£35.00 - Cables, Chargers, SD Card, WiFi dongle, Paint, Sensors  and other DIY stuff. (or just things lying around that can be reused)

I chose sparkfun's weather meter because they are the cheapest complete set, wind direction, wind speed and rainfall meter, on a pole with a nice junction box.. for cheaper than anything else i could find. There is one problem with it though- The galvanised pole that it comes with rusts very easily because of ultra cheap Chinese production. So I will use black weather proofing paint to stop this. If you got access to rubberising paint that will be even better :-) Another unknown is the maximum speed the wind cups can handle. Lets hope its can handle up to 100mph  maximum.

The goal

  • I just want 1 Single wire (2 core/3 core) going into my weather station (220/110vac) or (5 volt - 1 amp - Nothing else.
  • I want to access it from the internet via my ADSL connection (using dyndns if no static ip) as  a server up php page with everything on.
  • Also I want a simple service that will return JSON results so it can be easily embedded into any modern day Web Application.
  • I want a simple serial TTL interface that outputs live data - because raspberry has a serial port so inherently i want to use it. It is a great way to connect a 433/MHz transmitter and receive the data within home automation services (build on Arduino for example ;) ) It also enables 3G/GPRS communication for remote areas.
  • The Raspberry Pi will soon have HD Cams available to be plugged in and stream H264 video - fantastic for HTML5 Applications!
  • Possibly have a microphone (as the Pi also supports audio.. who know who might need it, right!)
  • Possibly support HDMI video output.
  • Why 2 temp sensors? Think shade(ambient) and direct sunlight (good for Africa)

The challenges

Raspberry Pi has a fairly powerful 700MHz processor but the greatest thing is its GPU capability for OPenGL:ES 2 (But we won't use that here). The biggest challenge is going to decide which OS to use. First thing comes into mind is Rasbian (Debian) - Install LighttpD, PHP on to it and we have a nice web server. Problem is that I am not sure if using a webcam we need to be in X- or if there will be a raw stream we can access(7/11/2012 Yes we will be able to use a library to pipe raw h264 data with specific encoder settings using the onchip encoders! Yay)  because the BCM directly supports H264 encoding it means the CPU will not be affected which is fantastic.

It seems like a shame to waste the GPU power and just around the corner is a Android 4.0 Port for RaspberryPi - which supports fantastic graphics.. but you need to use DVI out. The problem is that the Pi is going to live in the Sky -- nearby the sensors- is there justification to use this? I am not sure.

I need to learn Python...

The Pro's

I already tried to use Arduino for something like this- but it lacks the ability to support full websupport. like a web server  php - because its only 8/16mhz so give it a break. Also- I cannot just use a USB wireless dongle and connect to my B/G/N network in a PnP fashion using an Arduino   The face that I can use a "full" debian system out of the box is fantastic. And I am still missing the webcam- Forget about that on an arduino.. even netduino can struggle with all that.

So yes- The Raspberry Pi is a small computer that runs of less than 5 Watts and directly supports inputs and outputs like an Arduino- all nicely packaged.

I will link to my next posts here.  I have 2 Raspberry Pi's, the sensors other stuff. Just ordred the weather sensors from SparkFun USA.. a few days time should have something interesting.


Thomas Qvist said…
This comment has been removed by the author.
Piotr Kula said…
This comment has been removed by the author.
Anonymous said…
Sounds interesting, I have searched a bit similar solution.
Have you been able to study this any further?
I do have a remote summer cottage, which I would like to monitor ( weather, webcam, etc.) and the raspberry could offer a way to collect some of that data.
Piotr Kula said…
Yes - You can click on Part2 Link and I go over some other options on how to connect things. The only thing missing is the Raspberry compatible HD camera module. Then you can connect a USB hard drive and save days of recordings to it and download or play it back with an HTML5 h264 compatible browser very easily. I have not got it fully running yet but hopefully soon.
Anonymous said…
Hi, can you please explain how you connect the weather meter with the raspberry pi?
Thanks a lot.
Piotr Kula said…
Yes I will make a new blog post soon. I am waiting for Raspberry Camera to arrive and then I will connect it all and make it work.