Final weather station will be water proof, record temp, humidity, barometric, light, soil moisture & upload to net & have internal webpage .
- -4°C to +125°C temperature range with +/-0.5°C accuracy
- 0-100% relative humidity with 2-5% accuracy
- 0.5Hz sample rate (one sample every 2 seconds)
- 3 to 5V operation
- Power consumption just 4.3mA during reads, even less when idle
- Blue power LED
- Dimensions: 31(W) x 23(H) x 4(D)mm
- VIN: Connect to 5V on your microcontroller.
- DATA: Connect to a digital I/O line on your microcontroller (e.g Pin 13).
- GND: Connect to GND (0V) on your microcontroller.
#define DHTPIN 13
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(t) || isnan(h))
Serial.println("Error reading DHT!");
Values before and after breathing into the sensor.
I was saving the DHT driver files (DHT.h) to “C:\Program Files (x86)\Arduino\libraries\DHT” and not “%UserProfile%\My Documents\Arduino\libraries”. This is common knowledge but no one says this here, here or here.
So here is the idea, I have heap of sensors from ebay that I have working individually (temp, Humidity, pressure etc) so why not build a weather station.
The most expensive/time consuming part would be building the mechanical stuff to detect the wind/rain (pivot bucket with magnetic sensor) and a solar panel/wifi module. Technically this should not be too hard. A 3D Printer would be handy.
The 555 Timer will trigger update events and the 4 bit timer is really there to help switch open circuits to reuse the limited analogue pins on the Ardrino, EEPROM will save data if the internet is offline. I plan on open sourcing all code and designs.
Full Size image<.a>.