Wind speed from dc motor?

I thought there would be a zillion others who have wanted to do this. Must be using the wrong search terms.

I have a set of wind cups, not sure where they came from, but the motor (3.7vdc) spindle from a cheap quadcopter or helicopter (can't recall) fits nicely and gives varying output voltages when I spin it with a hair dryer.

Not sure how long the bearings will last but I have 6 of the motors, so no big deal. Anyway, I am looking for some Arduino code to convert the voltage to a usable signal to indicate wind speed.

Spinning the motor with a variable-speed electric drill gives seemingly linear results up to 47mVdc which is as fast the drill runs, probably around 500-700-rpm.

Do I need any electronics to feed the DC output into an Arduino?

Can anyone point me at some code to will then do that. I have a hand-held anemometer that I can roughly calibrate against when ti si working with the Nano.

Thanks

It's probably better to read RPM (timing each revolution) than to use a motor as a generator...

Spinning the motor with a variable-speed electric drill gives seemingly linear results up to 47mVdc which is as fast the drill runs, probably around 500-700-rpm.

Do I need any electronics to feed the DC output into an Arduino?

47mV isn't a lot and you'll probably need an amplifier.* With the optional [u]optional 1.1V reference[/u] you can get about 1mV resolution (1.1V = 1100mV = 1023 on the Arduino ADC. So, you'd be able to read about 0-47 on the ADC, which you can then convert to wind speed. It would be better if you could get 1V or more at maximum wind speed.

So, what you would estimate the wind speed to be at 500-700 RPM?

Hook-up the motor (generator) and run [u]Analog Read Serial[/u] to see what kind of readings you get. (You'll probably have to change the analog reference.)

If you can get usable readings out in the wind, use the [u]map()[/u] function to convert the ADC reading to wind speed.

  • It's not hard to make an [u]amplifier[/u] with an op-amp, but if you want to go all the way down' to zero-volts and up to +5V, you generally need bipolar power supplies greater than 5V. There are "rail-to-rail" op-amps, but I'm not sure if they are truly rail-to-rail, or if you loose a fraction of a volt. And, all amplifiers add some noise.

Normally a small magnet and hall-switch would be used measure the rpm. Motors exhibit brush friction which would affect the response curve of the cup rotor, although I suspect your motors are very small and minimal effect. A motor used this way is called a DC tachogenerator.

Is the motor a DC brush motor (2 wires) or a brushless motor (3 or 4 wires).

Thinking it may be a DC Brush motor (but not sure) because you stated it was from a cheap quadcopter, I'm surprised the output is only 47 mV. I would expect it to output at lease 500mV or more.

If it is a DC Brush motor then you will have to read the analog voltage. However if it turns out to be a Brushless motor you can easily measure the frequency (easier and more precise).

Could you check the motor?

Small quadcopters tend to use slotless/coreless brushed motors which have an extremely large motor constant (in rpm/volt) since they run at 60,000rpm or so from 3.7V. 47mV would mean about 760rpm...

Thanks to all who replied, It is a two-wire motor about 1/4" diameter and an inch long.

As it is only for wind speeds I am not too concerned about linearity, accuracy etc as I will sample the output and average it over maybe ten or twenty seconds.

Using a hair drier the real anemometer measures 16-mph at 15", the cups and motor show 56mVdc at the distance when waving the dryer around for the sweet-spot on the cups for max speed.

Looks to be running backwards as the red-wire is showing minus voltage. Hopefully the brushes are not rotation-dependent. Anyway, motors to spare.

Connected to a Nano, red to GND, black to A0, the Example "Analog Voltage Read" code produces 0.00 to a max of 0.05 at the 16-mph distance.

How do I map this then?

Thanks guys. Much appreciated.

void setup() {
  Serial.begin(9600);
}
void loop() {
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5.0 / 1023.0);
  Serial.println(voltage);
}

"Looks to be running backwards as the red-wire is showing minus voltage. Hopefully the brushes are not rotation-dependent. Anyway, motors to spare. "

Remember, the "back EMF" is a voltage created by a running motor which is in opposition to the voltage driving the motor. This is what keeps a motor from speeding to infinity. The reversed voltage you are reading as you mechanically spin the motor is the same "back EMF".

Paul