3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Wireless outdoor Arduino weather station with PC logging and Graphs

Wireless outdoor Arduino weather station with PC logging and Graphs
I wanted to have a log of outdoor weather with PC logging and graphs for quire some time now. There are such devices in the market but their cost is really high. So, decided to build one by myself and enjoy the experience too.

Features
  • Temperature, Humidity and barometric pressure measurement
  • No external power for outdoor sensors required (solar powered)
  • Wireless communication between outdoor sensor and PC
  • Full logging and reporting on weather information on PC
  • Relatively inexpensive and easy to build

Components of the solution
  • Arduino compatible Seedstudio Stalker board for remote sensors.
  • XBee based communication between outdoor sensor and PC
  • Solar panel and LiPo battery for outdoor sensor power
  • XBee Explorer connected to PC for communication reception
  • C# based PC application to store, report and graph all data

What will you need to build this?
  1. Seeduino Stalker v2 ($39). If you chose v2.1 there will be some code modifications required.
  2. Solar panel for powering the outdoor sensor ($ 2.00)
  3. A LiPo battery of 1000mAH or 2000mAh ($7.5 - $12)
  4. DHT22 Humidity sensor ($ 9.95)
  5. BMP085 Barometric pressure sensor ($19.95)
  6. A 10K Resistor
  7. 2x Xbee series 2 modules (2x $25.95)
  8. XBee Explorer ($ 24.95)
  9. Jumper wires
  10. USB Cable to connect PC to XBee Explorer
  11. Optional small bread-board to hook up the two sensors above. Choose either a solder-less one or something like this that does require soldering or any other alternative you think is suitable for you.
You will need UartBee board to program the Seedstudio Stalker. Optionally you will also need an FTDI board, 3.3V to see debug information from the stalker board. If you are in the business or hobby of building stuff, you should probably have one in the house. These module are not required after the assembly is done.

Notes about the components:
Battery: I built the outdoor sensor unit with 2000mAh battery, however by monitoring the device for few months now, including winter I can tell you this is really an overkill as the battery does not get drained or even close to that. I have every reason to believe a 1000mAh or even less will be enough.
Price: For almost any of the components above, I recommend spending some time online, including eBay to find a much better price for each. My experience in the last 6months is that you can find things on eBay for fraction of the cost compared to the amateurs sites.
Board: I used the Seedstudio Stalker for remote sensor controller, however one can really build it with many other Arduino compatible boards. The reason I chose this one is because it has both XBee module socket, on-board real-time-clock (RTC), ready for LiPo battery power and charger, which are all great features that are required here. I did take advantage of the RTC for waking up the board periodically.
XBee: I used the 2mW Series 2 ZigBee modules while in fact for this application without future enhancements that I consider, one can use Series I modules and perhaps the 1mW versions. Since I plan future enhancements I used the Series 2 modules. As for transmitting power, the 2mW will be my recommendation. My house is built of concrete and the distance between outdoor sensor station and PC is not too long, still if I take it 5 meters further, the reception becomes very poor.
DHT22: You can choose to use DHT11 instead of the DHT22

Other Tools you will need:
  1. Arduino IDE. I use the version 0022. Porting the code and libraries to newer IDE version should not be too difficult but pointless as far as I am concern. 
  2. X-CTU tool for configuring the XBee modules
  3. I use the following libraries: TMP102 (Stalker on-board temperature sensor), R8025 (Stalker on-board RTC), BMP085 (barometric pressure sensor), DHT (for DHT22 humidity sensor), NewSoftwareSerial (for debugging console), Xbee-arduino (for wireless communication). All these libraries are included in the code ZIP file here, however if you decide to port or modify things here, I thought is important to mention this list. Specifically when porting to newer IDE note the name of NewSoftwareSerial was changed, and you need to use #include instead of #include (back-compat of the IDE was not high on the list I guess :-))
  4. Soldering Iron

Disclaimer:
This is a hobby build and not a product. I did not include any languages support other than English. I use only Celsius temperatures (you can modify code to use Fahrenheit if you want), there is no data archiving and grooming support and more similar stuff that makes something a product rather than a hobby build.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Assembly Instructions

Assembly Instructions
To Assemble the remote weather station you will go through the following step, and will elaborate on each below:
  1. Connect all the sensors to the Stalker/Arduino board
  2. Make minor modification to the Stalker
  3. Configure the XBee modules
  4. Load program onto the Stalker
  5. Run program on the PC
Connecting the sensors:
DHT22 connected to digital pin 2.
DHT22 Pin 1 to 3.3 Volt of Arduino
DHT22 Pin 4 to GND of Arduino
DHT22 Pin 2 to digital pin 2 of Arduino
10KOhm resistor between pin 1 (Vcc) to pin 2 (data) of the sensor
DHT22 Pin 3 is left not connected.
Consider using small bread-board for this small circuit
Console for debugging (optional) on digital pins 3 and 9 (9600 based console)
This is only useful if you want to see debug messages, change things in the SW etc.
For this to work you will need to connect the FTDI to the below pins or simply use
additional FTDI board (that's what I did). If you only use one board then you will need
to connect it to the programming side, load the program then connect to the console pins to see the output, which is pretty tedious if you ask me.
To connect console only, here are the connections required:
GND from the FTDI to Arduino GND
Rx from the FTDI to digital pin 9 of the Arduino
Tx from the FTDI to digital pin 3 of the Arduino
BMP085 is connected to the I2C interface (analog pins 4 and 5 of the Arduino).
Vcc from sensor breakout board to 3.3V of Arduino
Gnd from sensor breakout board to GND of Arduino
SDA from sensor breakout board to Aruino analog pin 4
SCL from sensor breakout board to Arduino analog pin 5
If you are using small bread-board for the DHT22 sensor, you can probably include this sensor on it too.

Minor modification to the Stalker board
I used the Stalker v2.0 board, now there is v2.1 board too.
In the v2.0 you will need to place a short on the bottom side of the board to connect INTA\ and PD2 pads, see this picture.
I did not checked it with v2.1 of the Stalker, but could see the same functionality still exist there. Having said that, the RTC module used in the Stalker v2.1 is very different DS3231 compared to R8025 on the v2.0. There are Arduino libraries for this new version RTC module out there, but it will obviously require some code modifications on the sketch I have here. This is not very difficult though, so don't be too scared of that.

Configuring the XBee modules
There is quite a bit of information and in-depth on the XBee modules on the net. I will not go into all the details here. Few notes though: The XBee modules have API mode and Command mode firmwares. I use the library that requires the API mode. Also, with Series 2 of XBee, there is a role for each module, so we need one coordinator that is connected to the PC and one endpoint which is the module installed on the remote weather station. Also there is some addressing information that needs to be identical between units, and I chose this address code to be 2266 (my birthday if anyone is curious). Obviously you can choose something different. On the coordinator side (PC) the AO needs to be 0. On the weather station side the AO should be 2 (but in any case I ignore the return codes, so it will work anyway).
  1. Install the X-CTU utility
  2. Optionally do firmware upgrade to the XBee Modules (please note you need the API mode firmware)
  3. Configure one unit to be coordinator and another to be endpoint
  4. Coordinator configuration is included in the ZIP file for this instructable
  5. Place the XBee module configured as endpoint into the Stalker socket
  6. Place the XBee module configured as coordinator into the XBeeExplorer and connect it to the PC
Loading Program onto the Stalker board:
  1. Connect the UartBee to the Stalker programming pins (see Seeduino site for details).
  2. Make the recommended modifications to Arduino IDE so that it will know about this type of board (see the content in ArduinoIDE sub directory of the ZIP file attached here)
  3. Add the libraries from the ZIP file sub directory Libraries to the user libraries of your Arduino IDE
  4. Connect the UartBee to your PC USB
  5. Place the code for the Stalker in your development area, and load it into your IDE
  6. Compile and load the program onto the Stalker
  7. Connect battery and solar charger once you also assembled all in your enclosure
Run the program on the PC
  1. Place the .exe and .dll files on your PC in some directory of your choice (no, did not do an install program). WeatherSationMan.exe and DTG.Spreadsheet.dll are located in the WeatherStationMan\bin\Debug
  2. Run the program and double click on the COM port to which your XBee is connected to
  3. After a minute or so, you should start to see readings of the weather information from the remote station
  4. Add the program to automatically start on boot time by following steps in this explanation. Follow the path and file name of the program with the parameter specifying the COM port to which the XBee is connected. For example, if the COM port is COM20, you will do something like: C:\Temp\WeatherStationMan.exe COM20
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
19
Followers
6
Author:zmashiah
An experienced manager in Hi-Tech that never gets board with technology or life