Add products by adding codes
Cz. 2 Building a weather station based on arduino sensors
I welcome all readers to the second part of the article on construction of and discussing the weather station, which everyone configures according to individual needs and own discretion. I will not elaborate on what topics we covered in the first part of the. I refer anyone interested to it ->
Construction of meteorological station part 1
To keep it short, subject of this article will be modules,sensors and other electronic components so that we can receive particular stimuli from the outside world. I will try to discuss as as thoroughly as possible each of them, so that there is no doubt doubt what to connect and how to operate.
Well, let's perhaps start with the simplest sensors such as water detector, sensor soil moisture whether water level. All of the sensors listed above operate on a similar principle. Most of them have courts most often in this form:
Tiles differ is that, for example, in the soil moisture sensor spacing between courts is significant. And so from the left we have the sensor rain, in the middle is a sensor humidity soil and on the right side the sensor fluids.
As you can see from the images posted above, these courts are similar. The water sensor has two paths on a PCB that are not in contact with each other and have a zigzag form.
When between paths will appear water, the resistance between them decreases, and the given voltage on the plate begins to flow through it. This board has a separate signal amplification module that feeds analog and digital signals (for more information, please visit the products page).
These boards send analog signals, which we receive with ARDUINO. The supply voltage of the boards is 5 V and the analog signal they output is, within the range 0 to 5 V. Voltage applied to the ARDUINO 5 V analog pin, the ADC reads as a value 1023 a 0 V it's 0.
As you can see the analog pins, have a high resolution signal, making the measurement accurate. To receive these values, all you need is the command "analogRead(nr.pin);". The digital outputs available in some of the above sensors are digital 0,1 where 0 is 0 V and 1 is the signal, so 5 V.
On these modules is soldered potentiometer, which regulates the the threshold beyond which signal status will change. So we adjust with it from what water level the sensor will give a signal 1.
It's probably all on the subject of the aforementioned sensors what I wanted to convey to you. It was simple truth? Well, now we will move a step forward and deal with another sensor, this time it will be a sensor that has already been tentatively discussed in the previous section, but I would like to draw a little more attention to it.
So here goes, hygrometer is a sensor as we know it that measures the humidity of the air. Well, but how it works you ask, and what is it made of? Well, I already answer you, namely, in the beginning hygrometers used in their construction hair, which, under the influence of moisture, changed their length. Today we have at our disposal special sensors that have an accuracy class and are calibrated.
Such sensors are DHT11 , DHT21 and DHT22. These sensors no longer use hair in their construction but special electronic components electronic. The most common elements used in them are bimetallic, which, depending on the humidity change its length. Less common are capacitive sensors, which contain a hygroscopic agent. These sensors are unlikely to be used commercially due to their complex measurement.
I used DHT11 and as you can see in the photo below, after opening housing shows us the sensor, which has four leads. On the back of the sensor, on the other hand, there is a module iC, which is responsible for communication of the sensor via the bus SPI as well as performing measurements. To support this sensor via Arduino, there is a library, and the sensor operates on a 5 volt power supply.
Another the sensor mentioned in the previous section was GP2Y1010AU0F.
Sensor dust. Sounds unexceptional right? It is a bit more complicated sensor than the ones mentioned above, as it measures dust particles with a thickness reaching PM2.5. But what do these numbers and figures mean? So that's how the measurement is examined based on the quantity of particulate matter in the air expressed in the unit of μg/m3. Sensor Sharpe, which I presented, can detect particles with a size of 0.8μm, i.e. less than 1/1000 mm!!! Such a specification allows the study of PM2.5 pollution! Impressive truth?
This sensor detects smallest particles and those below 10 μg/m3 are dangerous for the body, as they enter the lungs, and then into the bloodstream contributing to various diseases heart, asthma or even cancer! Therefore, I applied this sensor to a weather station to study the quality of air, especially in winter, when the heating season begins.
This sensor has photoemitter infrared, whose rays are reflected by fine particles, and the reflected light from the pollen passes through the lens and falls on a photodetector. The two actuators are positioned at an angle to each other. In the central part of the sensor there is an opening through which the air. The sensor operates on a 5V power supply, and its signal is an analog with appropriate characteristics depending on the contamination:
As you can see, the sensor sends a signal from 0.5V to 4.3V, so it never reaches 5V, which will have to be taken into account in the sketch.
The sensor outputs are as follows:
Having already scheme we can proceed to connect sensor under Arduino.
Maybe that's later, and now let's move on to the next sensor.
Sensor light operating on the bus I2C. It is a cool sensor because of its ease of use and obtaining a measurement but also because of its characteristics, which is similar to the spectrum of the human eye and thus only receives radiation visible for man. And we are talking about the sensor BH1750. Its measurement range is from 0 up to over 58000 lux. So we get the measurement right away in lux and the sensor itself works on a 5V power supply.
Another sensor already used in the previous section is bMP280 sensor. Which measures pressure atmospheric as well as temperature. Also works on the bus I2C and is easy to use thanks to library, but its supply voltage is 3,3V! Keep this in mind when connecting, as applying higher voltage will damage sensor.
Now you will probably think that some sensors operate on the same bus I2C and she is in Arduino only one, therefore only one of them can be used. Well not. For the bus I2C like to SPI can be plugged in many sensors so rest assured. You can even plug in a module that converts, as we saw in the previous section many display pins LCD (as many as 8 pins on the Arduino) to only two signal pins SCL and SDA except for the power supply. This magical device is called converter, which you can find in our store. But remember the downside of the bus, which works for short distances up to 3m. wires!
To perceive the above factors are dedicated sensors that deal with the reading these phenomena. The problem is encountered when we want to measure some other factors and for these measurements the sensors needed are expensive or none at all. Then you have to do some thinking and sub-education on your own. I also wanted to measure in my project precipitation. As a result, I came up with a couple of constructible solutions, namely:
the first idea referred to a sensor level liquid, but there is a limitation in the form of its physical size and sending non-uniform signals depending on the water level.
the next idea was flow meter. Operating principle simple small tank, which will "collect" precipitation and directed it to the flow meter. But, when there is little precipitation the flow meter will not detect it. Well, here's a little modification and adding electrovalve, which will open every hour open and let the collected rainwater go to the flow meter. Sounds better, but requires additional expensive elements.
last and probably best idea is to use the simplest potentiometer z float placed in some kind of tank. The downside is the lack of automation (manual pouring of water). Since we are able to calculate hourly precipitation in the code to the Arduino and the result reset and write a new one.
Another factor I would like to study is direction i wind speed. We can calculate the wind speed with encoder together with optocoupler slotted and mounted to the encoder dial flower. By using an encoder, we get rid of external resistance. Well, yes, and how to determine direction wind? All in all, you can build on the same principle principle. In order to get rid of the resistance and make measurements already the smallest air movements. You can also use magnetometer, but it is wired and the wires will limit movement of the sensor itself and it works on the bus I2C, which, as you well know and I have already emphasized many times limits length wires of this bus. To illustrate the above types of sensors I show a mast with sensors
.
Knowing everything about the sensors we can decide which of them we want to use in the construction of a meteo station. There are still a few things left to discuss. Namely, parts of programs responsible for operating the various sensors, the way displaying information on the display LCD, about which was already mentioned in part one, or the way transmission of data wirelessly. We will address these issues in next parts, to which you are already cordially invited.