Weather station diagram. BMP085 Barometric Pressure Sensor Module for arduino (or how to make a weather station with your own hands). Wind speed and direction meter

MBOU secondary school of Selikhinsky rural settlement

Project topic

"Weather station at home"

Completed:

Puvis Rainis, 5th grade student.

Supervisor:

Immortal O.A.

2016

Subject : “Weather station at home.”

Hypothesis: Is it possible to create a weather station at home?

Target: Making a weather station at home and monitoring weather changes.

Tasks:

    Find out what a weather station is.

    Study the history of phenology.

    Study the structure of a weather station.

    Make a weather station at home;

    Observe the weather and record the results of observations in a table;

Research methods:

    search (collection of information on a topic)

    observations

    practical (device making)

    analytical (comparison of results)

    Introduction.

When studying the topic “Weather and meteorological observations” in a geography lesson, we were assigned to make a meteorological instrument at home and carry out weather observations according to this instrument. I had a question: “Is it possible to create a meteorological station at home and conduct weather observations using it?”

Our distant ancestor was highly dependent on the vicissitudes of the weather. He did not understand the essence and patterns of natural phenomena and explained everything incomprehensible by the presence of a supernatural, “divine” force. By the “will of the gods,” the sun rose, it rained, the rivers dried up, and the wind blew.

All peoples deified the Sun, Moon, wind, lightning and thunder. The Eastern Slavs, before they adopted Christianity, especially revered Perun - the agricultural god, the giver of rain, the creator of lightning and thunder, who had the power to create spring greenery on the earth and trees. Having accepted the new faith, our ancestors began to honor Ilya the Thunderer.

Many peoples considered the Sun to be the main source of life on Earth. They called him "the prince of the earth and the king of the sky." Luna was revered as a princess.

Before the appearance special devices the weather forecast was based solely on visual observations of atmospheric phenomena, which made it possible to establish some regularities back in ancient times. The acquired experience continued to develop and accumulate and was passed on from generation to generation for many centuries.

    From the history of phenology.

Phenology - the science of the patterns of seasonal development of nature. The development of phenology is determined by the demands of practice (agriculture, fishing, hunting, forestry, nature conservation, healthcare, etc.).

Phenology makes it possible to predict seasonal phenomena and plan economic activities (environmental measures, timing of agricultural work, etc.) in accordance with the timing of these phenomena.

(№1.)

There is evidence that ancient peoples lands - the Chinese and Egyptians - in their agricultural practice they knew how to monitor the seasonal development of nature. Seasonal phenomena were reflected in a number of works of ancient authors (for example, the Greek philosopher Theophrastus (372-287 BC) and the Roman writer Pliny the Younger (62-114 AD)).

In the Middle Ages, in Russian and foreign annals and chronicles, records were sometimes kept about the timing of the onset of the most important seasonal phenomena (for example, in the Krakow monastery from 1490-1527, in the palace of the Japanese Mikado from 812, etc.). However, these materials remained without systematization and scientific processing.

In Russia, the oldest is considered to be a handwritten calendar, dated 1670, and the first printed calendar should be considered “Saints or calendar, published by Kopievsky in Amsterdam and dated 1702.

The first thought about the need to observe seasonal natural phenomena in Russia belonged to Peter I.

In 1721, Peter I wrote from Moscow to St. Petersburg A.D. Menishkov: “When the trees begin to spread out, then order them to send us news of them, weekly, pasting them on paper with signed numbers, in order to find out where spring began earlier.” And by the decree of the sovereign, issued on March 28, 1722, Admiral Kruys was ordered to keep systematic records about the state of the weather in St. Petersburg.

In the second half of the 18th century, guards at the Kremlin wall were required to note the state of frost, the onset of a blizzard, the thickness snow cover, the nature of wind, hail, thunderstorms and other weather indicators.

Since 1864, the “Kyiv Folk Calendar” began to be published with weather forecasts for each month. His goal was “to give the people knowledge in a popular form through strictly scientifically presented articles and in a reference department adapted to the needs of the people.” Now this task is meteorology - the science of weather. It got its name from the Greek word “meteora” - “something in the sky”.

After the 1917 revolution, meteorology continued to improve. Currently, the hydrometeorological service has thousands of observation stations, many observatories and a number of research institutions. Weather service workers strive to provide information not only for the short term, but also for the long term.

№2.

    The concept of a weather station, its composition.

A weather station is a collection of various instruments for meteorological measurements (weather observations).

In a narrow sense, a weather station is an institution that conducts meteorological observations. The main official weather stations in the world are assigned synoptic indices. In Russia, most weather stations are managed by Roshydromet. Depending on the established volume of observations, weather stations have a certain category. Data from USSR weather stations were published in the Meteorological Monthly.

There are analogue and digital weather stations.

The classic (analog) weather station has:

1.Thermometer for measuring air and soil temperature.

2. Barometer for measuring pressure.

3. Anemometer for wind direction.

4. Precipitation gauge (pluviograph) for measuring precipitation.

5. Hygrometer for measuring air humidity

6. Snow measuring staff - a staff designed to measure the thickness of snow cover during meteorological observations.

7. Thermograph - a recorder that continuously records air temperature.

№3.

4.Meteorological instruments:

Thermometer (Greek θέρμη - heat; μετρέω - measure) - a device for measuring the temperature of air, soil, water, and so on. There are several types of thermometer: liquid; mechanical; electronic;

Barometer (ancient Greek βάρος - “heaviness” and μετρέω - “I measure”) - a device for measuring atmospheric pressure. The mercury barometer was invented by the Italian mathematician and physicist Evangelista Torricelli in 1644; it was a plate with mercury poured into it and a test tube (flask) placed with the hole facing down. When atmospheric pressure increased, the mercury in the test tube rose, and when it decreased, the mercury fell. Due to the inconvenience, this design ceased to be used and gave way to the aneroid barometer, but the method by which such a barometer was made began to be used in thermometers.

A.A. Letyagin. Geography. Primary course: 5th grade: textbook for students of general education organizations/A.A. Letyagin; edited by V.P. Dronova.-3rd edition, revised. and additional - M.: Ventana-Graf, 2015 - 160 p.

GUIDE TO CREATING A SIMPLE HOME WEATHER STATION ON YOUR OWN

If the computer is turned on all day or even around the clock, it can be used to operate a home weather station. The goal is to create a simple and inexpensive weather station that will use a personal computer (PC). The PC acts as a reader, processor and sender of measured meteorological data to the Meteopost website. Communication between the computer and the measuring unit will be carried out via a 1-Wire network.

Composition of the measuring complex
1. Personal computer With operating system Windows XP and higher and the presence of a free COM port.
2. Adapter for COM port (1wire - RS232 converter)
3. 4-core twisted pair Ethernet cable, the length should be sufficient from the COM port to the measuring unit
4. 5V DC power supply with good voltage regulation
5. Measuring unit (installed outdoors)
6. PC software - "Weather station" application.

OPTION No. 1 - ONE SENSOR

First, let's consider the simplest option - a weather station with one temperature sensor. This does not require an additional power supply (item 4). And the system is very simplified. The adapter for the COM port (item 2) can be made according to this scheme. The adapter consists of two zener diodes at 3.9V and 6.2V, two Schottky diodes and one resistor.

Adapter diagram for COM port


Adapter in D-SUB housing

The soldering area of ​​the cable and temperature sensor, including the sensor terminals, must be well protected from moisture. It is best to use polyurethane-based glue.


Waterproofing sensor leads

This system will provide temperature monitoring with an accuracy of tenths of a degree. In this case, a graph of air temperature versus time will be visible in the application window and the tray icon will always show the current temperature. The application allows you to set the measurement interval.

COST OF RADIO PARTS - no more than 50 UAH.

OPTION No. 2 - FOUR SENSORS

A more complex weather station with four sensors: temperature, humidity, light, pressure. Since only the temperature sensor will be digital, and the rest will be analog, the system uses a four-channel ds2450 ADC. This ADC supports 1-wire protocol. The circuit requires an additional power source. The power source must provide high voltage stability. But since the circuit of the adapter described above has a drawback - the inability to connect to sensors external source power supply due to the lack of real mass (-), we use a different adapter circuit. This adapter also fits into the housing of the D-SUB COM port connector. Now there are three wires in the cable: ground (-), +5V and data.


Adapter circuit for COM port with external power supply

The circuit of the measuring unit can easily be made even on a breadboard. You just need to give special attention waterproofing contacts. The easiest way is to melt paraffin and apply it with a brush to all bare spots on the board. If the board is not protected from water, there will be voltage leaks and there will be many measurement errors. In our case, even hundredths of a Volt significantly affect the results.


Measuring block diagram

The measuring unit must be placed in a housing such that the board and sensors are protected from direct exposure to precipitation and solar radiation. A box made of dense foam plastic is well suited for these purposes. In the walls of the box (bottom and wall on the shadow side) you need to make more holes for ventilation. It is advisable to cover the inside walls of the box with aluminum foil for additional protection from infrared radiation, otherwise there will be an error in temperature measurement. All sensors, except for light, are placed directly on the board. The light sensor (photoresistor) is removed from the board on wires and installed in the hole in the bottom of the foam housing. So that the sensor surface faces down. In this case, precipitation will not fall on the sensor and, especially in winter, this will protect it from icing. For waterproofing, the light sensor must be treated, for example, with transparent polyurethane-based glue (silicone sealant did not pass the test, it leaked current). Treat inclusively (!) the photosensitive zone of the photoresistor. Fill the sensor leads with glue and place them in an insulating tube. Solder the ends of the leads to a small board. And solder the wires from the measuring unit to this board. Fill the soldering areas with paraffin. Otherwise, when there is heavy rain and wind, the weather station may become inoperable and you will have to disassemble it and dry everything out. The unit can be connected to the cable using a connector. But you need to use a special moisture-proof connector - the system will work in difficult weather conditions.

If you have to place the case outside the window of a high-rise building (it is not possible to install it on a stand near the ground), then the box must be removed from the wall of the house as far as possible, on a bracket. Otherwise, heating the air from the wall gives very distorted temperature data. In a private home, it is better, of course, to make a real weather booth. We need to take care that the housing is securely fastened, otherwise strong gusts of wind can tear off our structure.


Measuring unit on bracket

The output voltage of the power supply (PSU) should be within 4.8-5.3V. Charging from an old phone will also work. However, if the power supply does not have a stabilizer, you need to add it to the power supply, because For measurement accuracy, the presence of a stable voltage is very important. You can at least check with a tester whether tenths or hundredths of a volt change at the output of the power supply. Jumps of tenths of a volt are not allowed. Simple scheme 5V stabilizer is shown below. The power supply input can be from 7 to 17V. The output will be about 5V. After this, you need to connect our cable (which goes to the measuring unit) to the power supply and measure the voltage with a tester at the other end of the cable. This voltage may be slightly lower than directly at the power supply output due to cable resistance. This measured voltage must be entered in the application settings as "Sensor supply voltage".


Typical voltage regulator circuit

COST OF COMPONENTS FOR THE WEATHER STATION

Approximate cost of radio components (2015 prices in the store).
1. Temperature sensor ds18b20 - 25 UAH
2. ADC ds2450 - 120 UAH
3. Photoresistor LDR07 - 6 UAH
4. Humidity sensor HIH-5030 - 180 UAH
5. Pressure sensor MPX4115A - 520 UAH.
TOTAL: 850 UAH or 37$

The remaining elements in total cost no more than 50 UAH; the power supply can be taken, for example, from an old “charger” for your phone.


Marking of radio elements

SOFTWARE FOR WEATHER STATION

We have developed an application for Windows that we will provide free of charge to anyone who wants to build such a weather station. It will allow you to monitor the weather on your PC.


PC application window

The system tray displays the air temperature

The application can send all measured data to our “Meteopost” server and on a special page (example) you can view all weather data from a PC browser. The page is also adapted for the browser mobile phone.


Mobile phone browser screenshot

CONCLUSION
You can save on the cost of parts if you buy them from the Chinese on AliExpress. It is possible to assemble a weather station without any of the sensors, with the exception of the temperature sensor. Our ADC has one free input left, so it can also receive a signal from the wind sensor. But since we are in the city, we simply have nowhere to install and test such a sensor. In urban areas there will not be adequate measurement of wind speed and direction. Methods self-made Wind speed sensors are described in detail by many enthusiasts on the net. The factory sensor is quite expensive.

A radio amateur with average skills can assemble such a weather station. To make it even simpler, you can not lay out the printed circuit board, but assemble it by surface mounting on a breadboard. Tested - it works.

We tried to create an accessible, cheap weather station. In particular, a computer is used in the system for this purpose. If you exclude it, then you need to make an additional display unit, a data transmission unit to the network, etc., which will significantly increase the price. For example, the now popular “Netatmo Weather Station” with similar measured parameters costs about 4,000 UAH ($200).

We are ready to help anyone who wants to make such a weather station with consultations. We will also provide the necessary software and connect your station to our website.

Watching the weather is a very exciting activity. I decided to build my own weather station based on the popular .

The weather station prototype looks like this:

Functions of my weather station:

  • measurement and display of room and outdoor temperatures;
  • display of current time (hours and minutes);
  • display of current moon phases and lunar day;
  • transferring measurement results to a computer via a serial connection;
  • transmission of measurement results via protocol MQTT using an application on your computer.


Hex
-file
firmware for (version dated May 9, 2018) - .
How to flash hex-file to board Arduino, I described.

Arduino Nano 3.0 microcontroller

The "heart" of my weather station is a microcontroller eBay):

To control the display and polling of sensors, I use timer 1 Arduino, causing interruptions with a frequency of 200 Hz (period - 5 ms).

Indicator

To display the measured sensor readings and the current time, I connected to Arduino four-digit LED indicator Foryard FYQ-5643BH with common anodes (anodes of identical segments of all discharges are combined).
The indicator contains four seven-segment digits and two separating (hour) dots:

The indicator anodes are connected through current-limiting resistors to the terminals Arduino:

discharge 1 2 3 4
conclusion A3 A2 D3 D9

The cathodes of the segments are connected to the pins Arduino:

segment a b c d e f g p
conclusion D7 D12 D4 D5 D6 D11 D8 D13

The indicator segment lights up if there is a high potential at the anode of the corresponding discharge (1) and a low potential at the cathode (0).

I use dynamic display to display information on the indicator - only one digit is active at a time. Active discharges alternate with a frequency of 200 Hz (display period 5 ms). At the same time, the flickering of the segments is invisible to the eye.

Temperature sensor DS18x20

To be able to measure temperature remotely, I connected a sensor , which provides a measurement outside temperature within wide limits. The sensor is connected to the bus 1-Wire and has three outputs - power supply ( VCC), data ( DAT), Earth ( GND):

sensor output VCC DAT GND
conclusion Arduino 5V A1 GND

Between pins VCC And DAT I included a 4.7 kOhm pull-up resistor.

To convert between degrees Celsius and Fahrenheit, you can use the following table:

I placed the sensor outside the window of the house in a plastic ballpoint pen case:

\

Professional weather stations use a Stevenson screen to protect the thermometer from direct sunlight and ensure air circulation. Stevenson screen):

Pressure and temperature sensor BMP280

Mercury barometers and aneroid barometers are traditionally used to measure atmospheric pressure.

IN mercury barometer atmospheric pressure is balanced by the weight of a column of mercury, the height of which is used to measure pressure:

IN aneroid barometer compression and expansion of the box under atmospheric pressure is used:

To measure atmospheric pressure and room temperature in my home weather station, I use a sensor - small SMD-sensor size 2 x 2.5 mm, based on piezoresistive technology:

The scarf with the sensor was purchased at trading platform eBay:

The sensor is connected to the bus I2C(contact details - SDA/SDI, synchronization contact - SCL/SCK):

sensor output VCC GND SDI SCK
conclusion Arduino 3V3 GND A4 A5

Adafruit- files Adafruit_Sensor.h, Adafruit_BMP280.h, Adafruit_BMP280.cpp.

Atmospheric pressure units

Sensor via function readPressure displays the atmospheric pressure in pascals. The basic unit of measurement of atmospheric pressure is hectopascal(hPa) (1 hPa = 100 Pa), the analogue of which is the non-systemic unit " millibar" (mbar) (1 mbar = 100Pa = 1hPa). For conversion between commonly used off-system pressure units " millimeter of mercury" (mmHg) and hectopascals the following ratios are used:
1 hPa = 0.75006 mm Hg. Art. ≈ 3/4 mmHg; 1 mmHg =1.3332 hPa ≈ 4/3 hPa.

Dependence of atmospheric pressure on altitude above sea level

Atmospheric pressure can be presented in both absolute and relative form.
Absolute pressure QFE(English) absolute pressure) is the current atmospheric pressure, which does not take into account the correction above sea level.
Atmospheric pressure decreases by approximately 1 hPa with an increase in altitude by 1 m:

The barometric formula allows you to determine the correction of barometer readings to obtain relative pressure (in mmHg):
$\Delta P = 760 \cdot (1 - (1 \over (10^ ( (0.0081350 \cdot H) \over (T + 0.00178308 \cdot H) ))))$ ,
where $T$ is the average air temperature on the Rankin scale, ° Ra, $H$ - altitude above sea level, feet.
Converting degrees Celsius to degrees Rankine:
$^(\circ)Ra = (^(\circ)C \cdot 1.8) + $491.67
The barometric formula is used for barometric leveling - determining heights (with an error of 0.1 - 0.5%). The formula does not take into account air humidity and the change in gravitational acceleration with height. For small differences in height, this exponential dependence can be approximated with sufficient accuracy by a linear dependence.
Relative pressure QNH(English) relative pressure, Q-code Nautical Height) is atmospheric pressure adjusted to mean sea level. Mean Sea Level, MSL) (For ISA and temperature 15 degrees Celsius), and is initially set taking into account the altitude at which the weather station is located. It can be found out from weather service data, readings from calibrated instruments in public places, airports (from reports METAR), from the Internet.
For example, for the nearby Gomel airport ( UMGG) I can see the actual weather report METAR at ru.allmetsat.com/metar-taf/russia.php?icao=UMGG:
UMGG 191800Z 16003MPS CAVOK M06/M15 Q1014 R28/CLRD//NOSIG ,
Where Q1014- pressure QNH at the airfield it is 1014 hPa.
History of reports METAR available at aviationwxchartsarchive.com/product/metar.
For normal relative air pressure QNH a pressure of 760 mmHg is assumed. Art. or 1013.25 hPa (at a temperature of 0ºС, at a latitude of 45º of the Northern or Southern Hemisphere).
I set the pressure for the aneroid barometer QNH using the sensitivity adjustment screw:

Weather forecast

Analysis of pressure changes allows you to build a weather forecast, and its accuracy is higher, the more sharply the pressure changes. For example, an old rule of thumb for sailors is that a pressure drop of 10 hPa (7.5 mm Hg) over a period of 8 hours indicates the approach of strong winds.

Where does the wind come from? Air flows towards the center of the area low pressure, arises wind- horizontal movement of air from areas of high pressure to areas of low pressure (high atmospheric pressure squeezes air masses into areas of low atmospheric pressure). If the pressure is very low, the wind can reach strong storms. At the same time, in the area reduced pressure (pressure depression or cyclone), warm air rises and forms clouds, which often bring rain or snow.

In meteorology, the direction of the wind is taken to be the direction from which the wind blows:

This direction comes down to eight points.

An algorithm is often used to predict weather based on barometric pressure and wind direction. Zambretti.

Humidity sensor

To determine relative air humidity I use the module DHT11(purchased from the marketplace eBay):

Humidity sensor DHT11 has three outputs - power supply ( + ), data ( out), Earth ( - ):

sensor output + out -
conclusion Arduino 5V D10 GND

To work with the sensor I use the library from Adafruit- files DHT.h, DHT.cpp.

Air humidity characterizes the amount of water vapor contained in the air. Relative humidity shows the percentage of moisture in the air relative to the maximum possible number at the current temperature. Used to measure relative humidity :

For humans, the optimal air humidity range is 40 ... 60%.

Real time clock

I used the module as a real time clock RTC DS1302(the scarf with the watch was purchased on the trading platform eBay):

Module DS1302 connects to the bus 3-Wire. To use this module in conjunction with Arduino library developed iarduino_RTC ( from iarduino.ru).

Board with module DS1302 has five pins that I connected to the board pins Arduino Nano:

conclusion RTC VCC GND RST CLK DAT
conclusion Arduino 5V GND D2 D1 D0

To maintain correct clock readings when the power is off, I inserted a battery into the slot on the board CR2032.

The accuracy of my clock module turned out to be not very high - the clock is fast by about one minute in four days. Therefore, I reset the minutes to “zero” and the hour to the nearest one by holding down the button connected to the A0 pin of the Arduino after turning on the power of the weather station. After initialization, the A0 pin is used to transmit data via a serial connection.

Transferring data to a computer and working via the MQTT protocol

To transfer data via a serial connection to Arduino connects USB-UART converter:

Conclusion Arduino used to transmit data in the format 8N1(8 data bits, no parity, 1 stop bit) at 9600 bps. Data is transmitted in packets, with the packet length being 4 characters. Data transfer is carried out in " bit-bang" mode, without using a hardware serial port Arduino.

Transmitted data format:

Parameter 1st byte 2nd byte 3rd byte 4th byte
outside temperature o space or minus tens of degrees or space units of degrees
room temperature i space or minus tens of degrees or space units of degrees
atmospheric pressure p hundreds of mm r. Art. tens of mmHg units mmHg With.
relative humidity h space tens of percent or space units of percent
current time tens of hours hours units tens of minutes units of minutes

MQTT

Golang protocol client application MQTT, sending information received from the weather station to the server ( MQTT-broker) :

Service allows you to create an account with a free tariff plan" " (limit: 10 connections, 10 Kb/s):

To monitor weather station readings, you can use Android-application :

Nutrition

To power the weather station I use a charger from an old mobile phone Motorola, producing a voltage of 5 V with a current of up to 0.55 A and connected to the contacts 5V(+) and GND (-):

You can also use a 9 V battery connected to the contacts for power supply. VIN(+) and GND (-).

Operation of the weather station

At startup, the sensors are initialized and tested.

In the absence of a sensor DS18x20 error "E1" is displayed when there is no sensor - error "E3".

Then the working cycle of the weather station starts:

  • measurement and display of outside temperature;
  • measurement and display of room temperature;
  • measurement and display of atmospheric pressure and its trend;
  • measurement and display of relative air humidity;
  • display of current time;
  • display of the moon phase and lunar day.


A video of my weather station in operation is available on my -channel: https://youtu.be/vVLbirO-FVU

Temperature display

When measuring temperature, two temperature digits are displayed and for a negative temperature a minus sign (with a degree symbol in the rightmost digit);
for outside temperature the degree sign is displayed at the top:


for room temperature - below:

Pressure display

When measuring pressure, three digits of pressure in mmHg are displayed (with the symbol " P" in the far right place):

If the pressure drops sharply, then instead of the symbol " P" the symbol " is displayed in the rightmost digit L"if it has grown sharply, then" H". The criterion for the sharpness of the change is 8 mm Hg in 8 hours:

Since my weather station displays absolute pressure ( QFE), then the readings turn out to be somewhat underestimated compared to the information in the report METAR(which provides QNH) (14 UTC March 28, 2018):

Pressure ratio (according to ATIS) amounted to $(1015 \over 998) = $1.017. Elevation of Gomel Airport (ICAO code UMGG) above sea level is 143.6 m. Temperature according to ATIS data was 1 ° C.

The readings from my weather station almost coincided with the absolute pressure QFE according to information ATIS!

Maximum/minimum pressure ( QFE), recorded by my weather station for the entire period of observation:

Relative Humidity Display

Relative air humidity is displayed as a percentage (the percentage symbol is displayed in the two right digits):

Display current time

The current time is displayed on the indicator in the format "HH:MM", with the separating colon flashing once per second:

Display of moon phases and lunar day

The first two digits of the indicator display the current lunar phase, and the next two - the current lunar day:

The Moon has eight phases (English and Russian names are given (in blue - inaccurate)):

The phases are displayed on the indicator by pictograms:

phase pictogram
growing sickle (crescent)
waning sickle (crescent)

Transferring data to a computer

If you connect a weather station with USB-UART converter (for example, based on a microcircuit CP2102), connected to USB- computer port, you can use a terminal program to observe the data transmitted by the weather station:

I developed in a programming language golang a program that keeps a log of weather observations and sends data to the service , and can be viewed on Android-smartphone using the application :

According to the weather observation log, you can, for example, build a graph of changes in atmospheric pressure:
example of a graph with a noticeable minimum pressure


example of a graph with a slight increase in pressure

Planned improvements:

  • adding wind direction and speed sensors

In weather stations, a three-cup anemometer (1) is used to measure wind speed, and a weather vane (2) is used to determine wind direction:

Also used to measure wind speed hot-wire anemometers(English) hot wire anemometer). As a heated wire, you can use a tungsten filament from a light bulb with broken glass. In industrially produced hot-wire anemometers, the sensor is usually located on a telescopic tube:

The principle of operation of this device is that heat is removed from the heating element due to convection by air flow - wind. In this case, the resistance of the filament is determined by the temperature of the filament. The law of change in filament resistance $R_T$ depending on temperature $T$ has the form:
$R_T = R_0 \cdot (1 + (\alpha \cdot (T - T_0)))$ ,
where $R_0$ is the resistance of the filament at temperature $T_0$, $\alpha$ is the temperature coefficient of resistance (for tungsten $\alpha = 4.5\cdot(10^(-3) (^(\circ)(C^( -1))))$).

With a change in air flow speed, the temperature changes at a constant filament current (anemometer with DC, English CCA). If the temperature of the heating element is maintained constant, then the current through the element will be proportional to the speed of the air flow (constant temperature anemometer, English). CTA).

To be continued

- Humidity:

Measuring range 20÷90%.

Accuracy ±5%.

Resolution 1%.

- Temperature:

Measuring range 0÷50 o C.

Accuracy ±2 o C.

Resolution 1 o C.

4. Measurement of pressure and temperature with the BMP-180 sensor.

- Pressure:

Measuring range 225÷825 mmHg. Art.

Accuracy ±1 mm Hg. Art.

Resolution 1 mm Hg. Art.

- Temperature:

Measuring range -40.0÷85.0 o C.

Accuracy ±1 o C.

Resolution 0.1 o C.

5. Cyclic animated change of readings.

6. Cuckoo mode. Hourly short beep. If activated and only during daytime.

7. Sounding of button presses. Short beep only during daytime.

8. Saving settings in the non-volatile memory of the microcontroller.

Setup.

1. Enter settings and scroll through the menu using the buttonMENU .

2. Switching the parameter for setting within one menu page with the buttonSET .

3. Setting the parameter using buttonsPLUS / MINUS . The buttons work by pressing once, and when held, an accelerated installation is performed.

4. The parameter being set flashes.

5. After 10 seconds from the last button press, the device will switch to the main mode, the settings will be written into memory.

6. Menu pages.

CLOC :

– reset seconds.

– setting minutes.

– setting the clock.

– installation of daily correction of movement accuracy. In the most significant digit the symbolc . Setting range±25 sec.

ALAr :

– minutes when the alarm goes off.

– alarm clock hours.

– activation of the alarm clock. In the most significant digit the symbolA. In the younger On , if the alarm clock is enabled,OF – if prohibited.

– activation of the “cuckoo” mode. In the highest digits the characterscu. In the younger On , if the "cuckoo" operation is allowed,OF – if prohibited.

DiSP :

– duration of time indication. On the indicatord xx . Setting range

– duration of humidity indication. On the indicatorH xx . Setting range 0 ÷ 99 sec. If set to 0, the parameter will not be displayed.

– duration of temperature indication measured by the humidity sensor. On the indicatortHxx . Setting range 0 ÷ 99 sec. If set to 0, the parameter will not be displayed.

– duration of pressure indication. On the indicatorP xx . Setting range 0 ÷ 99 sec. If set to 0, the parameter will not be displayed.

– duration of temperature indication measured by the pressure sensor. On the indicatortPxx . Setting range 0 ÷ 99 sec. If set to 0, the parameter will not be displayed.

– animation speed. In the most significant digit the symbol S. Setting range 0 ÷ 99. The smaller the value, the higher the speed.

LiGH :

niGH- night mode settings.

– minutes of night mode activation.

– hours for switching on the night mode.

– indicator brightness in night mode. In the most significant digit the symbol n. The setting range is 0 ÷ 99. The brightness of the indicator corresponds to night mode.

dAY- day mode settings.

– minutes of day mode activation.

– hours for daytime mode activation.

– indicator brightness in daytime mode. In the most significant digit the symbol d. The setting range is 0 ÷ 99. The brightness of the indicator corresponds to daytime mode.

Operation of the device.

1. In the main mode, the information on the indicator changes cyclically. The following output sequence is set: time - humidity (in the most significant digit the symbol H) – temperature measured by the humidity sensor – pressure (in the most significant digit the symbol P) – temperature measured by a pressure sensor. If the display duration of a parameter is set to 0, then it will not be displayed on the indicator.

2. From the main mode, you can switch the display using the buttons PLUS/MINUS.

3. If there is an error in reading data from the DHT11 sensor when indicating temperature and humidity, dashes are displayed on the indicator.

4. If the alarm is activated (see settings), when the time is displayed, a dot is included in the least significant digit. At the specified time, a sound signal is activated - double signals every second for one minute. Beep can be turned off early by pressing any button. When the alarm goes off, the time is displayed on the indicator for 30 seconds.

5. Digital time correction is performed daily (at 0 hours 0 minutes and 30 seconds).,DS1307.

4. The type of indicator (common anode or cathode) is selected using a jumper. If the jumper is installed, then an indicator with a common anode is selected.

5. The diagram shows two indicators, only one is installed.

6. The tweeter must have a built-in generator. Depending on its current consumption, you may need to install an amplifier (transistor switch).

During discussions and improvements in the forum topic, several different versions of this project appeared.

Whenever possible, updated materials will be posted here. Brief descriptions in the archives

Gratitude studiotandem for preparing materials and testing firmware.

You will need

  • - Arduino board or equivalent;
  • - temperature and humidity sensor DHT11;
  • - pressure sensor BMP085;
  • - carbon dioxide sensor MQ135;
  • - LCD display 1602;
  • - potentiometer 10 kOhm;
  • - housing for the weather station;
  • - a piece of foil fiberglass;
  • - screws for fastening components;
  • - computer;
  • - connecting wires;
  • - power supply connector;
  • - soldering iron.

Instructions

First you need to choose a suitable case. All the components of the future indoor weather station should fit there. Such cases are sold in many radio electronics stores. Or use any other case you can find.
Figure out how all the components will be placed inside. Cut a window to attach the LCD display if you don't have one. If you place a carbon dioxide sensor inside, which gets quite hot, then place it on the opposite side from other sensors or make it remote. Provide a hole for the power connector.

A few words about the components used.
The 1602 LCD display uses 6 Arduino pins + 4 for power (backlight and character synthesizer).
The DHT11 temperature and humidity sensor connects to any digital pin. To read the values ​​we will use the DHT11.rar library, which can be downloaded, for example, here: https://yadi.sk/d/1LiFmQWITGPAY
The BMP085 pressure sensor is connected via the I2C interface to two Arduino pins: SDA - to analog pin A4 and SCL - to analog pin A5. Please note that +3.3 V is supplied to the sensor to power it.
The MQ135 carbon dioxide sensor connects to one analog pin.
In principle, to assess the weather situation, it is enough to have data on temperature, humidity and atmospheric pressure, and a carbon dioxide sensor is not necessary.
But using all 3 sensors, we will use 7 digital and 3 analog Arduino pins. Well, food, of course.

The layout of the weather station is shown in the figure. Everything is clear here.

Let's write a sketch for Arduino. The text of the program, due to its considerable size, is provided as a link in the appendix to the article in the “Sources” section. All code is provided with detailed and clear comments.
Let's load the sketch into the memory of the Arduino board controller.

We will make a printed circuit board to place the components inside the case - this is the most convenient solution for arranging and connecting sensors. For making printed circuit board at home I use “laser ironing” technology (we described it in detail in previous articles) and etching using citric acid. We will provide places on the board for jumpers ("jumpers") to be able to disable the sensors. This will be useful if you need to reprogram the microcontroller when you want to modify the program.
Using soldering, we will install pressure and gas sensors.
To install the Arduino Nano board, it is convenient to use special adapters or sockets with a pitch of 2.54. But in the absence of these parts and due to saving space inside the case, I will also install the Arduino by soldering.
The temperature sensor will be located at some distance from the board and will be thermally insulated from the interior of the weather station using a special insulating gasket.
We will provide places for connecting external power to our homemade board. I'll use a regular 5V charger from an old broken router. Plus 5 volts from charger will be supplied to the Vin pin of the Arduino board.
The LCD screen will be screwed directly to the case, to the front. It will be connected using wires with Dupont type quick connection connectors.

If you find an error, please select a piece of text and press Ctrl+Enter.