Connection
The anemometer uses an infrared (IR) sensor with four pins: VCC (power), GND (ground), D0 (digital output) and A0 (analog output). Output D0 is used for speed measurement, which, together with the power supply, is connected to pin P0 on the expansion board with three Dupont wires - D0 to the yellow signal rail, VCC to the white power rail and GND to the black ground rail.
Expansion board MB2
Expansion board MB3
Recommendation
When you first start the anemometer, you need to set the sensitivity of the IR sensor. Start by inserting a Phillips screwdriver into the blue square on the sensor. By turning the screwdriver, you are able to set the switch point. This allows you to determine when you want the sensor to turn on.
Programme
The program measures the interval between individual pulses produced by the IR sensor when the anemometer blades rotate. Based on these time intervals, the rotation speed, and indirectly the wind speed, is then calculated. The value is converted into 3 units – m/s, km/h and also RPM, i.e. revolutions per minute, which measure the speed of the motor.
The wind speed is displayed on the micro:bit display. However, the display is quite small, so we recommend using either the TM1637 clock display , or the LCD display , or a universal fixture.
micro:bit display
Use the AB buttons to switch the displayed speed units.
Clock display TM1637
Connect the clock display to the MB2 expansion board as follows:
- CLK: P1
- GOD: P2
- VCC: 3V3
- GND:GND
Use the buttons to switch the displayed speed units.
LCD display / Universal fixture
Connect the LCD display to the MB2 expansion board according to the instructions for the universal fixture or LCD display.
Use the buttons to switch the displayed speed units.




