Introduction: Hackgyver Weather Station
Since some time on my hackerspace, one of our member (futex) made a weather station with a Raspberry Pi.
After viewing his work i had the idea of making one but instead of using an RPi as plateform i've focused my work on Arduino, my weather station collect:
And do also compass.
An LCD screen is used to display the circuit uptime and the number of cycles performed.
The circuit collect datas each hour.
Datas are sent via HTTP request through an arduino ethernet shield.
You can manual ask the circuit to make a cycle through a button to press or via the web interface.
A trimmer is used to control the LCD brightness.
The circuit operates with 5V.
Step 1: Electronics
The platform used to develop the station will be on an Arduino Mega 2560.
16 different pins will be used:
PIN 2: DHT22/AM2302
PIN 7: LCD 16x2
PIN 8: LCD 16x2
PIN 9: LCD 16x2
PIN 10: LCD 16x2
PIN 11: LCD 16x2
PIN 12: LCD 16x2
PIN A0: Photoresistor
PIN 20: (SDA - Arduino Mega pin 20) GY-651 + TinyRTC
PIN 21: (SCL - Arduino Mega pin 21) GY-651 + TinyRTC
PIN 22: LED green
PIN 24: LED red
PIN 26: Buton
PIN GND: All modules
PIN 5V: All modules except GY-651
PIN 3V: GY-651
About modules used:
The module who collect temperature and humidity is a DHT22, the GY-651 handles the altitude, pressure, and do also compass
The brightness is collected by a simple photoresistor.
There is two LED who will indicate your circuit status:
Green led: everything is fine
Red led: Something is wrong, check your code/internet connection
At first I've did a prototype on a simple breadboard, after seeing my prototype working fine i've chosen to produce my PCB to eliminate my wires jungle.
I've did a diagram with fritzing and a typon with Eagle, everyting can be downloaded on the next step.
Step 2: Files Download
You will find on this archive the required file to run the station.
Sorry for the poor fritzing diagram, i'm more an Eagle user than fritzing.
Step 3: Web Interface
This weather station require a web interface to work as i explained earlier.
You just need to upload the PHP files of the station on your server and browse it to proceed the installation.
On first start, you will be asked to enter your SQL database informations/credentials, your name / desired password for the station login and an 'Arduino key' for sending datas.
When you code something who interact with a web application, security is a must, as a member of an hackerspace i know what's am i talking about.
This weather station is protected by an 'Arduino Key' it will be required to confirm the datas transmitted by your arduino to your control panel and to avoid data poisoning attacks.
If datas are sent to the control panel with a wrong arduino key or without the arduino key, datas will not be added to the database.
The arduino key must be specified in your panel but also in your arduino code and it must be the same obviously.
The interface of the station is also protected by a captcha on login (using kcaptcha) to avoid brute force attacks.
Arduino Key and password logon must have a minimum length of 8 characters.
I doubt someone will try to hack your weather station but security is a priority and with those simple securities your panel will remain safe.
Now for the interface i used Bootstrap for the general design as i'm bad at CSS and Google Charts for visualization of curves.
Now for the features of the panel:
You can change your weather panel credentials and arduino key on settings.
You can reset your station statistics and request your station to collect the datas now.
The weather station will query your server each 5 minutes to see if you asked him to collect datas, otherwise the station will continue to IDLE till one hour is reached and will send the data automatically.
Step 4: Budget
Some indicative prices:
HMC5883L BMP085MWC 4 Axis Flight Control Sensor Electronic Compass >> $8.96 (icstation.com)
1602A HD44780 Character LCD Display Module LCM Blue Backlight >> $2.99 (icstation.com)
I2C DS1307 AT24C32 RTC Module for AVR ARM PIC ARDUINO >> $2.25 (icstation.com)
DHT22/AM2302 Digi Temperature Humidity Sensor Replace SHT11/15 >> $4.8 (icstation.com)
Photoresistor GL5539 LDR Photo Light-Dependent Resistor >> $2 (icstation.com)
Resistors 220 Ω >> $0.8 (pack of 100, icstation.com)
Resistors 10k Ω >> $0.8 (pack of 100, icstation.com)
Pack of 200 Resistors 150 Ω + 100 green LEDs (5mm 3,2v 30mA 16000mcd) + 100 red LEDs (5mm 2,2v 30mA 6000mcd) >> 13,50€ (Ebay)
Ethernet Shield WIZNET W5100 >> 12.50€ ( Ebay)
Mega 2560 ATmega2560-16AU Board Funduino >> 12,00€ (Ebay)
Bourns - 3386P-1-103LF - trimmer 10K >> 1,54€ (Ebay)
Tact switch push button (6*6*H4.3) >> 2€ (Ebay)
Total: ~41$ (arround 30€)
The total price is quite difficult to quantify because i purchased from different sellers on Ebay and some purchases have been made for more than what i need (pack of 100 LEDs, etc ...) .
The price is just an approximate indication.
For making my PCB, i used ICStation, it costed me 35$ for a quantity of 10 pcs. (use a breadboard anyway, the small PCBs production was just made for my hackerspace, it would be stupid to make a production just for one person)
Step 5: About My Hackerspace
Am i Xylitol, member of Hackgyver, an hackerspace located in Belfort, France.
HackGyver is an open structure which members gather to develop various projects around technology.
Members meet every Wednesday at 20h, in l'Usine à Belfort. (47.643642, 6.844234)
The main goal of this small weather station project is to introduce our members to soldering and Arduino/PHP coding.
I will provide to our interested members a 'ready-to-make kit' that they will need to solder and program.
At the end of the workshop, each member will leave with the weather station that they made.
So at first my weather station wasn't really intended to be on instructable but i thought it can be cool to share it although there is really a tons of other weather stations on instructable.
The code of the station is a bit poor, in fact this is just a 'base' and it can be greatly improved/stabilised (for example by using the SD card feature of the ethernet shield to log errors, etc..) but we believe in open source and in our hackerspace members to ameliorate the station :)
Sorry for my lame english and thanks for your interest !