Homemade anemometer for measuring wind speed. "early childhood development" - workshop - making crafts with children Homemade anemometer for a weather station

The weather station is built on a Picaxe microcontroller from Revolution Education Ltd and consists of two main parts: an outdoor unit that sends its data every 2 seconds using a 433 MHz transmitter. And an indoor unit that displays the received data on a 20 x 4 LCD display as well as Atmosphere pressure, which is measured locally in the indoor unit.

I tried to keep the design as simple and yet functional as possible. The device communicates with the computer via a COM port. Currently, the computer continuously builds graphs from the obtained values, and also displays the values ​​on conventional indicators. Graphs and sensor readings are available on the built-in web server, all data will be saved, etc. You can view data for any period of time.

The weather station took several months to build, from design to completion, and overall I am very pleased with the result. I'm especially glad that I was able to build everything from scratch using regular tools. I am completely satisfied with it, but there is no limit to perfection, and this is especially true for the graphical interface. I have not made any attempt to commercialize the weather station, but if you are thinking about building a weather station for yourself, then this is a good choice.

Street sensors

Sensors are used to measure temperature, humidity, precipitation, wind direction and speed. Sensors are a combination of mechanical and electronic devices.

Temperature and relative humidity sensor

Measuring temperature is perhaps the easiest. For this, the DS18B20 sensor is used. To measure humidity, HIH-3610 was used, producing a voltage of 0.8 - 3.9V at humidity 0% to 100%

I mounted both sensors on a small PCB. The board is installed inside a homemade case that prevents exposure to rain and other external factors.

The simplified code for each of the sensors is shown below. A more precise code that reads values ​​to one-tenth precision is shown on Peter Anderson's site. Its code is used in the final version of the weather station.

The temperature sensor provides an accuracy of ±0.5 °C. The humidity sensor is accurate to ±2%, so it doesn't really matter how many decimal places are available!

An example plot from software running on a PC.

Temperature

Main: readtemp B.6, b1 ; read value into b1 if b1 > 127 then neg ; test for negative sertxd (#b1, cr, lf) ; transmit value to PE terminal pause 5000 goto main neg: b1 = b1 - 128 ; adjust neg value sertxt ("-") ; transmit negative symbol sertxt (#b1, cr, lf) ; transmit value to PE terminal pause 5000 goto main

Humidity

Main: readadc B.7,b1 ; read humidity value b1 = b1 - 41 * 100 / 157 ; change to %RH sertxd (#b1, "%", cr, lf) pause 5000 ; wait 5 seconds goto main

Calculation of humidity sensor readings

Calculations taken from the Honeywell HIH-3610 sensor documentation. The graph shows the standard dependence at 0 °C.

The voltage from the sensor is measured at the input of the ADC (B.7) of the Picaxe 18M2 microcontroller. In the code shown above, the value, which is represented as a number between 0 and 255 (i.e. 256 values), is stored in the variable b1.

Our circuit is powered by 5V, so each ADC step is equal to:
5/256 = 0.0195 V.

The graph shows the initial ADC value of 0.8 V:
0.8 / 0.0195 = 41

Taking the values ​​from the graph, the slope of the graph (taking into account the offset) is approximately:
Output voltage/%RH or
(2.65 - 0.8) / 60 = 0.0308 V in% RH
(0.0306 in documentation)

Let's calculate the number of ADC steps at 1% humidity:
(V per % RH) / (ADC step)
0.0308 / 0.0195 = 1.57

%RH = value from ADC - ADC offset / (ADC steps in %RH), or
% RH = value with ADC - 41 / 1.57

The final calculation formula for the microcontroller will look like: % RH = value with ADC - 41 * 100/157

Protective housing

Start by cutting each panel into two pieces. The planks on one part will be firmly attached on both sides, and on the second part only on one side. Don't throw away these parts - they are used.

Attach two 20mm x 20mm wooden blocks to the whole parts at the top and bottom, and screw the other parts to them.

Cut one of the pieces with one whole side to size and glue it to the inside of one of the sides. Make sure the planks are glued so that they form a "^" shape together. Do this on all sides.

Wind speed and direction meter

Mechanical part

Wind speed and direction sensors are a combination of mechanical and electronic components. The mechanical part is identical for both sensors.

A 12mm marine ply insert is placed between the PVC pipe and the stainless steel disc at the top end of the pipe. The bearing is glued to a stainless steel disc and held in place by a stainless plate.

Once everything is completely assembled and configured, open spaces sealed with sealant for water resistance.

The other three holes in the photo are for the blades. The 80mm long blades give a turning radius of 95mm. Cups 50 mm in diameter. For these, I used cut-off cologne bottles that are almost spherical in shape. I'm not sure about their reliability, so I made them easily replaceable.

Electronic part

The electronics for the wind speed sensor consists only of a transistor switch, a photodiode and two resistors. They are mounted on a small round PCB with a diameter of 32mm. They are installed freely in the pipe so that if moisture gets in, it flows down without touching the electronics.

The anemometer is one of three sensors that needs to be calibrated (the other two are the precipitation meter and the barometric pressure sensor)

The photodiode provides two pulses per revolution. In the simple "sequential" system I was aiming for (all sensors polled in turn), there must be a trade-off between the length of time spent polling each sensor (in in this case, pulse counting) and the responsiveness of the system as a whole. Ideally, a full cycle of polling all sensors should take no more than 2-3 seconds.

In the photo above, checking the sensor using a motor with adjustable speed.

; LCD-specific commands shown in blue hsersetup B9600_4, %10000 ; Use LCD Pin 1, no hserin hserout 0, (13) : pause 100 ; Initialize LCD hserout 0, (13) : pause 100 hserout 0, (13) : pause 100 pause 500 hserout 0, ("ac1", 13) ; Clear display pause 50 hserout 0, ("acc", 13) hserout 0, ("ac81", 13, "adcount: ", 13) ; Print the headings pause 10 hserout 0, ("ac95", 13, "adpulsin: ", 13) ; Print the headings pause 10 do count C.2, 1000, w0 ; Count the pulses (two per rev) w1 = 0 for b8 = 1 to 2 ; Measure pulse length twice pulsin C.2, 1, w2 ; per rev and... w1 = w1 + w2 next w1 = w1 / 2 ; ...calculate average hserout 0, ("ac89", 13, "ad ", #w0, " ", 13) ;Print the count value hserout 0, ("ac9d", 13, "ad ", #w1, " ", 13) ;Print the pulse-length value pause 100 loop

I wanted to calibrate it while driving the car, but there was no time for that. I live in a relatively flat area with an airport a few kilometers nearby, so I calibrated the sensor by comparing my wind speed readings to the airport readings.

If we had 100% efficiency and the blades rotated at the speed of the wind, then:
Rotor radius = 3.75"
Rotor diameter = 7.5" = 0.625 ft
Rotor circumference = 1.9642 ft

1 ft/min = 0.0113636 m/h,
1.9642 ft/min = 1 rev = 0.02232 m/h
1 m/h = 1 / 0.02232 rpm

1 m/h = 44.8 rpm
? m/h = rpm / 44.8
= (rpm * 60) / 44.8

Because there are two impulses coming out of the turn
? m/h = (pulses per second * 30) / 44.8
= (pulses per second) / 448

Wind direction sensor - mechanical part

In the wind direction sensor, a magnet is used instead of an aluminum plate, and a special chip AS5040 (magnetic encoder) is used instead of an optoelectronic unit.

The photo below shows a 5mm magnet mounted on the end of the central screw. The alignment of the magnet relative to the chip is very important. The magnet should be exactly centered at a height of about 1mm above the chip. Once everything is perfectly aligned, the sensor will work correctly.

Wind direction sensor - electronic part

Exist various schemes to measure wind direction. Basically they consist of either 8 reed switches positioned at a 45 degree angle at intervals of a rotating magnet or a potentiometer that can be fully rotated.

Both methods have their advantages and disadvantages. The main advantage is that they are both easy to implement. The downside is that they are subject to wear - especially the potentiometers. An alternative to using reed switches would be to use a hall effect sensor to solve mechanical wear, but they are still limited to 8 different positions... Ideally, I would like to try something different and ultimately decided on a rotary magnetic IC sensor. Although this is a surface mount device (which I try to avoid), it has a number of advantages that make it attractive to use!

It has several different output formats, two of which are most suitable for our purpose. The best accuracy is achieved using the SSI interface. The AS5040 produces pulses ranging from 1 µs at 0° to 1024 µs at 359.6°

Checking the calibration of the wind direction sensor:

Do readadc10 B.3, w0 ;Read from AS5040 magnetic bearing pause 100 w0 = w0 * 64 / 182 ; Convert to 0 - 360 (degrees) debug ; Display in Prog/Edit debug window loop

Precipitation meter

As far as possible I made the rain gauge out of plastic and stainless steel, the base is made of 3mm thick aluminum for rigidity.

The rainfall meter has two buckets. Each bucket holds up to 6 ml of water before its center of gravity shifts, which causes it to pour water into the container and send a signal to the sensor. When the bucket tips over, the aluminum flag passes through an optical sensor, which sends a signal to the outdoor unit electronics.

For now, I left it with clear sides (because it's fun to watch it work!). But I suspect it needs to be painted white to reflect heat in the summer to prevent evaporation. I couldn't find the little funnel so I had to make my own. Notice the wire inside the funnel and in the center of the gutter. This will help stop the surface tension of the water in the funnel and help the water drip. Without the wire, the rain would tend to "whirl" and its path would be unpredictable.

Optocensors close-up:

Electronic part of the rain gauge

Due to the random nature of the sensor's operation, a software interrupt in the outdoor unit's microcontroller seemed to be a logical approach. Unfortunately, some program commands disable the interrupt mechanism while they are being executed, i.e. there is a possibility that the signal will go nowhere. For these reasons, the rain gauge has its own 08M Picaxe microcontroller.

Using a separate chip allows it to be used to create a 1 hour delay accurate enough to count buckets per hour.

Calibration

Picaxe 18m2 receives the current number of buckets per hour and displays it on the display and computer.

As a starting point, I use the following data:
Funnel diameter 120mm and container area 11.311mm2
1 mm of rain = 11.311 mm3 or 11.3 ml.
Each bucket is 5.65 ml. Thus, 2 buckets 2 x 5.65 = 11.3 ml (or 1 mm) of precipitation. One bucket = 0.5 mm of precipitation.

To check, I bought a cheap rainfall measuring glass.

The above circuit and the 08M Picaxe sensor circuit use the same PCB topology. The device is powered by a 12V 7Ah battery through a 7805 stabilizer.
I used the RF Connect kit for 433 MHz wireless communication. The kit contains a pair of specially programmed PIC controllers. During testing, the set of wireless modules proved to be quite reliable.

The PP is equipped with 08M Picaxe and 18m2. Each of them has its own programming connector. Separate connectors, each with its own +5 V, are dedicated to each sensor - with the exception of temperature and humidity.

Please note that I drew the drawing in Paintshop Pro so I cannot guarantee the accuracy of the pin spacing.

Indoor unit

The indoor unit uses 18m2 Picaxe, pressure sensor and LCD display. There is also a 5V voltage stabilizer.

Pressure meter

After several unsuccessful attempts, I settled on the MPX4115A. Although other sensors have a slightly larger measuring range, they are difficult to access. In addition, other sensors, as a rule, operate on 3.3V and require an additional stabilizer. The MPX4115A produces an analog voltage from 3.79 to 4.25V proportional to pressure. Although this is almost enough resolution to detect a 1 mbar pressure change, after some discussion on the forum, I added the MCP3422 ADC. It can run in 16-bit mode (or higher) compared to Picaxe's 10-bit mode. The MCP3422 can be connected (as in our circuit) in differential mode to the analog input from the sensor. The main advantage is that this allows the sensor output to be adjusted, thereby easily compensating for MPX4115A errors and providing an easy way to calibrate the sensor.

The MPC3422 actually has two differential inputs, but since one is not in use they are closed. The output from the MCP3422 has an I2C interface and connects to the SDA and SCL pins on the 18m2 Picaxe - pins B.1 and B.4 respectively. From my point of view, the only drawback to using the MCP3422 is that it is a small surface mount device, but I soldered it to the adapter. In addition to the I2C interface, the MCP3422 18m2 simply processes incoming data from the 433MHz wireless receiver, displays the data, and transmits the data to the PC. In order to avoid indoor unit errors when the computer is not working, there is no response from the PC. The indoor unit transmits the data and moves on. It transmits data at approximately 2-second intervals so that data losses are quickly compensated for next time. I used the unused 18m2 ports to connect the front panel button. Switch S1 (input C.5) is used to turn on the backlight of the LCD display. Switch S2 (input C.0) resets the pressure value (mbar) on the LCD display. Switch S3 (input C.1) switches the precipitation displayed on the LCD display between the total in the previous hour and the current one. The buttons must be held for more than 1 second for them to respond.

Assembling the indoor unit

As with the PCB for the outdoor unit, I drew the layout by hand using Paintshop Pro, so there may be errors in distances

The board is slightly larger than necessary to fit into the slots in the aluminum case.
I deliberately made the programming connector a little "inward" from the edge of the board to prevent it from touching the case. The cutout for the LCD display is drilled out and adjusted to the exact dimensions.

The photo shows everything already installed in the case.

The pins on the board make it difficult to install into the case, so I had to unsolder them and solder the display to the board with wires.

External unit - Picaxe code

; ===================================================== ================ ; Main 18M2 code for the Picaxe Weather Station Outdoor (Transmitter) Unit ; Decimal precision Humidity & Temperature routines, ; copyright, Peter H Anderson, Baltimore, MD, Jan, "04 ; ; ================================================= ================================ #Picaxe 18M2 Symbol HValue = w0 Symbol HighWord = w1 Symbol LowWord = w2 Symbol RH10 = w3 Symbol HQuotient = b0 Symbol HFract = b1 Symbol X = b0 Symbol aDig = b1 Symbol TFactor = b2 Symbol Tc = b3 Symbol SignBit = b4 Symbol TValue = w4 Symbol TQuotient = b10 Symbol TFract = b11 Symbol TempC_100 = w6 Symbol MagDir = w7 Symbol MagDirLo = b14 Symbol MagDirHi = b15 Symbol WindSpeed ​​= w8 Symbol WindSpeedLo = b16 Symbol WindSpeedHi = b17 Symbol ThisHour = b18 Symbol LastHour = b19 Symbol RainRequest = b20 ; Hardware Symbol HumidRaw = B.7 Symbol TempRaw = B.6 Symbol DirRaw = B. 3 Symbol Speed ​​= B.0 do ; Read Humidity ReadADC10 HumidRaw, HValue ;Get Humidity (HValue) HighWord = 1613 ** HValue ; calculate RH LowWord = 1613 * HValue RH10 = LowWord / 1024 LowWord = Highword * 64 RH10 = RH10 + LowWord RH10 = RH10 - 258 pause 100 ; Read temperature Readtemp12 TempRaw, TValue ; Get temperature SignBit = TValue / 256 / 128 if SignBit = 0 then positive ; It"s negative so TValue = TValue ^ $ffff + 1 ; take twos comp positive: TempC_100 = TValue * 6 ; TC = value * 0.0625 TValue = TValue * 25 / 100 TempC_100 = TempC_100 + TValue TQuotient = TempC_100 / 100 TFract = TempC_100 % 100 / 10 X = TQuotient / 10 ; Calculate temperature correction factor for Humidity if SignBit = 0 then SignBit = " " else SignBit = "-" endif if SignBit = "-" then X = 4 - X else X = X + 4 endif GoSub TempCorrection ; compensate RH HQuotient = RH10 / 10 ; Calculate RH Quotient and... HFract = RH10 % 10 ; ...decimal place. if HQuotient > 99 then ; Over range HQuotient = 99 HFract = 9 endif if HQuotient > 127 then ; Under range HQuotient = 0 HFract = 0 endif ; Read AS540 magnetic encoder for wind direction readadc10 DirRaw, MagDir ; Read from AS5040 magnetic bearing pause 100 ; Read rpm from windspeed counter count Speed, 1000, WindSpeed ​​; Every 30th cycle (approx 1 minute), request rain gauge data from 08M inc RainRequest if RainRequest >= 30 then high C.1 serin , C.0, N2400, ("r"), LastHour, ThisHour ; Rain counters low C.1 RainRequest = 0 endif ; Send data to Indoor Unit in 8 byte blocks ; First group needs no calibration so calculations are done here first. ; Second group will need "tweaking" - more easily done at indoor end. serout C.2, N2400, ("t", SignBit, TQuotient, TFract, HQuotient, HFract, "A", "B") pause 100 serout C.2, N2400, ("m", MagDirHi, MagDirLo, WindSpeedHi, WindSpeedLo, LastHour, ThisHour, "C") loop TempCorrection: Lookup X, (87, 89, 91, 93, 95, 97, 99, 101, 103, 106, 108, 110, 113, 116, 119, 122, 126 ), TFactor " -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 if TFactor< 100 then aDig = TFactor / 10 RH10 = RH10 * aDig / 10 TFactor = TFactor % 10 aDig = TFactor RH10 = RH10 * aDig / 100 + RH10 else TFactor = TFactor % 100 aDig = TFactor / 10 RH10 = RH10 * aDig / 10 + RH10 TFactor = TFactor % 10 aDig = TFactor RH10 = RH10 * aDig / 100 + RH10 endif return

Memory used = 295 bytes out of 2048

Precipitation meter - 08M code

#picaxe 08M Symbol ThisHour = b2 ; Store the current sensor count in b2 Symbol LastHour = b3 ; Save the previous hour"s count in b3 ; Hardware definitions Symbol DataRequest = pin3 Symbol BucketSensor = pin4 setint %00010000, %00010000 ; pin4 is interrupt pin main: for w0 = 1 to 60000 ; Loop for 1 hour pause 60 next LastHour = ThisHour ; Update Last hour's count with ThisHour = 0 ; current hour & reset current hour goto main ; Do the next hour interrupt: setint %00010000, %00010000 ; Re-instate interrupt if DataRequest = 1 then ; Was the interrupt from the 18M2 ? serout 2, N2400, ("r", LastHour, ThisHour) ; Yes, so send previous hour"s count & current count. do: loop while DataRequest = 1 ; Wait until 18M2 stops requesting before continuing endif if BucketSensor = 1 then ; Was the interrupt from the rain sensor? inc ThisHour ; Yes, so increment bucket-tip count do: loop while BucketSensor = 1 ; Make sure flag has cleared sensor before continuing endif return

Indoor unit - Picaxe code

;=================================================== =========================== ; Main Indoor (Receiver) Program. ; ; Receives data from outdoor unit, displays on LCD and passes data on to PC ; Also measures the barometric pressure (thanks to "matherp") ;===================================== ======================================= #PICAXE 18M2 ; Variable Definitions (b2 to b5 are re-used for mBar code when they become available) symbol Quotient = b2 symbol Fract = b3 symbol SignBit = b4 symbol Humidity = b5 symbol HFract = b14 symbol Dir = w5 symbol DirLo = b10 symbol DirHi = b11 symbol Speed ​​= w3 symbol SpeedLo = b6 symbol SpeedHi = b7 symbol RainCountThisHour = b12 symbol RainCountLastHour = b13 symbol LCDRainWhole = b21 symbol LCDRainFract = b22 symbol LastOrThis = b23 ; MCP3422 ADC variables symbol mb900 = 17429 ; ADC reading for 900Mbar, then add 72.288 counts per mbar symbol adj0 = 72 symbol mBarADCValue = w0 symbol adj1 = b4 ; used to add 1 count every 4 mbar symbol adj2 = b5 ; used to add 1 count every 24 mbar symbol mBar = w4 ; Housekeeping variables symbol lastmbar = w8 ; Remember previous mBar reading symbol RiseFall = b18 ; Indicator for pressure rising or falling (up arrow or down arrow) symbol active = b19 ; Telltale shows activity on LCD screen symbol LCD_Status = b20 ; Is LCD Backlight on or off (0 or 1)? ; Hardware Definitions symbol Wireless = C.7 ; Incoming connection from Wireless receiver/decoder symbol Computer = C.2 ; Outgoing serial connection to computer symbol LCD = pinC.5 ; Front-panel button to blank / unblank LCD backlight symbol ClearRiseFall = pinC.0 ; Front-panel button to clear pressure "rising / falling" indicator symbol LastOrThisSwitch = pinC.1 ; Front-panel button to display current or previous hour"s rainfall Init: hsersetup B9600_4, %10000 ; Use LCD Pin 1, no hserin ; ByVac 20x4 IASI-2 Serial LCD hi2csetup i2cmaster, %11010000, i2cfast, i2cbyte ; Initialize I2C for MCP3422 ADC chip. hi2cout (%00011000) ; set MCP3422 for 16 bit continuous conversion pause 500 hserout 0, (13) : pause 100 ; Initialize LCD hserout 0, (13) : pause 100 hserout 0, (13) : pause 100 pause 500 hserout 0, ("ac50", 13) hserout 0, ("ad", 32, 32, 32, 32, 49, 42, 36, 32, 13) ; Define down arrow character (char 10) hserout 0, (" ac1", 13) ; Clear display pause 50 hserout 0, ("acc", 13) ; Hide cursor hserout 0, ("ac81", 13, "ad", $df, "C", 13) ; Print the headings hserout 0, ("ac88", 13, "admBar", 13) hserout 0, ("ac8e", 13, "adRH %", 13) hserout 0, ("acd5", 13, "ad", "dir" , 13) ; Print footings hserout 0, ("acdc", 13, "ad", "mph", 13) ; hserout 0, ("ace3", 13, "ad", "mm", 13) lastmbar = 0 ; Initialize variables LastOrThis = "c" ;======================================================= ================================== ; Main Loop ;============================================================================ =========================== main: ; Check if a front-panel switch is pressed. The Picaxe interrupt mechanism is ; almost permanently disabled due to the large number of serin and serout commands ; so sprinkling the program with "gosub switches" to check the switch status is more ; effective that interrupts. gosub switches ; Get first group of values ​​from outdoor unit via 433MHz radio link. serin Wireless, N2400, ("t"), SignBit, Quotient, Fract, Humidity, HFract, b15, b15 ; Flash "telltale" on LCD to indicate activity and successful "serin" from wireless. gosub telltale; Display first group on LCD hserout 0, ("acc0", 13) hserout 0, ("ad", SignBit, #Quotient, ".", #Fract, " ", 13) hserout 0, ("acce", 13) hserout 0, ("ad", #Humidity,".", #HFract, " ", 13) gosub switches ; Send first group to computer COM port ; Each group has a start identifier, data and an end identifier: ; Start = "xS", End is "xE" eg Wind Start is WS, Wind End is WE ; Multiple data are separated by a single space character. serout Computer, N2400, ("TS", SignBit, #Quotient," ", #Fract, "TE"); Temperature serout Computer, N2400, ("HS", #Humidity, " ", #HFract, "HE"); Humidity; Check switches again and at regular intervals throughout the program. gosub switches ; Get second group of values ​​from outdoor unit radio link. serin Wireless, N2400, ("m"), DirHi, DirLo, SpeedHi, SpeedLo, RainCountLastHour, RainCountThisHour, b15 gosub telltale Speed ​​= Speed ​​* 300 / 448 ; Estimated conversion from pulses/sec to mph Dir = Dir * 64 / 182 ; Convert 0 - 1023 to 0 - 359 degrees ; To preserve precision, rain gauge has to be calibrated by adjusting the ; mechanical stops on the tipping bucket so that 1 tip is 0.5 mm of rain. if LastOrThis = "c" then ; Decide whether to display previous hour"s LCDRainWhole = RainCountThisHour / 2 ; rainfall or the current hour"s. LCDRainFract = RainCountThisHour * 5 // 10 else LCDRainWhole = RainCountLastHour / 2 ; LCDRainFract = RainCountLastHour * 5 // 10 endif ; Send second group to LCD hserout 0, ("ac95", 13) hserout 0, ("ad", #Dir, " ", 13) hserout 0, ("ac9c", 13) hserout 0, ("ad", # Speed, " ", 13) hserout 0, ("aca1", 13) hserout 0, ("ad", LastOrThis, " ", #LCDRainWhole, ".", #LCDRainFract, " ", 13) ; Send second group to computer COM port serout Computer, N2400, ("WS", #Dir," ", #Speed, "WE"); Wind serout Computer, N2400, ("RS", #RainCountLastHour," ", #RainCountThisHour, "RE"); Rain gosub switches; Thanks to "matherp" on the Picaxe forum for the mbar code loop: ; Measuring atmosperic pressure with a MPX4115A ; Analogue to digital conversion using a MCP3422 ; MPX output to V+, 2. 5V to V- ; ADC in 16 bit mode hi2cin (b1,b0,b2) ; Read in the ADC reading and the status byte from MCP3422 adj1 = 0 adj2 = 0 w1 = mb900 mbar = 900 do while mBarADCValue > w1 ; mBarADCValue = w0 = b1:b0 inc mbar w1 = w1 + adj0 inc adj1 if adj1 = 4 then inc adj2 w1 = w1 + 1 adj1 = 0 endif if adj2 = 6 then w1 = w1 + 1 adj2 = 0 endif loop gosub switches gosub telltale; Send pressure to computer COM port serout Computer, N2400, ("PS:", #mbar, "PE"); Initialize previous pressure reading (lastmbar) if not already set if lastmbar = 0 then lastmbar = mbar RiseFall = " " endif ; Display up arrow or down arrow if pressure has changed if mbar > lastmbar then RiseFall = "^" ; ^ lastmbar = mbar endif if mbar< lastmbar then RiseFall = 10 ; Custom LCD character. Down arrow lastmbar = mbar endif hserout 0, ("acc7", 13) hserout 0, ("ad", RiseFall, #mbar, " ",13) gosub telltale goto main ; Check if one of the front panel buttons is pressed. switches: if LCD = 1 then ; LCD Backlight on/off Button is pressed if LCD_Status = 0 then ; Backlight is on so... hserout 0, ("ab0", 13) ; Turn it off LCD_Status = 1 else hserout 0, ("ab1", 13) ; Else turn it on. LCD_Status = 0 endif do: loop while LCD = 1 ; Don"t return while button is pressed endif if ClearRiseFall = 1 then ; Pressure rise/fall button is pressed RiseFall = " " ; Clear indicator and... hserout 0, ("acc7", 13) ; ... update display. hserout 0, ("ad", RiseFall, #mbar, " ",13) do: loop while ClearRiseFall = 1 endif if LastOrThisSwitch = 1 then ; Rain Previous Hour / Last Hour button. if LastOrThis = "c" then LastOrThis = "p" LCDRainWhole = RainCountLastHour / 2 ; Recalculate values and re-display to LCDRainFract = RainCountLastHour * 5 // 10 ; give visual confirmation of button-press else LastorThis = "c" LCDRainWhole = RainCountThisHour / 2 ; LCDRainFract = RainCountThisHour * 5 // 10 endif hserout 0, ("aca1", 13) hserout 0, ("ad", LastOrThis, " ", #LCDRainWhole, ".", #LCDRainFract, " ", 13) do: loop while LastOrThisSwitch = 1 endif return ; Flash "tell-tale" on LCD display to show activity telltale: if active = "*" then active = " " else active = "*" endif hserout 0, ("ac80", 13, "ad", active, 13) return

Memory used = 764 bytes out of 2048

PC Software

The software running on the PC was written using Borland Delphi 7. It's quite primitive in its current form, but it at least shows Picaxe's connection to the computer.

Graphs can be selected to be shown in 1 hour or 12 hour periods. The graphs can be scrolled back and forth using the mouse. They can be saved. To do this, you need to right-click on them and specify the name and value file. You can configure a limited set of APRS data that is written once per minute per line of the APRS.TXT file and that is saved in the same folder as Weather.exe. Note that the temperature is in degrees Fahrenheit and the precipitation is in 1/100ths per inch.

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
Temperature and relative humidity sensor
temperature sensor

DS18B20

1 To notepad
Humidity sensorHIH-36101 To notepad
Resistor

4.7 kOhm

1 To notepad
Wind speed and direction meter
PhototransistorIR1 To notepad
Light-emitting diodeIR1 To notepad
Resistor

220 Ohm

1 To notepad
Resistor

4.7 kOhm

1 To notepad
Magnetic encoder1 To notepad
Electrolytic capacitor10 µF4 To notepad
Capacitor100 nF1 To notepad
Resistor

4.7 kOhm

1 To notepad
Resistor

10 kOhm

1 To notepad
Precipitation meter
MK PICAXE

PICAXE-08M

1 To notepad
Rectifier diode

1N4148

2 To notepad
Capacitor100 nF1 To notepad
Resistor

4.7 kOhm

1 To notepad
Resistor

10 kOhm

4 To notepad
Resistor

22 kOhm

1 To notepad
Resistor

220 Ohm

2 To notepad
Light-emitting diodeIR1

Once I came across the question of how one can determine whether there is wind in the place where he lives. This question arose because he wanted to install a wind turbine to generate electricity. Using this ingenious device, you can take measurements of how often the wind blows, at what average speed it blows, and so on. The basis for collecting and processing information is the Arduino board.

Materials and tools for making an anemometer:
- a piece of square pipe;
- Bulgarian;
- welding;
- bearing;
- sweep;
- nails;
- dye;
- LED-phototransistor sensor (can be removed from the printer);
- Arduino circuit;
- minimum set of tools.

Manufacturing process:

Step one. Making an anemometer sensor
To make a sensor, you need to take a piece of a square pipe and then cut a window in it, through which the filling will then be installed. A metal plate needs to be welded inside this pipe; it will act as a bearing holder. Then another plate is welded to fix the lower bearing.


Next, the workpiece is clamped in a vice and the diameter of the drill is 0.5 mm less than the diameter of the bearing in the bottom cover and a hole is drilled in the middle. Both are needed for bearings. To ensure that the bearings fit into place with tension, the size of the holes is adjusted using a reamer. Once the bearings were installed, a 100-gauge nail was inserted into them. In the middle of the window, a plastic washer with four slots is placed on it. A thread was cut from the bottom of the nail and then the impeller was screwed onto this axis.

Step two. Impeller manufacturing process
To make an impeller you need to take a nut and weld three nails to it with a 2mm electrode. The ends of the nails are trimmed and threaded. Then the halves of the ball are put on the ends.

A hexagonal stainless steel rod was welded to the body as a holder. And to prevent the body from rusting, it was covered with white enamel.




In order for the sensor to read information, you need a washer with slots. The author took it out of an old ball-point computer mouse. When the slot passes in front of the LED phototransistor sensor, it sends a signal to the electronics.

As for the impeller blades, they were first made from tennis balls. With this size of blades, the impeller starts in winds of 5 m/s. To make the impeller more sensitive, balls with a diameter of 55 mm were purchased; in this case, the impeller begins to rotate already at m/s. In this case, measurements are carried out up to 22 m/s.

Step three. Electronic part
As an electronic circuit, the author first used a homemade LUT circuit with the addition of a green maxi from China. But the system could not show wind speed in meters/second. It only displayed the number of revolutions.







At the moment the circuit is being assembled on Arduino. The operating principle of the author's anemometer is exactly the same as that of a computer mouse. Now you just need to connect the two circuits.

It was decided to transmit pulses from the phototransistor to Arduino, and the circuit began to perceive such signals as button presses. To get the wind speed, you just need to count how many button presses there are during a certain time, say, per second. However, not everything is so simple; to convert the impeller rotation frequency into wind speed m/s, a special formula is required. The author is happy to share it.

Anemometer - wind speed meter

Finally it came to the anemometer. Having already made three wind generators, I still don’t know exactly what wind and how much my windmills produce. Now there is only one wind generator in operation, my most successful one, although it was assembled entirely “on the knee”. I can roughly imagine the strength of the wind and can distinguish a wind of 5 m/s from 10 m/s, but I still want to know the wind speed more accurately in order to determine the power of the wind generator.

For several days, from time to time, I thought about something to make an anemometer out of, but nothing sensible had yet emerged from the rubbish available at home. I found two small motors from a DVD player, but they are too tiny and it’s hard to come up with blades for a thin shaft.

A car fan caught my eye, the kind they usually install in trucks. So I tortured him. I disassembled and took out the motor. The blades of the propeller were broken and only the base remained – the central part that fits onto the shaft. Then I thought about what kind of blades to attach to it, I tried the bottoms of plastic bottles and cans, but I didn’t like all this.

Then I found a piece PVC pipes with a diameter of 5 cm and a length of 50 cm. I made 4 blades from it, I simply cut the pipe lengthwise into two halves, and the halves, each into two parts, to make 4 blades. In the base, which remained from the original propeller, I drilled 4 holes for attaching the blades, and also made 4 holes in the blades. I screwed the whole thing together and got a four-bladed propeller - a savonius (the first “serious” vertical).

Well, then I found the wires of the required length, spliced ​​together 5 meters of antenna cable and 8 meters of regular cable. I immediately connected the wires in order to measure the parameters taking into account the length of the wire, since the data may differ if measurements are taken on a meter wire, or on 13 m.

Then I found a piece of metal tube about 80-90 cm long, bent it into a Z shape and attached a motor. The anemometer will be attached to the mast with this tube. There is nothing complicated here, you can use any available material.

Well, then, once I had completely assembled the anemometer, I installed it on my motorcycle to calibrate it. In the photo below you can see how it was done, everything is primitive and simple. On the mirror of the primates there was a multimeter with electrical tape, in general, I somehow secured everything to free my hands to control the motorcycle.

This autumn day was very successful due to the almost complete absence of wind, which, by the way, served to quickly assemble the anemometer; such a day should not be wasted. I didn’t want to go on the asphalt, since with an incomprehensible contraption on the front of the motorcycle I would attract attention, so I decided to ride through the fields along the forest plantations.

I rode back and forth and in different directions and recorded multimeter readings on my phone at different speeds. The anemometer started at a speed of 7 km/h, and I gradually skated back and forth at different speeds, starting from 10 km/h and a maximum of 40 km/h, it was possible to do more, but the dirt roads are very uneven and you won’t accelerate very much.

After the rides, the following data emerged. The multimeter showed at 10km/s =0.06V, at 20km/h=0.12V, at 30=0.20V, at 40km/h=0.30V.

Then, using a calculator, I calculated the readings for intermediate wind speed values.

Volts - wind speed m/s.

I calculated the data above 11 m/s by drawing on a piece of paper a graph of the voltage increase depending on the wind speed, which smoothly continued to 15 m/s. That same day, or rather in the evening, I installed an anemometer on the mast of the wind generator. I lowered the windmill and attached the anemometer below. I temporarily pulled the pipe onto a wire and wrapped it with additional electrical tape, it seemed to be strong. Well, then I put the whole thing back into place and now next to the wind generator on the mast there is now an anemometer, which starts at 3 m/s and regularly shows the wind speed.

Below in the photo is an already raised wind generator with an attached anemometer. I didn’t take photographs in more detail, since there’s nothing complicated there and there’s nothing to repeat. An anemometer can be assembled from anything, from almost any motor. Of course, it is more convenient to calibrate by car. It’s more comfortable and convenient, and the speedometer is more accurate. But I decided on a motorcycle, and it also seemed to work out well, I hope if the speedometer is lying, it’s not by much.

That's all for now, this is the first version of this anemometer, and I think not the last. In the meantime, I’ll wait for the wind and find out what my wind generator produces. Well, I’ll supplement this article with this data. Or maybe something will have to be redone.

Addition

The anemometer screw, which is not loaded with anything, reacts sharply to every gust and change in wind speed. But the loaded propeller of this wind generator still lags in reactions, and because of this, the data in the readings is not synchronous. Today the wind is 3-7 m/s, the anemometer actually caught a couple of gusts up to 10 m/s, but they lasted less than a second and the wind generator simply did not have time to react to them.

After some time of observation, some average current values ​​from the wind generator were drawn at a certain wind. The propeller starts at 3.5-4 m/s, charging 0.5A at 4m/s, 1A at 5m/s, 2.5A at 6m/s, 4A at 7m/s, 5A at 8m/s. These data are averaged, since the ammeter is an analog ammeter, and I can make an error of up to 0.5A in the current readings from the wind generator.

DIY anemometer
Finally I made an anemometer and calibrated it while riding a motorcycle. I took a car fan as a basis and assembled an anemometer from scrap materials.


DIY wind speed meter

The task arose to assemble an anemometer for one project so that data could be taken on a computer via a USB interface. This article will focus more on the anemometer itself than on the system for processing data from it:

1. Components

So, to manufacture the product, the following components were needed:
Mitsumi ball mouse - 1 pc.
Ping-pong ball - 2 pcs.
A piece of plexiglass of suitable size
Copper wire with a cross section of 2.5 mm2 - 3 cm
Rod from ballpoint pen- 1 PC.
Chupa Chups candy stick - 1 pc.
Cable clip - 1 pc.
Hollow brass barrel 1 pc.

2. Impeller manufacturing

3 pieces of copper wire, each 1 cm long, were soldered to the brass barrel at an angle of 120 degrees. In the hole of the barrel I soldered a stand from a Chinese player with a thread at the end.

I cut the candy tube into 3 pieces about 2 cm long.

I cut 2 balls in half and, using small screws from the same player and polystyrene glue (with a glue gun), attached the ball halves to the lollipop tubes.

I placed the tubes with the ball halves on soldered pieces of wire and secured everything on top with glue.

3. Manufacturing of the main part

The supporting element of the anemometer is a metal rod from a ballpoint pen. I inserted a mouse disk (encoder) into the lower part of the rod (where the plug was inserted). In the design of the mouse itself Bottom part The encoder rested against the mouse body to form a point bearing; there was lubricant there, so the encoder rotated easily. But it was necessary to fix the upper part of the rod, for this I selected a suitable piece of plastic with a hole exactly the diameter of the rod (such a piece was cut from the CD-ROMa carriage ejection system). It remained to solve the problem of ensuring that the rod with the encoder did not fall out of the point bearing, so I soldered a few drops of solder on the rod directly in front of the holding element. Thus, the rod rotated freely in the holding structure, but did not fall out of the bearing.

The reason why a circuit with an encoder was chosen is as follows: all the articles about homemade anemometers on the Internet described their manufacture based on a DC motor from a player, CD-ROM, or some other product. The problem with such devices is, firstly, their calibration and low accuracy at low wind speeds, and secondly, the nonlinear characteristic of wind speed in relation to the output voltage, i.e. There are certain problems in transferring information to a computer; you need to calculate the law of changes in voltage or current depending on wind speed. When using an encoder, there is no such problem, since the dependence is linear. The accuracy is the highest, since the encoder gives about 50 pulses per revolution of the anemometer axis, but the converter circuit is somewhat more complicated, which contains a microcontroller that counts the number of pulses per second on one of the ports and outputs this value to the USB port.

4. Testing and calibration

A laboratory anemometer was used for calibration

Wind speed meter
Anemometer master class with photos do it yourself master class


Measuring wind speed with homemade instruments for homemade wind generators.

Originally published at Professionally about energy. Please leave any comments there.

So you decided to make a wind generator with your own hands. EnergyFuture.RU has written more than once about various designs homemade wind generators and permanent magnet generators on them, including the famous designs of Hugh Pigot (full archive here). It is very important to understand and practically determine the available wind force in your area before starting. This is what this article is actually about. Observe, measure and record in a journal for statistics. like at school!

Wind speed- one of the main characteristics of air flow, because it determines its energy. It is measured in meters per second ( m/sec) and is denoted by the Latin letter V. The higher the wind speed, the greater the energy contained in the flow.

Various instruments are used to measure wind speed: weather vanes, anemometers and others. The simplest device for measuring wind speed is the Wild weather vane (actually an outdated thing, with one advantage - it’s easy to build with your own hands).

TO rod-1 rigidly attached keel-2, which, when the wind direction changes, sets plate-3 perpendicular to the direction of flow. The plate has the ability to swing relative axis-4. Accordingly, the stronger the wind, the greater the deflection of the plate. Determine wind strength using pointer-5.

For measurement accuracy, the plate should have a size of 150 X 300 mm and a weight of 200 grams for areas with light winds, and 800 grams for areas with winds of more than 6 m/sec.

The indicator divisions have conventional meanings, so to determine the wind speed you should use table.

For those who are not interested in relative accuracy, there is another way to determine wind speed - by external signs.

Measuring wind speed with homemade instruments for homemade wind generators
Originally published at Professionally about energy. Please leave any comments there. So you decided to make a wind generator with your own hands. EnergyFuture.RU has written more than once about various designs of homemade wind generators and permanent magnet generators on them, including...



How to make an anemometer with your own hands

The rotation unit of the Gotlvlk block now becomes the heart of the anemometer. After removing unnecessary parts (rotating transformer, magnetic head and motor parts), what remained was the metal frame of the rotating head with the axis, the stationary part with the bearing block and the motor mounting washer. The unit is quite massive, so the future anemometer will be designed more for measuring wind speeds from medium to strong. In principle, these measurements are necessary.

1. Let's modify the rotation head. Using a metal drill, drill into the side surface

rotating part 3 holes with a diameter of 4 mm for attaching cups. When drilling, we focus on three holes in the head for fastening the internal components.

2. Insert screws into the holes M4 10mm long, for better contact with the cups from the bicycle inner tube, we will cut rubber washers with scissors to prevent rotation of the anemometer cups.

Screw with rubber washer

3. As cups Plastic mugs were used, specially purchased in a store for 7 rubles. Each mug is modified:

A hole with a diameter of 4 mm was drilled on the side surface in the area of ​​the former handle.

Anemometer mugs

Anemometer mug

Hole in cup

4. Screw the cups to the rotation unit using a washer and nut. Screw it on carefully without damaging the glass. Make sure that the protruding parts of the rubber washer do not touch the fixed unit when assembling. We assemble the structure and check the ease of rotation.

The rotation unit is assembled. Now you need to think about installing the rotation sensor and securing the unit. It is optimal to use a reed switch as a sensor, triggered by a magnet attached to a rotating unit. The frequency of rotational pulses can be converted into an estimate of wind speed using analogue or digital circuits. But you can take a simpler route - use a cycling computer.

Let's install a cycling computer sensor in the anemometer

1. Glue a magnet

on the rotating part of the assembly. During fastening, you can at the same time carry out work on balancing the rotation unit. The magnet is used from the bicycle computer kit; it is only taken out of the plastic container with which it is attached to the spokes of the bicycle. Balancing is necessary to eliminate beats when the anemometer rotates and, as a result, the pole swings and the appearance of extraneous sounds in the fastening points.

2. Drill in the fixed part

assembly, a hole with a diameter of 7 mm and glue the reed switch sensor of the cycling computer in a plastic case. When gluing the sensor, I assembled the assembly, placed a 1mm thick piece of cardboard on the magnet, inserted the sensor, lubricated with glue, into the hole in the right place until it touched the cardboard, and coated it with additional glue. This method of installing the sensor allows you to maintain a minimum gap between the magnet and the sensor and ensure its reliable operation.

3. Check the operation of the node for the absence of touches and for the reliability of the sensor response (we check it with a tester).

Attachment point

Connecting the cable

Setting up a homemade anemometer

To adjust the anemometer readings, ideally use a real anemometer. I have held this miracle in my hands only five times in my life. Therefore, I used the standard method, attaching the anemometer to a wooden handle. And when driving a car in calm weather, I set up the bike computer to match the readings with the speedometer. In my cycling computer, the setting consisted of selecting the value of the wheel radius in millimeters. Let's remember the value of the found radius (it’s better to write it down), otherwise when changing the battery the computer will forget the settings. The goal was not to obtain super-accurate readings. Everything is set.

Anemometer installation

It is better to install the anemometer on a long pole away from buildings or on the roof of a house. During installation, we think through all the steps, prepare tools and fastening materials. It is useful to install the pole without an anemometer, make mounting holes and holes for cable penetration. We fix the anemometer on the pole and carefully mount the structure. We pass the cable inside the building and connect the cycling computer.

Homemade anemometer with your own hands
Instructions for making a homemade anemometer are shown.


Winds range from light breezes to sudden, gusty squalls that bring destruction and death. The strongest winds are hurricanes. Such hurricane-force winds form over the oceans in the tropics when huge masses of air are sucked into areas of low pressure. Storm clouds often swirl around the center (or eye) of a hurricane at speeds faster than an express train.

You may have never experienced hurricane-force winds, but no matter where you live, you've probably experienced both calm and windy days. Make an anemometer, a simple device for measuring wind speed, and record the wind strength in your area on a windy day.

You will need:

Thick wooden dowel
thin wooden rods
rope and plumb line
yogurt cup
adhesive tape (waterproof)
thumbtacks
colored cardboard
copper tube
glue
scissors

1. Take a thick wooden dowel and insert it firmly into copper tube. This will be the anemometer stand.

2. Ask an adult to help drill a hole through the counter. The diameter of the hole should correspond to the thickness of one of the thin rods. Make a slot on one end of this thin rod. Insert it into the rack and secure it as shown in the picture.

3. Cut out the tip and fletching of the arrow from cardboard and secure it to the ends of a thin rod.

4. Cut out a quarter circle from colored cardstock and attach it to the arrow using duct tape.

5. Take a large yogurt cup. Glue it to one end of a second thin piece of wood.

6. Have an adult help you drill a small hole at the other end of the second rod, then pin or nail it to the top of the post. Make sure the rod can rotate freely.

7. Choose a suitable location for outdoor observation. Drive the copper pipe into the ground and then insert the post into it. Secure the stand in the desired position using the thumbtack. Install the stand strictly vertically, hanging a plumb line from the arrow (you can use a nut as a plumb line). The plumb rope must hang strictly parallel to the stand.

The wind turns the anemometer needle so that it points in the direction from which the wind is blowing.
The yogurt cup and the rod along with it will rise to the top. The stronger the wind, the higher the indicator rod rises.

Beaufort scale

This is a scale for measuring wind speed, based on observations of nature. The scale was invented by the English admiral Sir Francis Beaufort almost 200 years ago.

Wind speed on weather maps is indicated by the number of bars on the wind force icon.

Wind speed Verbal description Signs of estimating wind speed
m/sec km/hour point
Beaufort
0,0-1,5 0,0-1,8 0 Calm The smoke rises vertically or almost vertically, the leaves are motionless
0,6-1,7 1,9-5,1 1 Quiet wind Wind direction is determined by smoke
1,8-3,3 5,2-11,7 2 Light breeze The movement of the wind is felt by the face, the leaves rustle
3,4-5,2 11,8-18,7 3 Light wind The leaves and thin branches of the trees are constantly swaying, the wind flutters light flags, the sea is covered with a continuous light wave
5,3-7,4 18,8-26,6 4 Moderate wind The wind raises dust, sets thin tree branches in motion, and white “lambs” occasionally appear on individual waves, quickly disappearing.
7,5-9,8 26,7-35,3 5 Fresh breeze Thick tree branches sway; "lambs" are visible on every wave
9,9-12,4 35,4-44,0 6 Strong wind Thick tree branches are swaying, telegraph wires are humming, the “lamps” on the waves are longer (5-10 sec.)
12,5-15,2 44,1-54,7 7 strong wind The tops of the trees sway, large branches bend, it is uncomfortable to walk against the wind. Foaming waves on the sea
15,3-18,2 54,8-66,0 8 Very strong wind The wind breaks thin branches and dry branches of trees, making movement difficult
18,3-21,5 66,1-77,5 9 Storm The wind resets chimneys, tiles. Walking against the wind is very difficult.
21,6-25,1 77,6-90,2 10 Heavy storm Significant damage, trees uprooted
25,2-29,0 90,3-104,4 11 Fierce Storm Major destruction: telegraph poles, carriages knocked down
More than 29.0 Over 104.4 12 Hurricane Destroys houses, causes great destruction

It should have turned out something like this

Stages of manufacturing the sensor itself:

The body did this: he took a piece of a square pipe and cut out a window in it so that the filling could be mounted through it (by the way, I cut out the window with the temperature, but I really wanted to do it that I got up and went to saw). Then I welded the plate inside (the inner bearing holder), then welded the bottom (the lower bearing holder). When I decided to make the top I decided to make a pitched roof, for this I cut out four triangles and carefully grabbed them, and then completely welded them and made a pointed visor. Then I clamped it in a vice and, using a drill 0.5 mm smaller than the diameter of the bearing, drilled a vertical hole in the bottom cover and in the middle one, both for bearings. So that the steel bearings are adjusted with tension using a reamer. The bearings fit like originals. Then I inserted a slightly polished 100-point nail into them, placing a plastic washer with 4 slots on it in the middle of the window. I cut a thread on the bottom of the nail and screwed the impeller onto it.

I made the impeller like this: I welded three nails to the nut with a double electrode, then I cut them off and cut a thread at the ends, which I screwed on the halves of the ball.

A holder - a hexagonal stainless steel rod - was welded to the body. The body itself was painted with white enamel twice to ensure it would not rust.

I decided not to invent a bicycle, but to do it like in a computer mouse, there is a plastic washer with four slots on the axis of rotation, when the impeller rotates, it rotates and the washer, while the openings flash above the sensor, which is attached to the front cover, and when the cover is screwed on, it is like Once it becomes so that the washer with the slots rotates and the light flux from the LED to the phototransistor steps in and out. That's it... here you have impulses, and they can be counted and given the number of revolutions per second.

I pulled the LED phototransistor sensor out of the printer, there are a lot of them there.

First made from tennis balls

I had to modify the device a little. Using an impeller made of tennis balls, he started in a wind of 5 m/s. Balls with a diameter of 55 mm were purchased at a children's toy store. It starts at 2 m/s and measures up to 22 m/s, that’s enough for me.

After the sensor was ready. It was necessary to make electronics.

The first option was a homemade LUT technology + a green mask from China that dries under ultraviolet light.

55 in the photo is revolutions per second. It was necessary to somehow convert it to m/s. I thought for a long time about how, I even got two anemometers, an old one from the USSR and a Chinese one for $50, but there were problems with verification, because the wind is gusty and does not blow consistently.

So I came up with this idea: on a day off, Dad and I found a 2 km flat road outside the city without cars, without wind and with trees planted on both sides (Dad was driving and I sat halfway outside the window) and let’s drive back and forth. First, I set up the USSR and Chinese anemometers, I made sure that they both showed the same and correctly, because if you divide the speed on the car’s speedometer by 3.6, you get the figure that the anemometers showed in m/s. Dad drove at the same speed and the instruments showed the same wind. This is how I tested my device. Dad added +5 km per hour each time, and I wrote down a new indicator (revolutions per second). The measurements were carried out three times. When we drove more than 80 km/h (22 m/s), my anemometer could no longer spin up and the number froze, because it does not measure more than 22 m/s....

By the way, Chinese showed up to 28m/s. USSR cue up to 20m/s. When I installed it in a place with a modified program, I checked it again with the Chinese one, everything agreed.

Now it is being converted for Arduino.

There are plans to add this to the smart home system so that you can log in from your smartphone and control the loads in the house, look at the temperature in the house (for me this is important, sometimes the gas is turned off in the winter and it’s good to see what the temperature is) there will also be a gas sensor, and there will be a plus display the wind speed near the house.

Video of work

Winter work results

s-st --- hours over the winter
0 m/s --- 511.0
1 m/s --- 475.0
2 m/s --- 386.5
3 m/s --- 321.2
4 m/s --- 219.0
5 m/s --- 131.5
6 m/s --- 63.3
7 m/s --- 32.5
8 m/s --- 15.4
9 m/s --- 9.1
10 m/s --- 5.0
11 m/s --- 3.5
12 m/s --- 2.2
13 m/s --- 1.3
14 m/s --- 0.8
15 m/s --- 0.5
16 m/s --- 0.5
17 m/s --- 0.2
18 m/s --- 0.0
19 m/s --- 0.1


Based on the results of two winters, I saw that my winds were not strong and the windmill would not be effective, so I made a small one with 50cm blades. peak power 150 W. I just made sure that at least one economical light bulb would shine when the light went out.

Now a little about Arduino.

I found a diagram of how the mouse works on the Internet; it clearly illustrates how my system works.

Based on the mouse diagram, I made the following diagram.

The pulses come from the phototransistor to the Arduino, and it perceives them as button presses.

The algorithm of the program is as follows: We count how many button presses occurred in one second, and here we have the rotation frequency. In order to convert this frequency to m/s. Even when I was doing it on Atmel, I made an algorithm for calculating the frequency in m / s. He looked like this:

int ob_per_sec=0; // Variable that contains the revolutions per second.

int speed_wind=0; // The value will go here after converting the frequency to m/s.

int speed_wind_max=0; // The maximum value of wind readings m/s falls here.

int speed_wind_2=0; // Number of seconds from the start of the program with a wind speed of 2 m/s.

int speed_wind_3=0; // Number of seconds from the start of the program with a wind speed of 3 m/s.

int speed_wind_4=0; // Number of seconds from the start of the program with a wind speed of 4 m/s.

int speed_wind_5=0; // Number of seconds from the start of the program with a wind speed of 5 m/s.

…………………………………………………………..

int speed_wind_22=0; // Number of seconds from the start of the program with a wind speed of 22 m/s.

if (ob_per_sec >0 && ob_per_sec<4) { speed_wind=2; speed_wind_2++;}

if (ob_per_sec >4 && ob_per_sec<7) { speed_wind=3; speed_wind_3++; }

if (ob_per_sec >7 && ob_per_sec<11) { speed_wind=4; speed_wind_4++; }

if (ob_per_sec >11 && ob_per_sec<15) { speed_wind=5; speed_wind_5++; }

if (ob_per_sec >15 && ob_per_sec<18) { speed_wind=6; speed_wind_6++; }

if (ob_per_sec >18 && ob_per_sec<23) { speed_wind=7; speed_wind_7++; }

if (ob_per_sec >23 && ob_per_sec<27) { speed_wind=8; speed_wind_8++; }

if (ob_per_sec >27 && ob_per_sec<30) { speed_wind=9; speed_wind_9++; }

…………………………………………………………..

if (ob_per_sec >60 && ob_per_sec<67) { speed_wind=22; speed_wind_22++; }

if (speed_wind> speed_wind_max)( speed_wind_max = speed_wind ;) // check and rewrite if the maximum value is greater than the previous one recorded.

And display the value on the screen.

If necessary, you can then view how many minutes the wind blew at a certain speed; to do this, you need to display the variable (with the necessary speed index) speed_wind_№ (but divide it by 60 to get minutes.).

In my program I did this: when you press a certain button, all the variables are displayed one by one, from speed_wind_1 to speed_wind_22.