Friday, May 18, 2018

RPM into MPH? Building a Anemometer!

I'm building an anemometer to measure wind speed. I'm building the typical 3 cup style anemometer, and using a hall effect sensor (digital, non-latching) to trigger an arduino (or esp8266).

It's a open collector unit (output pulls low when triggered with a magnet), and therefore uses a 10k ohm pull up resistor, or use

pinMode(inPin, INPUT_PULLUP);

val = digitalRead(inPin); // read the input pin

and watch for a LOW (FALLING when using interrupts - https://playground.arduino.cc/Main/ReadingRPM)


Inside the unit, I want to pass a small magnet across the sensor. I could use 1 or more magnets, and adjust the code for the number of pulses (triggers) per revolution. Let's assume 1 magnet, so one pulse per revolution.

The math looks like this:

RPM = cycles per second (Hz) * 60 seconds per minute / # of magnets

(to count cycles per second or HZ - https://circuitdigest.com/microcontroller-projects/arduino-frequency-counter-circuit)

FPM = RPM * Diameter (inches) / 12 * 𝝅

FPH = FPM * 60

MPH = FPM / 5280

Where:
RPM = Revolutions Per Minute
FPM = Feet Per Minute
FPH = Feet Per Hour
MPH = Miles Per Hour
𝝅 = 3.14 (pi)
Diameter = inches from center of shaft to center of cup * 2

More on this to come.

1 comment:

  1. It's my understanding that there is some loss. In the old days, one person held the anemometer out the car window while the other person drove at different speeds. I've had several commercial anemometers and they have all had a maximum speed. Good luck.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...