OpenEnergyMonitor Community

Adafruit Anemometer pulse code esp8266

Tags: #<Tag:0x00007f88cdfcc350> #<Tag:0x00007f88cdfcc288> #<Tag:0x00007f88cdfcc198> #<Tag:0x00007f88cdfcc080>

Hi all,

I bought a Adafruit anemometer recently to integrate it into my system (esp8266+batteries and weather sensors).
since i prefer to use pulse sensors instead of the voltage sensing (it involved using a boost power module to increase voltage to at least, 7V, (because i plan to use it with solar panel and batteries) and to keep it simple, i open the anemometer, solder 3 cables to the hall sensor (3.3v,Gnd,Data) to make use of it, bypassing the other components and allow me to power it with 3.3v from my Nodemcu lolin esp8266.

The problem is with the code, as i can’t get it right.
The nodemcu has EspHome and making use of pulse counter sensor it seems i can’t understand it very well how i to code the right values for it.
From the specs list, is says:
For voltage sensing (not using it): Wind speed value = (output voltage -04)/1.6*32.4

For pulse sensing: Output signal: Pulse ( 0.88m/s per pulse)
Range: 0~60m/s (plan to read at km/h)
It gives 2 pulses for one full spin, from what i could understand.

Height (base to center): 105mm / 4.1"
Center out to Cup: 102mm / 4"
Arm Length: 70mm / 2.8"
Weight: 111.8g

can someone give me a tip how to code it right for this values?


You can verify the 2 pulses per revolution very easily by using a multimeter to monitor the pulse output and turning the cups very slowly by hand.

Those numbers taken together do not make sense. If you have a Hall effect sensor that gives two pulses per revolution, you cannot have 0.88 m/s per pulse. The units are not consistent. The calibration factor that you want is in units of metres per pulse. I would believe 0.88 metres per pulse, or 0.88 m/s per pulse/s, but not 0.88 m/s per pulse.

The only practical way that I can think of to get a calibration is to put the voltage output back as you bought it, together with your pulse counting circuit, and spin the cups at varying speeds while recording the voltage (converted to the wind speed) and the pulse rate you measure with Pulse Counter Sensor.

Then you adjust the calibration by adding a “filter” to convert the pulses per minute to km/h using the values you measured.

The alternative is to borrow a few minutes in a wind tunnel :laughing: Then you adjust the calibration to show the correct wind speed, which you will know from the wind tunnel’s instrumentation.

There’s plenty of Internet stories of people going for a drive with their anemometer hanging out the car window on a “still” day to “calibrate” their home made weather stations… Not as accurate as a wind tunnel, but more affordable. :wink:

I carefully avoided mentioning that method. Apart from the possible danger arising from using a public road, there’s the air flow around the vehicle to consider, so the sensing head must be outside that envelope in order to measure correctly.