{"id":651,"date":"2025-07-04T22:03:56","date_gmt":"2025-07-04T20:03:56","guid":{"rendered":"https:\/\/blog.bratfisch.net\/?p=651"},"modified":"2025-07-22T01:26:45","modified_gmt":"2025-07-21T23:26:45","slug":"a-beelogger-on-esp32-basis-part-6-test-setup-the-wind-speed-sensor-anemometer","status":"publish","type":"post","link":"https:\/\/blog.bratfisch.net\/index.php\/2025\/07\/04\/a-beelogger-on-esp32-basis-part-6-test-setup-the-wind-speed-sensor-anemometer\/","title":{"rendered":"A beelogger on ESP32 basis, part 6: Test setup: The wind speed sensor (anemometer)"},"content":{"rendered":"\n<p>I bought a wind speed sensor from china, it&#8217;s a spare part for the &#8220;misol&#8221; weather stations, just search for &#8220;wind speed misol sensor aliexpress&#8221; for the product, it was less than 15\u20ac.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"720\" data-id=\"777\" src=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/S638656a704874b889dcb339a3f83806cB_bria.png\" alt=\"\" class=\"wp-image-777\" srcset=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/S638656a704874b889dcb339a3f83806cB_bria.png 960w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/S638656a704874b889dcb339a3f83806cB_bria-300x225.png 300w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/S638656a704874b889dcb339a3f83806cB_bria-768x576.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"720\" data-id=\"778\" src=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/Sdc623df1aec04b9fbbcfab41605559d1j_bria.png\" alt=\"\" class=\"wp-image-778\" srcset=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/Sdc623df1aec04b9fbbcfab41605559d1j_bria.png 960w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/Sdc623df1aec04b9fbbcfab41605559d1j_bria-300x225.png 300w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/Sdc623df1aec04b9fbbcfab41605559d1j_bria-768x576.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"370\" data-id=\"800\" src=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/pasted-image_u2net-2.png\" alt=\"\" class=\"wp-image-800\" srcset=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/pasted-image_u2net-2.png 607w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/pasted-image_u2net-2-300x183.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/figure>\n<\/figure>\n\n\n\n<p><br>I unscrewed it to see how it works, technically it&#8217;s just a hall sensor. <br><br>For my test-setup, I simply cut off the connector (Don&#8217;t do this if you want to use it in combination with the wind direction sensor, it&#8217;s intended to be plugged in there!) and connected the wires directly to GND and GPIO4 and used the internal pull-up resistor:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"750\" src=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/beelogger-wind-speed-sensor_bb-1.png\" alt=\"\" class=\"wp-image-835\" style=\"width:auto;height:300px\" srcset=\"https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/beelogger-wind-speed-sensor_bb-1.png 693w, https:\/\/blog.bratfisch.net\/wp-content\/uploads\/2025\/07\/beelogger-wind-speed-sensor_bb-1-277x300.png 277w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p>Adding it to esphome is straight forward and easy. I&#8217;m using the <a href=\"https:\/\/esphome.io\/components\/sensor\/pulse_counter.html\" data-type=\"link\" data-id=\"https:\/\/esphome.io\/components\/sensor\/pulse_counter.html\">pulse counter component<\/a>, it uses the <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/latest\/api-reference\/peripherals\/pcnt.html\">pulse counter peripheral of the ESP32<\/a> and works in standby-modes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>substitutions:\n  update_interval: 5s\n\nsensor:\n - platform: pulse_counter\n   name: \"Wind Speed Counter\"\n   id: windspeed_pulse_counter\n   use_pcnt: true\n   count_mode: \n     falling_edge: INCREMENT\n     rising_edge: DISABLE\n   pin:\n     number: GPIO4\n     inverted: true\n     mode:\n       input: true\n       pullup: true\n   unit_of_measurement: \"km\/h\"\n   icon: \"mdi:windsock\"\n   update_interval: ${update_interval}\n   filters:\n     - multiply: 0.04\n     - debounce: 10ms\n   total:\n     name: \"Wind Speed Counter Total Pulses\"<\/code><\/pre>\n\n\n\n<p>The value &#8220;0.04&#8221; is 2.4kmh\/60s (to convert it from esphome&#8217;s pulses\/min to km\/h). The value 2.4km\/h is explained here in the datasheets I found in <a href=\"https:\/\/github.com\/Nik71git\/stazione-meteo\/wiki\" data-type=\"link\" data-id=\"https:\/\/github.com\/Nik71git\/stazione-meteo\/wiki\">this wiki<\/a> that seem to match my hardware:<br><a href=\"https:\/\/github.com\/Nik71git\/ESP32-weather-station\/files\/10190321\/sensor.datasheet.pdf\">datasheet_1<\/a><br><a href=\"https:\/\/github.com\/Nik71git\/ESP32-weather-station\/files\/10190323\/sensor.datasheet.2.pdf\">datasheet_2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I bought a wind speed sensor from china, it&#8217;s a spare part for the &#8220;misol&#8221; weather stations, just search for &#8220;wind speed misol sensor aliexpress&#8221; for the product, it was less than 15\u20ac. I unscrewed it to see how it works, technically it&#8217;s just a hall sensor. For my test-setup, I simply cut off the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3,4,5],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-beelogger","tag-esp32","tag-esphome"],"_links":{"self":[{"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":31,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":999,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/posts\/651\/revisions\/999"}],"wp:attachment":[{"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bratfisch.net\/index.php\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}