Hi, why do you calibrate with this value on multiply?
Hi, this code is under pulse_counter/total and converts total number of pulses (1pulse per sec =1.492mile/hour) into km:
1.492mph=0.66698368m/s /1000m (km) gives multiplier value.
āyou can use pulse_counter too since 20 pulses in one second means 1,75 m/sā
I am recycling an old Somfy EOLIS / SOLIRIS wind sensor for my DiY-project; this wind sensor still runs smoothly but off course I am still clueless what the wind speed is of one rotation (equal to two pulses). Does anyone knows this value by any change?
nice specs but what is the link?
Iāve read this thread over and over and gained a lot of insight from it - thanks everyone who contributed.
I also have the same issue with a lot of generated noise leading the very high readings (apparently we peaked at 1500mph one day. I must say Iām surprised I didnāt notice the wind being that strong!)
Iāve tried the 1uf trick too, but it didnāt work. (Didnāt make things worse, just not better)
In my case, I think Iāve finally figured out the reason.
First, an example of spurious readings.
t
My (generic 4-pulse-per-rotation anenometer from aliexpress) is connected to a nodemcu board and esp8366 that is mounted in a garage. The esp also runs a 12v PIR, rain-tip gauge and three door sensors via esphome. Theyāve worked great for years.
My specific issue is in the timings of that graph. Yesterday I was working in the garage, thus triggering the PIR and door sensors a lot, but I donāt think theyāre the problem. What I do think affects it is that I had the garage lights on - four cheap LED battens. I also had drills/grinders and saws going. Looking back, I can see I get high readings only when I myself am active in that area.
My belief is that electrical interference is playing merry hell with these readings. Something about pulse_meter, the high number of reads this generates or the wiring is my problem. (itās only 2m of solid copper bell wire)
So Iām going to move the reading to a different esp8266, in a different outbuilding and see if that helps!
@digdilem How is your wind vane required to be wired? ADC or binary? If binary do you have a pull up resistor?
No idea - I just measured it with an ohmeter and I can see it closes 4 times a revolution.
I am using INPUT_PULLUP in my code, because I copied a chunk from earlier in this thread. It IS working perfectly now, however - weāre in the middle of a storm and itās producing lots of sensible data.
A follow up to this: I set up a new nodemcu and copied the same code block to it for the anenometer. I then moved it to a different shed and set it going.
For the first time ever, Iāve had over 48h without any massive spikes of hundreds of a mile an hour and can now actually read the chart in HA without those spikes throwing the scale out so much.
So for me at least, I think my problem was electrical interference, even with a relatively short 2m wire run.
Can you share your code in 1 file, hard to copy from the forums.
Iām surprised and flattered to see this thread continuing, however I just wanted to say somehow I am only just seeing your post, and I will be implementing this fix on my weather station as soon as possible. As fate would have it, I ordered a bag of 0.1ĀµF capacitors off AliExpress just yesterday!
Thank you for sharing this research!
hi, I also use a wh-sp-w01 anemometer (aliexpress) and the datasheet says:
1 turn = 2 pulses (2hz)
m/s=wind speed hz * 0.34
How should I write the code to get the speed in km/h?
Thank you
p.s.: can the condenser also be useful for the rain gauge?
If you read the thread, the code is all located within the first several posts, as well as in my linked GitHub. Nik71git posted the following formula for km/h:
So the code would be:
- platform: pulse_meter
pin:
number: GPIO14
mode: INPUT_PULLUP
name: '${loc} Windspeed Meter'
icon: 'mdi:weather-windy'
id: wind_meter
unit_of_measurement: 'mph'
accuracy_decimals: 1
timeout: 5s
filters:
- multiply: 0.02 #2.4km/h per rotation so 1 / 60 / 2 * 2.4
- sliding_window_moving_average: # Helps prevent too many datapoints
window_size: 15
send_every: 15
thanks, I see someone uses pulse_meter and other pulse_counters, which one works better? Iām using pulse_counter now, is the calibration formula the same?