1. Component list
- Arduino UNO board (http://arduino.cc/en/Main/arduinoBoardUno)
- Arduino Ethernet shield (http://arduino.cc/en/Main/ArduinoEthernetShield)
- DHT11/22 temperature/Humidity sensor (http://www.adafruit.com/products/386)
- 10k resister
Arduino UNO Arduino Ethernet shield
2. Overall idea
We have discussed on one of other tutorial, how to use Raspberry Pi to monitor temperature/humidity using the GadgetKeeper.(Temperature monitoring with Raspberry Pi and DHT11/22 temperature and humidity sensor). Here we are going to discuss, how to use Arduino board instead of Raspberry Pi. Arduino UNO board and Arduino Ethernet shield has been used with few standard libraries. Attached sensor is used to measure the environment temperature and humidity periodically (every 10s) and send those data to GadgetKeeper. We have discussed here how to monitor 2 parameters. But you can easily understand the code structure and easily extend the code to monitor many more parameters like light intensity, soil moisture even wind speed with relevant sensors.
3. Prepare the hardware
Since most of the Arduino shields are usable as a stack, you need to apply less effort to setup the hardware. The final setup will be as follows.
4. Add required additional Arduino libraries
We have used Arduino 1.5.6-r2 version as the IDE.You can download it from this url.(http://arduino.cc/en/Main/Software). Also the required libraries can be downloaded from following links.
All other required libraries are available as standard libraries with the IDE.
5. Configure GadgetKeeper
Create the "weatherStation" thing first:
Then create the "temprature" and "humidity" properties under weatherStation as follows.
6. Arduino sketch
This is the arduino sketch for uploading temperature and humidity values to the GadgetKeeper.
You only need to change the Ip address and GadgetKeeper settings according to your values. Also you can set the data updating period in milliseconds.(At the moment we have set it to 10s)
7. Test the code
Setup the hardware correctly and upload the sketch to arduino. Now you are ready to test your Weather Station code. If everything is fine, you will be able to see the following output. You will see some error messages if the DHT11 sensor hardware or your network setup has some problems. Few error screens has also shown below,
- screen 1 -> No errors
- screen 2 -> DHT11 sensor problem
- screen 3 -> Network problem
- Extend the code to monitor few other environmental conditions like light,moisture,CO2 level etc
- Configure the GadgetKeeper to send notification email alerts when temperature, humidity exceeds predefined threshold levels.