Introduction: Weather Station With Data Logging
In this instructable I will show you how to make weather station system by yourself. All you need is basic knowledge in electronics, programming and a little bit of time.
This project is still in the making. This is only first part. Upgrades will be uploaded in next one or two months.
If you have any questions or problems you can contact me on my mail:firstname.lastname@example.org.
Components provided by DFRobot
So let's begin
Step 1: Materials
Nearly all needed materials for this project can be bought on online store: DFRobot
For this project we will need:
-Some nylon cable ties
-Li- ion batteries (I used Sanyo 3.7V 2250mAh batteries)
-Waterproof plastic junction box
-Resistors (2x 10kOhm)
Step 2: Modules
For this project I used two different modules.
Solar power manager
This module can be powered with two different supplys, 3.7V battery, 4.5V - 6V solar panel or USB cable.
It has two diffrent outputs. 5V USB output which can be used for supplying Arduino or some other controller and 5V pins for powering different modules and sensors.
- Solar Input Voltage (SOLAR IN): 4.5V~6V
- Battery Input (BAT IN): 3.7V Single cell Li-polymer/Li-ion
- BatteryCharge Current(USB/SOLAR IN): 900mA Max trickle charging, constant current, constant voltage three phases charging
- Charging Cutoff Voltage (USB/SOLAR IN): 4.2V±1%
- Regulated Power Supply: 5V 1A
- Regulated Power Supply Efficiency (3.7V BAT IN): 86%@50%Load
- USB/Solar Charge Efficiency: email@example.comV 900mA BAT IN
This module is fully compatible with Arduino. It allows you to add mass storage and data logging to your project.
I used it for collecting data from weather station with 16GB SD card.
- Break out board for standard SD card and Micro SD (TF) card
- Contains a switch to select the flash card slot
- Sits directly on a Arduino
- Also be used with other microcontrollers
Step 3: Weather Station Kit
The main component for this project is weather station kit. It is powered by 5V from Arduino or you can also use external 5V supply.
It has 4 pins (5V, GND, TX, RX). TXD data port uses 9600bps.
Weather station kit consist of:
- Wind vane
- Rain bucket
- Sensor Board
- Stainless steel studdle (30CM)(11.81")
- Component package
It can be used to measure:
- Wind speed
- Wind direction
- Amount of rainfall
It has build in humidity and temperature sensor which can also measure barometric pressure.
Anemometer can measure wind speed up to 25 m/s. Wind direction is displayed in degrees.
More info about this kit and sample code can be found on: DFRobot wiki
Step 4: How to Assemble Weather Station Kit
The assembly of this kit is quite easy but for more info about assembly watch a tutorial on how to assemble this kit.
Step 5: Supply and Housing
For this project I used 3.7V li-ion batteries. I made battery pack from 5x of this batteries. Every battery has about 2250 mAh, so a pack of 5x gives about 11250 mAh when connected in parallel.
Connection: As I mentioned I connected batteries in parallel, because in parallel you keep the original voltage but gain greater battery capacity. For example: If you have two 3.7V 2000 mAh battery and you connect it in parallel you will get 3.7V and 4000 mAh.
If you want to achive greater voltage then you need to connect them in series. For example: If you connect two 3.7V 2000 mAh battery in series you will get 7,4V and 2000 mAh.
I used 5V 1A solar panel. This panel has about max 5W of output power. Output voltage goes up to 6V. When I tested panel in cloudy weather its output voltage was about 5.8-5.9V.
But if you want to fully supply this weather station with solar energy you need to add 1 or 2 solar panels and lead-acid battery or something else to store energy and to supply station when there is no sun.
It doesnt seems but housing is one of the most important parts of this system, because it protects vital components from outside elements.
So I choose waterproof plastic junction box. It has just large enough to fit all the components inside. It is about 19x15 cm.
Step 6: Wiring and Code
All the components are connected with Arduino.
- 5V -> 5V
- GND -> GND
- MOSI -> digital pin 9
- MISO -> digital pin 11
- SCK -> digital pin 12
- SS -> digital pin 10
Weather station board:
- 5V -> 5V
- GND -> GND
- TX -> RX on Arduino
- RX -> TX on Arduino
Battery pack is connected directly to power manager (3.7V battery input). I also made connection from battery to analog pin A0 on Arduino for voltage monitoring.
Solar panel is connected directy to this modul (solar input). Solar panel is also connected to voltage divider. Voltage divider output is connected to analog pin A1 on Arduino.
I also made connection so that you can connect LCD display on it to check the voltage. So LCD is connected to 5V, GND and SDA from LCD goes to SDA on Arduino and the same with SCK pin.
Arduino is connected to power manager module with USB cable.
Code for this weather station can found on DFRobot wiki. I also attached my code with all the upgrades.
-If you want to get the right wind direction for your position, you need to manualy change degress values in the program.
So all the data is stored into txt file named test. You can rename this file if you want. I writes all the possible values from weather station and it also writes in battery voltage and solar voltage. So that you can see how is the consumption of battery.
Step 7: Measuring Voltage and Testing
I needed to make voltage monitoring on battery and solar panel for my project.
For monitoring the voltage on battery I used analog pin. I connected + from battery to analog pin A0 and - from battery to GND on Arduino. In programm I used "analogRead" function and "lcd.print()" for displaying voltage value on LCD. Third picture shows voltage on battery. I measured it with Arduino and also with multimeter so that I could compare the value. Difference between this two values was about 0.04V.
Because output voltage from solar panel is greater than 5V I neede to make voltage divider. Analog input can take maximum of 5V input voltage. I made it with two 10kOhm resistor. Use of two resistor with equal value, divides voltage exactly to half. So if you connect 5V, output voltage will be about 2.5V. This voltage divider is on the first picture. Difference between voltage value on LCD and on multimeter was about 0.1-0.2V
Equasion for voltage divider output is: Vout=(Vcc*R2)/R1+R2
When I connected everything together and packed all the components into housing I needed to make outside test. So I took out weather station outside to see how it will work in real outside conditions. The main purpose of this test was to see how will batteries work or how much it will discharge during this test. While testing outside temperature was about 1°C outside and about 4°C inside the housing.
Battery voltage dropped from 3.58 to about 3.47 in five hours.
Question 2 years ago on Step 5
Can you provide a link to the housing that you used?
Answer 2 years ago
I have bought this housing in a local hardware store, so I dont have any link. Just look for a plastic waterproof external junction box.