Question to generic pulse counter
Posted: 28 Feb 2024, 15:04
Hello, I tried to build a pulse counter for my anemometer. For this I build a test environment.
I use an esp8266 with normal 4M VCC firmware. I connected a 10kΩ resistance between ground and D5 and a reed contact between 3V and D5. The reed contact I fixed near the chuck of my lathe. The chuck has 2 magnets. In the chuck I clamped a tachometer. When the lathe is running with 10 turns per second the frequency is also shown with 10Hz.
Here is the setting Sometimes there are some differences, although the late is running with the same speed. Than I changed the debounce time from 0 to 1ms. It looks better. I tried also to use a higher speed, but after 40Hz the value is fix there is no rising. I simulated this with 8 magnets on the chuck.
If my anemometer turns 3 times with 1m/s windspeed and I want to measure max. 15m/s the frequency from the two reed contacts is about 2x 45Hz = 90Hz. So the esp or the reed contacts are too slow? Has somebody an idea what I could do to measure also the whole range of speed wind?
I also tried to use the other options high, low and changes, but the result I do not understand. I my frequency is 10Hz with rising and value/4 and I switch to high -> 7-8Hz, to low -> 6-9Hz (both with value/2). If I use changes -> 5-10Hz (value/4). Does anyone understand this?
Thanks and best regards!
I use an esp8266 with normal 4M VCC firmware. I connected a 10kΩ resistance between ground and D5 and a reed contact between 3V and D5. The reed contact I fixed near the chuck of my lathe. The chuck has 2 magnets. In the chuck I clamped a tachometer. When the lathe is running with 10 turns per second the frequency is also shown with 10Hz.
Here is the setting Sometimes there are some differences, although the late is running with the same speed. Than I changed the debounce time from 0 to 1ms. It looks better. I tried also to use a higher speed, but after 40Hz the value is fix there is no rising. I simulated this with 8 magnets on the chuck.
If my anemometer turns 3 times with 1m/s windspeed and I want to measure max. 15m/s the frequency from the two reed contacts is about 2x 45Hz = 90Hz. So the esp or the reed contacts are too slow? Has somebody an idea what I could do to measure also the whole range of speed wind?
I also tried to use the other options high, low and changes, but the result I do not understand. I my frequency is 10Hz with rising and value/4 and I switch to high -> 7-8Hz, to low -> 6-9Hz (both with value/2). If I use changes -> 5-10Hz (value/4). Does anyone understand this?
Thanks and best regards!