Going beyond the starter kit - weather, sensors, cloud db, web host....

Hi,

My wife bought me the starter kit for my birthday and I've got the bug. So much so, I think I've bitten off more than I can chew but I'm going to enjoy the ride. I'm very new to this but I enjoyed the starter kit projects and have decided to pull together an online weather station - but at the same time I'm going to blog (or rather I've already started to blog) about my progress. My site is called homegeekery and you can find it at hmgkry.net.

My ultimate aim is to have a bunch of weather related sensors, being polled from the arduino, which reports the data back to a cloud hosted DB server which is then presented via a cloud hosted web host. My skills are very much more at the web end, I don't see too much trouble putting the end infrastructure together (the db & web) but I'm very much a newb with arduino, electronics and so on. (and I'm sure most on this forum should be able to put this together in an afternoon! :slight_smile: )

Also on my blog I'm going to post about related topics that interest me; home media,; chromecast; xbmc; pi and so on.

My next challenge is understanding wire and how to draw data from sensors.....

Would be most grateful for you feedback! Will also keep this post up to date as I move forward.

Cheers

Chris (homegeek) | www.hmgkry.net

http://smartcitizen.me/ Check this out

You can't go wrong with Adafruit, and if you have other sensors, just ask on the forum.

Nice website, I see you do a lot more than just the Arduino :stuck_out_tongue:

I have one serious question (and you would not expect this one): What kind of the solder iron are you using ?

I2C is a protocol using 2 wires and GND. There is one master (the Arduino) and many slaves (the sensors). During communication, both the master and the slave act on the bus. For example, a slow slave can stretch a pulse to slow the master down while the master is transmitting data. Since there is only one master, the master decides to which device it wants to talk to. It is not possible that more than one slave is active at the same time.
Do you know about the pullup resistors for I2C ? and about the trouble with combining a 3.3V and a 5V I2C-bus ?

omersiar:
http://smartcitizen.me/ Check this out

Thanks Omesiar - will do :slight_smile:

Peter_n:
You can't go wrong with Adafruit, and if you have other sensors, just ask on the forum.

Nice website, I see you do a lot more than just the Arduino :stuck_out_tongue:

I have one serious question (and you would not expect this one): What kind of the solder iron are you using ?

I2C is a protocol using 2 wires and GND. There is one master (the Arduino) and many slaves (the sensors). During communication, both the master and the slave act on the bus. For example, a slow slave can stretch a pulse to slow the master down while the master is transmitting data. Since there is only one master, the master decides to which device it wants to talk to. It is not possible that more than one slave is active at the same time.
Do you know about the pullup resistors for I2C ? and about the trouble with combining a 3.3V and a 5V I2C-bus ?

Thanks Peter - appreciate the kind words - you've already got me stumped on the questions. The one I can easily answer is the soldering iron - I've just got a basic one from Maplin. I think my mistake was to not get it heated up enough first time round.

The questions you are on I2C are exposing exactly why I need to learn more.... :astonished: I am enjoying the process of learning and exploring though. (This is exactly why I cover a few additional topics on my blog - as I work during the week I don't have enough to learn or work on arduino or my weather station to justify any reasonable posts so I decided to include other topics that interested me!).

Please use a temperature controlled solder iron with a long life tip, your components will appreciate it.
I use only lead-free solder since a few years with a good resin/rosin/flux core, even though it doesn't look very smooth.

I'm pleased to report I've made a bit more progress! I've successfully connected up to a MCP9808 temperature sensor, a BMP180 pressure sensor and a rain water sensor I feel quite proud of myself as an arduino noobie :slight_smile: As ever adafruit proving to be a really good source and inspiration, I've also discovered Sparkfun as well.

There are a couple more articles on my blog about it in the weather station category http://hmgkry.net/category/weather-station/ and if anyone find's it useful I've put the sketch for the rain water sensor below. I've attached a picture of the rain water sensor in action.

Further research has shown me that there are lots of services out that that could help me host and present the data in a web page, I've decided not to use one as I plan to use an AWS hosted mysql DB and web site. I think I might be a bit of a glutton for punishment as I've not done any of these things before (on my own).

/*  
gk@hmgkry.net  31st Aug 2014

How to connect and use a rain water sensor with an LM393 board

Two LEDS, wired to pins specified in wetpin and drypin
I used red for wetpin, green for drypin, don't forget a 220 ohm resistor between the LEDs and ground

inputpin coneccts D0 on the LM393 board
analogvalue connects to A0 on the LM393

Also connect VCC to 5v and GND to GND

Accompanying article at http://wp.me/p4T4KI-3h

*/


int switchstate = 0;

int inputpin = 0;    //set these to match how you're conected up the breadboard, this is the digital input
int wetpin = 5;    // led for wet
int drypin = 6;    // led for dry

int analogpin = 5;    // analog input pin
int analogvalue = 0;    //voltage


void setup () {

  pinMode(inputpin,INPUT);   //set ins and outs
  pinMode(wetpin,OUTPUT);
  pinMode(drypin,OUTPUT);
  
  Serial.begin(9600);
  Serial.println("Start up...");  //up and away!
    
}


void loop () {
  switchstate = digitalRead(inputpin);   //get the values we need
  analogvalue = analogRead(analogpin);
  
  if (switchstate == LOW){     //it's wet
      digitalWrite(drypin,HIGH);
      digitalWrite(wetpin,LOW); 
      
      Serial.print("Wet     ");   //show it in the serial monitor
      Serial.println(analogvalue);
      
  } else                       //it must be dry if it's not wet
  {
      digitalWrite(drypin,LOW);
      digitalWrite(wetpin,HIGH);
      
      Serial.print("Dry     ");   //show it in the serial monitor
      Serial.println(analogvalue);
  }
  
  delay(250);  // 1/4 sec pause
  
}

It's been a good week for weather station projects - and I2C sensors! Is it just me or does everyone make a weather station as their first arduino project?

I had a revelation about wire/i2c this week. It's actually a lot simpler that I had first thought. My big worry was working with multiple wire sensors (of different types), and it's a breeze - although I suspect most of the folks reading this may have already known that!

I've updated my blog with the full article http://hmgkry.net/category/weather-station/ but I've now got temperature, humidity, pressure, luminance and moisture covered. When I get closer to a final build I need to add wind speed and rain over time. (DHT22, MCP9808, BHI750 and BMP180 in use now).

I've decided that I'm going to output the data to some servo controlled analogue dials. A separate arduino installation will pull the data from the web and display on the dials. So, I'm off to play with servos. I can do the slightly duller web upload bit later...!

All the best fellow arduino tinkerers!

And now with my first ever youtube video of my servo analogue indicator showing luminance! www.hmgkry.net

It's still surprising me how easy of this arduino malarky really is! I wish I'd discovered this before.

Next job on my weather station project is to upload the data to a cloud host, store it in a db, graph it. Following that, I need work up some sort of weather proofed version of the sensor platform.

Will keep this thread up-to-date.