-->
Page 1 of 1

ESP8266 Loosing connection when pulsing GPIO 4

PostPosted: Fri Mar 12, 2021 1:47 am
by Species_8472
Good day ESP8266 community,

I recently encountered an unexpected problem with my ESP8266 and I can't seem to find a topic addressing this issue.
I am using a NodeMCU to read in pulses from a water flow meter (and display the rate of flow etc.). I used GPIO 4 (D2) to read in the pulses (simulated the pulses for now) and all works perfectly well until I get the pulses up to around 230 pulses per second or higher at which point my NodeMCU looses connection to my WiFi. I tried reading in the pulses using both interupts and polling (both methods had the same result) - after much trial and error I decided to move the input to GPIO 14 (D5) and then it worked fine on that IO (using both interrupts and polling methods) - it is like GPIO 4 can't handle being pulsed at too high a frequency but on the spec sheet it seems like GPIO 4 should have no problem with this. Has anyone encountred this before or know what this might be happening ?
It is not a huge issue for me as I am happy to use GPIO 14 for this project but I was just wondering why GPIO4 is causeing this problem.