# Reading analog anemometer sensor data

Discussion in 'Embedded Systems and Microcontrollers' started by Bucky2090, Mar 14, 2014.

1. ### Bucky2090 Thread Starter New Member

Mar 13, 2014
2
0
I am building a weather station powered by a Raspberry Pi. I have an NRG #40C anemometer that generates an A/C signal that varies with wind speed. It uses a simple coil that rotates around a fixed magnet (Data sheet attached).

Highlights of sensor:

• Sensor type 3-cup anemometer
• Low level AC sine wave, frequency linearly proportional to windspeed
• 1 m/s to 96 m/s (2.2 mph to 214 mph) (highest recorded)
• Output signal range 0 Hz to 125 Hz (highest recorded)
• Accuracy within 0.1 m/s (0.2 mph) for the range 5 m/s to 25 m/s (11 mph to 55 mph)
• Transfer function m/s = (Hz x 0.765) + 0.35 [miles per hour = (Hz x 1.711) + 0.78]
Need some advice on building a simple circuit that can read this signal. Web research seems to indicate the Arduino would be a better choice. The idea would be to 'clip, amplify, and convert' the signal to a square waveform. Apparently, reading such a low level frequency is difficult.

How would I go about doing this? Any advice on a circuit design and approach would be greatly appreciated.

Seems to me this should be a simple thing to do. I guess not.

Bucky2090

File size:
120.9 KB
Views:
86
2. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,521
515
This came up in another thread on another subject, but I think this is exactly what you need, it is Frequency to Voltage Converter: http://www.ti.com/lit/ds/symlink/lm231.pdf

Particularly look at Figures 18 and 19. The text says that Figure 18 applies to input frequencies of 1 Hz to 200 Hz. They don't say anything about Figure 19, but it looks like it is more precise (smaller error) version of Figure 18.

It looks like one limitation of this application is that this chip has the smallest input of 1 Hz. You sensor has smallest output of 0 Hz. I am not sure what the chip will do when your sensor sends 0 Hz to it.

Also, I am not sure if the chip able to accept sine input wave. If this chip only works with square wave input wave, maybe there are other F-to-V converters that accept sine waves.

3. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,980
1,138
The "Low level AC sine wave" will probably need amplification to trigger the input comparator in an LM231. A single transistor stage should do the job.

Jul 18, 2013
10,873
2,530
5. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,521
515
Yes, definitely. But would op amp be better?

6. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
According to one source the unit should produce a 500mV output at 5-7 m/s (around 11 MPH). That is a pretty strong signal by itself that any comparator rated "Input common--mode voltage range includes ground" should be able to detect. The Pi may have built-in comparators, I'm not familiar with it.

What you then do is feed one anemometer output to one comparator input pin, and ground the other two pins (to comparator & from anemometer). Many comparator outputs are directly logic compatible so you just connect the comp output to a Pi input.

Note the phasing here doesn't matter a wit. Either pin means exactly that: either pin. You don't need any additional amplification to do this either, just the comparator.

The Pi needs to sample this input to measure it's frequency, or the inverse of the time between two rising or falling edges.

That's a very simple method, but it takes advantage of the strengths of the anemometer and the Pi.

7. ### Bucky2090 Thread Starter New Member

Mar 13, 2014
2
0
Thanks to all for the quick replies.
Do you think this device would work?
http://www.micrel.com/_PDF/mic6270.pdf
I suspect the easiest way to process the output would be a PWM port on an Arduino???

Bucky2090

8. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
That MIC6270 IttyBitty Comparator looks perfect, as long as you have no issues with the itty bitty package it comes in, a SOT-23-5 isn't the easiest thing to handle. I keep breakout boards for SMD stuff.

And again, I don't know Arduino either (I'm a PIC guy) but generally PWM is an output not an input. But it must have some sort of timer that can measure frequency.

9. ### sysjay New Member

Jun 13, 2014
3
3
Hi.. this is my first post. I did research before i saw this post. I also have a NRG#40. I have implemented a Schmitt trigger using an OP AMP LM324. The circuit creates a stable square wave. I was able to then use Arduino to count frequency.

calafat and ErnieM like this.
10. ### Salmoides New Member

Jan 5, 2014
1
0
@sysjay, could you share more about what you implemented. I'm a noob to this and would like to do exactly what you've accomplished using an Arduino.

11. ### sysjay New Member

Jun 13, 2014
3
3
Here's the circuit I am using to measure the frequency with an Arduino. The only thing I don't like is the output stays high all the time, and I would like to invert it.

File size:
445 KB
Views:
108
12. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
So the only thing you want is for the output to stay low all the time? The output of what? What is that thing with all the triangles (it's not an LM324) ? What's that box lower right?

13. ### sysjay New Member

Jun 13, 2014
3
3
I have modified my diagram and reattached to be more clear (hopefully). I am trying to create a square wave from the sine wave generated by the NRG#40c Anemometer (the box in lower right).

I also included a snap shot from my oscilloscope to show the input (sine-wave) and output(square-wave). The square goes high on the low of the sine -- how do I invert that? Is it worth doing? I am assuming that I will save energy if low most of time (assuming no wind).

What is Naomi? I am using Fritzing to document my project.

• ###### NRG#40 Circuit_schem.pdf
File size:
442 KB
Views:
73
calafat likes this.
14. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
You can invert the square wave by swapping the two inputs to the op amp, though I can't imagine any reason you would ever need to do that.

Nov 27, 2015
3
0

Nov 27, 2015
3
0

17. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,980
1,138
Why have you re-posted your original post?

18. ### Lee_B New Member

Nov 27, 2015
3
0
Sorry about what appears to be a repost, it was a simple newbies mistake.

What I wanted to say was that I have recently acquired an NRG #40C and am looking for a suitable circuit to use to interface it to an Arduino bearing in mind that the anemometer outputs a voltage output ranges from 80mV up to approx 12v for a 100mph wind.

The circuit shown seems very simple and I was hoping that someone could reassure me that it does work or suggest something that would do the job.

19. ### levardar New Member

Sep 23, 2016
1
0
Hello guys. I just got one anemometer like this one, nrg 40c and I am trying to find a good sine wave convertor with 80mV p-p and max 12V p-p. I simulate more circuits but without succes for this low freq. Did some one from you resolved this ?

Thank's
Razvan