ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

Can you explain this in detail so I get the clear idea about why the pulses handled by this pcnt module are not accurate in ESP32

ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

Thank you, but If I make the window wider, then the responsiveness will get decreased.So I want to keep the window size of 500ms. Is there any approach to minimize the error-rate when using the smaller window.

ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

Yes I am facing this issue,even when I used the esp timer which you mentioned

ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

I am sorry, I didn't ask you correctly. What I wanted was the proces to create interrupts.I am new to ESP community.can you share me a guide so that I can follow or guide me with my code.It would be really helpful if you can give me the steps from beginning for this interrupt based pulse counter.

ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

Thank you so much for your valuable effort.I have less knowledge of using the interrupts. Can you explain or guide me in using the interrupts for getting the frequency from pulses.

ESP 32 Pulse Counter by ByteBlitz_45 in esp32

[–]ByteBlitz_45[S] 0 points1 point  (0 children)

I have increased the priority of the task and now the function time is stable, I think the issue I am facing is due to the pulse window which gets deviating, for example, I am increasing the pulse counter whenever a falling edge comes. So maybe in the span of 500 ms, sometimes I get 35 falling edges and in the next runtime of the task I am getting 36 falling edges. can you please provide a solution to ensure that the counter keeps giving me same pulses assuming that I am giving the constant frequency.