4
\$\begingroup\$

I want to digitize the signal from an analogue anemometer (windspeed meter), so I can log with a Raspberry Pi etc.

The anemometer outputs an AC signal, where both the frequency and amplitude are a linear function of the RPM of the rotor (and hence windspeed).

The anemometer is from the 1960s, but is the same manufacturer as this one, and looks very similar or identical https://www.munroinstruments.com/product/im124-cup-anemometer/.

I found some data about its characteristics from this paper https://www.researchgate.net/publication/324271921_Response_Characteristics_of_Anemometers_Used_in_New_Zealand

According to an email from the manufacturer, it consists of a 6 pole permanently-magnetised rotor that spins in a coil.

f = (U / 0.5012 ) - 0.3388

V = U / 1.66

Where f is frequency in Hz, U is windspeed in m/s, V is Vp volts. These are experimentally-derived, so approximate, but with zero wind/rotation of the anemometer, the output signal will have zero amplitude.

I would like to be able to digitise as low wind speeds as possible. less than 1 - 1.5 m/s would be an acceptable threshold to start detecting pulses and measure wind speed.

My first thought is to try and convert the AC to binary pulses of 0 or 3.3V, detect these with the Raspberry Pi, and then using software calculate the frequency and hence wind speed.

I would have the Raspberry Pi handy for powering the circuit for signal processing, so 3.3V or 5V DC.

I'm not sure on the best way to convert the AC to digital pulses, given the wide voltage range. I'd like the pulses to be detected at as low wind speed as possible, so I have data over more ranges of wind speed.

p.s. Added some info based on some helpful comments.

\$\endgroup\$
11
  • 3
    \$\begingroup\$ When you say that V is AC volts, are you talking about an RMS value? What wave shape is the voltage and, does it have any DC offset. You really do need to think about the lowest speed and put a number on it. \$\endgroup\$
    – Andy aka
    Commented Mar 25 at 13:36
  • 2
    \$\begingroup\$ To help get an answer can you edit the question an include a link to the datasheet for the analogue anemometer. \$\endgroup\$ Commented Mar 25 at 13:39
  • 1
    \$\begingroup\$ What power supply do you have available for this circuit? \$\endgroup\$ Commented Mar 25 at 13:51
  • 1
    \$\begingroup\$ @Andyaka, the V = U / 1.66 is very much approximate based on the few datapoints I have. I would expect that in theory at 0 wind (0 RPM) there would be 0 volts output. The frequency equation is from the linked paper, and looks like it accounts for the real-world scenario with a certain minimum windspeed being needed to get it to rotate. \$\endgroup\$
    – Jake Reich
    Commented Mar 25 at 14:05
  • 1
    \$\begingroup\$ Anenometer will likely be remote, with a long cable to Rpi input. You should consider protecting Rpi from lightning and from radio-frequency signals impinging on that sensor/cable. Since Rpi has no analog input, an interface circuit to Rpi-pico's analog input might be easier. \$\endgroup\$
    – glen_geek
    Commented Mar 25 at 14:42

2 Answers 2

5
\$\begingroup\$

Try this:

schematic

simulate this circuit – Schematic created using CircuitLab

The first circuit uses a Blue LED to clamp the signal to around 3.0V-3.3V and should have a peak of around 20mA @ 12VAC. The LED will flicker with increasing speed and intensity with increase in windspeed.

The second is more professional. The diodes clamp the voltage within one diode drop of the inverting input of the comparator. It turns the anemometer output to a digital (0V 3.3V) signal for the MCU at the same frequency.

The third circuit captures the peak windspeed with a decaying signal after governed by C2 and R5. The downside to this circuit is it requires a bipolar (+/-) supply to operate properly. You can do it with a single supply at the expense of greater circuit complexity.

\$\endgroup\$
9
  • \$\begingroup\$ The second circuit looks like it could be just what I'm after. Are there any particular requirements for the comparator, other than rail-to-rail? Just looking for something suitable to order. Thank you. \$\endgroup\$
    – Jake Reich
    Commented Mar 25 at 14:44
  • 1
    \$\begingroup\$ @JakeReich Actually, there is one more thing: you might need a pullup resistor on the output of the comparator if it has an open-collector/open-drain output stage. If it has push-pull/totem poll output, it's good the way it is. The comparator is not critical, especially at these speeds and voltages. Almost anything can work (obviously within reason). \$\endgroup\$
    – MOSFET
    Commented Mar 25 at 14:58
  • \$\begingroup\$ @JakeReich, The rail-to-rail requirement is only needed for the op-amp in circuit 3. In circuit 2, the CM voltage is clamped well within the rails, especially for 5V operation. Check the datasheet for your comparator under Electrical Characteristics for input common-mode range. \$\endgroup\$
    – MOSFET
    Commented Mar 25 at 15:15
  • 1
    \$\begingroup\$ @JakeReich No. That capacitor is there to stabilize the derived reference (Vcc/2) voltage for the comparator. It doesn't do anything for wind signal noise immunity. Except under special cases, all comparators have some intrinsic hysteresis (usually a few mV). Check the datasheet for you specific case. That may be good enough. If not, your tradeoff is going to be "greater noise immunity" for "minimum windspeed detected" by adding a highish value resistor from the output to the non-inverting input - lower value = greater noise immunity. 51k may be a place to start. \$\endgroup\$
    – MOSFET
    Commented Mar 25 at 16:30
  • 1
    \$\begingroup\$ @JakeReich That's an open-collector output comparator. Put your LED on the positive rail (VCC_5V) to the output. With the resistor in series of course. In other words, you comparator can't source current; only sink it. \$\endgroup\$
    – MOSFET
    Commented Mar 30 at 17:44
4
\$\begingroup\$

Since 1m/s is the lowest you want to measure, and assuming a very strong wind will be 30m/s, the corresponding voltages are 0.6V and 18V respectively. Frequency range is 1.7Hz to 60Hz.

Presumably the anemometer is going to be far (more than 1m) from the measurement circuit, so you will probably need a differential amplifier to eliminate noise picked up in the anemometer cables:

schematic

simulate this circuit – Schematic created using CircuitLab

The diodes clamp the input signal to stay between -0.7V and +4V, which keeps the op-amp inputs withing their acceptable common mode range, 0V to +1.8V with this single +3.3V supply.

While the input is between those limits, this amplifier has a gain of 0.5, centered around +1V (set by R5 and R6). I chose +1V to lie about half way between the input limits. \$V_X\$ should be a low noise copy of the voltage across the anemometer, offset by +1V:

$$ V_X = \frac{1}{2}(V_B - V_A) + 1\rm{V} $$

C1 and C2 turn this arrangement into a low-pass filter, attenuating signal components above 100Hz, further reducing noise. Connect the output X here to the input of the next stage...

I'll use the other LM358 in the package as a comparator, detecting the crossing of \$V_X\$ through the mean of +1V. We can also employ hysteresis to improve noise rejection, and to ensure fast switching even when the input signal slews very slowly:

schematic

simulate this circuit

R8 and R9 set the switching threshold at 1V, and R10 modulates that slightly with positive feedback, for hysteresis of about 50mV.

The LM358 high output will fall far short of the full 3.3V, making it unsuitable to drive a GPIO input directly. Q1 ensures that the output swings all the way between 0V and +3.3V.

If you use a rail-to-rail output op-amp, you can connect its output directly to the GPIO, and dispense with R11, R12 and Q1.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.