Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Interfacing Anemometer (NPN Pulse Output) with Arduino
Arduino Projects

Interfacing Anemometer (NPN Pulse Output) with Arduino

Mamtaz AlamBy Mamtaz AlamUpdated:August 30, 20233 Comments5 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Interfacing Anemometer (NPN Pulse Output) with Arduino
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this guide, we will be interfacing NPN Pulse Output Anemometer Sensor with Arduino and measuring the Wind Speed. An anemometer is a device used for measuring wind speed and direction. It is also a common Weather Station instrument.

In one of our previous project, we measured Wind Speed using Adafruit Anemometer sensor & also display the Wind Speed in Gauge on TFT LCD Display. But Adafruit Anemometer is an analog anemometer and requires a power of more than 7V for operation. Therefore we will be using a digital Anemometer in this project which has NPN Pulse Output. The NPN pulse output anemometer result is good & are also cost-effective & they operate at 5V only.

In this project, we will interface NPN Pulse Output Anemometer with Arduino & display the measured wind speed on a 16×2 LCD Display. This anemometer is capable of measuring wind speeds up to 70 m/s or 156 mph which should be adequate for our location.


Bill of Materials

Following are the components that we need for making this project. You can purchase all the components easily online from Amazon. Check the purchase link below.

S.N.Components NameQuantityPurchase Links
1Arduino UNO Board1Amazon | AliExpress
2Anemometer Sensor NPN Pulse1Amazon | AliExpress
3I2C LCD Display1Amazon | AliExpress
4Jumper Wires15Amazon | AliExpress
5Breadboard1Amazon | AliExpress



What is Anemometer?

An anemometer is a device used for measuring wind speed and direction. It is widely used for measuring the speed of airflow in the atmosphere, in wind tunnels, and in other gas-flow applications. The term is derived from the Greek word anemos, which means wind, and is used to describe any wind speed instrument used in meteorology.

The most widely used Anemometer for wind-speed measurements is the revolving-cup electric anemometer. The revolving cups drive an electric generator. The output of the generator operates an electric meter that is calibrated in wind speed. Three-cup anemometers are currently used as the industry standard for wind resource assessment studies & practice. You may use Ultrasonic Anemometer if you don’t want movable parts.

The cup-type anemometer consists of 3 or 4 hemispherical cups mounted on horizontal arms, which were mounted on a vertical shaft. The airflow past the cups in any horizontal direction turned the shaft at a rate that was roughly proportional to the wind speed. Therefore, counting the turns of the shaft over a set time interval produced a value proportional to the average wind speed for a wide range of speeds.


Anemometer with NPN Pulse Output

The NPN Pulse Output Anemometer Sensor is a Three-cup type anemometer that is capable of measuring wind speed up to 70m/s or 156mph. It is composed of a shell, the wind cup, and the circuit module.

Anemometer with NPN Pulse Output

After testing many types of anemometers, we found out this NPN pulse output anemometer quality is best as well as cost-effective. Unlike the analog output version anemometer, this anemometer output pulse reflects the wind speed more accurately. Besides, this anemometer is totally Waterproof, with a stable installation design, and suitable for outdoor applications.

In working, if the anemometer turns one round in one second, the transmitter will output 20 pulses, which means the wind speed is 1.75m/s.


Features & Specifications

  • Power: 5V~30V DC
  • Communication: pulse output
  • Resolution: 0.0875 m/s (that is, if 20 pulse detected in 1s, the wind speed is 1.75 m/s, and 3.5m/s if 40 pulse detected)
  • Accuracy: ±(0.2+0.03V)m/s
  • Measuring range: 0~70m/s
  • Output: NPN
  • Working environment: -20℃~60℃,0%RH~80%RH



Internal Circuitry of the Sensor

NPNR OUTPUT(RL=5.1K)


Wiring & Pinout

The Anemometer has a special connector that has four wires of different colors.

Wires Mark Definition
Brown line VCC Power supply
Black line GND Grounding
Green line (PNP)OUTPUT Pulse output
Blue line (NPNR)OUTPUT Pulse output

Interfacing NPN Pulse Output Anemometer with Arduino

Now let us interface the NPN Pulse Output Anemometer with Arduino & measure the wind speed. Check the schematic or circuit below.

The Anemometer works between 5-30V DC. Therefore there is no need of any external power supply as we can connect this sensor directly with Arduino. The connection between the Anemometer Senor and Arduino UNO Board is given below.

Arduino UNO Anemometer
5V VCC (Brown Wire)
GND GND (Black Wire)
D2 (NPNR)OUTPUT (Blue Wire)

NPN Pulse Output Anemometer Arduino

For displaying the wind speed, we are using a 16×2 I2C LCD Display. Connect the SDA & SCL Pin of LCD Display to Arduino A4 & A5 Pins. Similarly, connect the VCC & GND Pin of LCD to Arduino 5V & GND Pin.




Source Code/Program

Here is a simple program for Interfacing Anemometer (NPN Pulse Output) with Arduino. The code requires a I2C LCD Library for compilation.

Copy the following code and upload it to the Arduino UNO Board.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x3F for a 16 chars and 2 line display
 
unsigned long lastDebounceTime = 0;  // the last time the output pin was toggled
unsigned long debounceDelay = 1000;    // the debounce time; increase if the output flickers
 
int pinInterrupt = 2;
 
int Count = 0;
 
void onChange()
{
  if ( digitalRead(pinInterrupt) == LOW )
    Count++;
}
 
 
void setup()
{
  Serial.begin(115200); //Initialize serial port
  pinMode( pinInterrupt, INPUT_PULLUP);// set the interrupt pin
 
  //Enable
  attachInterrupt( digitalPinToInterrupt(pinInterrupt), onChange, FALLING);
 
  lcd.init();
  lcd.clear();        
  lcd.backlight();      // Make sure backlight is on
  lcd.setCursor(3, 0);
  lcd.print("Anemometer");
  delay(3000);
  lcd.clear();
  
}
 
void loop()
{
  if ((millis() - lastDebounceTime) > debounceDelay)
  {
    lastDebounceTime = millis();
    
    Serial.print((Count * 8.75)/100);
    
    lcd.setCursor(0, 0);        
    lcd.print("Wind Speed");
    lcd.setCursor(0, 1);
    lcd.print((Count * 8.75)/100);
    
    Count = 0;
    
    Serial.println("m/s");
    
    lcd.print("m/s");
  }
  delay(1);
}


Measuring Wind Speed & Testing the Device

Once you upload the code to the Arduino Board, the LCD Display will start displaying the wind speed. When the anemometer cup is stable the LCD will show a speed of around 0m/s. The speed will vary or increase when the sensor is taken in a windy region.

The speed variation increases or decreases depending upon the cup rotation.

This is how you can make DIY Arduino Anemometer Project for measuring wind speed.


Overview

Wind Speed Meter with Anemometer with NPN Pulse Output & Arduino
Watch this video on YouTube.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleLM358 Dual Op-Amp Features, Pins, Working & Applications
Next Article LM386 Audio Amplifier IC Pins, Working, Circuit & Applications

Related Posts

DC Energy Meter using Arduino

Build a DC Energy Meter using Arduino – 32V/5A

Updated:August 26, 20252K
Interfacing ADXL375 Accelerometer with Arduino

Interfacing ADXL375 Accelerometer with Arduino (±200g)

Updated:June 28, 2025
PZEM-004T Arduino Energy Meter

DIY AC Energy Meter using PZEM-004T & Arduino

Updated:March 6, 20258K
Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Updated:February 2, 20259K
Password Based Door Lock Security System Using Arduino & Keypad

Password Based Door Lock Security System Using Arduino & Keypad

Updated:February 2, 20252436K
Earthquake Detector Alarm with with Accelerometer & Arduino

Earthquake Detector Alarm with Accelerometer & Arduino

Updated:February 2, 2025661K
View 3 Comments

3 Comments

  1. Jim Thompson on March 29, 2023 10:23 AM

    I would like to use this in a marine sailboat application. Have you seen a similar project for WIND DIRECTION?

    Reply
  2. Robert W Makosky on May 14, 2023 9:47 AM

    Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: “Arduino Nano, ATmega328P”

    C:\Users\rmako\OneDrive\Documents\Arduino\sketch_may14a\sketch_may14a.ino: In function ‘void setup()’:

    sketch_may14a:26:7: error: ‘class LiquidCrystal_I2C’ has no member named ‘init’

    lcd.init();

    ^~~~

    exit status 1

    ‘class LiquidCrystal_I2C’ has no member named ‘init’

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    Reply
  3. Sujith Kumar on September 4, 2023 8:34 AM

    Can you please make a post on how to interface the same NPN anemometer with ESP32? It would be a great help.

    Reply

CommentsCancel reply

Latest Posts
ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

June 21, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
Top Posts & Pages
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • ESP32 Fingerprint Attendance System with Live Web Dashboard
    ESP32 Fingerprint Attendance System with Live Web Dashboard
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • Designing of MPPT Solar Charge Controller using Arduino
    Designing of MPPT Solar Charge Controller using Arduino
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
    ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
  • How to use INA226 DC Current Sensor with Arduino
    How to use INA226 DC Current Sensor with Arduino
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (205)
    • ESP32 MicroPython (7)
    • ESP32 Projects (82)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.