The signal is probably "bouncing" between HIGH and LOW instead of performing a clean edge, just like it happens with buttons.

Two simple solutions:

  1. Hardware solution: use a schmidt-trigger instead of a comparator
  2. Software solution: define a dead-time for the signal aquisition (disable the interrupt when the desired edge has been detected and enable it again after "dead-time")
Answer from Sim Son on Stack Exchange
🌐
Last Minute Engineers
lastminuteengineers.com › handling-esp8266-gpio-interrupts-tutorial
Configuring & Handling ESP8266 GPIO Interrupts In Arduino IDE
January 20, 2026 - This causes multiple interrupts. It is purely a mechanical phenomenon known as a switch bounce, like dropping a ball – it bounces several times before finally landing on the ground.
🌐
GitHub
github.com › esp8266 › Arduino › issues › 4468
More than 3 attachInterrupts() don't seem to work · Issue #4468 · esp8266/Arduino
June 3, 2018 - #define sensorPin_1 D1 #define sensorPin_2 D5 #define sensorPin_3 D6 #define sensorPin_4 D7 volatile byte pulseCount[4]; void setup() { Serial.begin(115200); attachInterrupt(sensorPin_1, pulseCounter_1, FALLING); attachInterrupt(sensorPin_2, pulseCounter_2, FALLING); attachInterrupt(sensorPin_3, pulseCounter_3, FALLING); attachInterrupt(sensorPin_4, pulseCounter_4, FALLING); } //************************************************************ //======== Interrupt Service Routine for Flow Meter ========== void pulseCounter_1() { // Increment the pulse counter pulseCount[0]++; } void pulseCounter_2(
Author   esp8266
Discussions

esp8266 - I am facing a problem of firing multiple interrupts on nodemcu 1.0 on single rising edge pulse.what is problem and what are the solutions? - Arduino Stack Exchange
I am working on a project which involves counting the drops falling in a drip chamber of a IV fluid gravity based therapy bottle(saline bottle).I am using IR trans-receiver at the drip chamber to d... More on arduino.stackexchange.com
🌐 arduino.stackexchange.com
March 19, 2020
Multiple external interrupt with same ISR
I am trying to send an email when either one digital pin value is changed. (Even Low to High or reverse) However, the below 1st code is successful but 2nd code is unsuccessful 2nd code cannot trigger the email normally when D0 and D1 either Low or High Because I would like to reduce the code ... More on forum.arduino.cc
🌐 forum.arduino.cc
0
0
February 1, 2019
Need some help with interrupts and timers
Maybe this will help: https://www.arduino.cc/reference/en/libraries/esp8266timerinterrupt/ caveat: I’ve not used it myself. Otherwise you could try modifying the code that runs in the main loop to do its work in smaller chunks over multiple iterations, so the loop runs frequently enough to achieve the consistency of timing you’re looking for with turning off the LED. More on reddit.com
🌐 r/esp8266
5
7
September 18, 2022
wifi - ESP8266 and interrupts - not possible? - Arduino Stack Exchange
I'm planning to use an ESP8266 (Wemos D1 Mini) to use as a software SPI monitor to send over WiFi. As a test, I've done a cut-down sketch that just counts the interrupts, a simple frequency counter... More on arduino.stackexchange.com
🌐 arduino.stackexchange.com
🌐
Random Nerd Tutorials
randomnerdtutorials.com › home › esp8266 › esp8266 projects › esp8266 interrupts and timers using arduino ide (nodemcu)
ESP8266 Interrupts and Timers using Arduino IDE (NodeMCU) | Random Nerd Tutorials
August 6, 2019 - You should use digitalPinToInterrupt(GPIO) to set the actual GPIO as an interrupt pin. For example, if you want to use GPIO 14 as an interrupt, use: ... The ESP8266 supports interrupts in any GPIO, except GPIO16.
🌐
Everything ESP8266
esp8266.com › viewtopic.php
Keeping up with lots of interrupts (two encoders) - Everything ESP8266
Honestly, my current thought is that the real issue is that when the ISR is executing, interrupts are disabled. This means when you have two encoders, it's possible for multiple interrupts to fire at the same time or very closely together. My understanding is that the ESP8266 will queue the ...
🌐
Arduino Forum
forum.arduino.cc › projects › general guidance
Multiple external interrupt with same ISR - General Guidance - Arduino Forum
February 1, 2019 - I am trying to send an email when either one digital pin value is changed. (Even Low to High or reverse) However, the below 1st code is successful but 2nd code is unsuccessful 2nd code cannot trigger the email normally when D0 and D1 either Low or High Because I would like to reduce the code as I can, I would use all pins for the ESP8266 board.
🌐
Circuits4You
circuits4you.com › 2017 › 12 › 08 › esp8266-external-interrupt-example
ESP8266 External Interrupt Example | Circuits4you.com
July 22, 2018 - Interrupt Subroutine. The ESP8266 has two different kinds of interrupts: “external”, and “pin change”. ESP8266 all pins have external interrupt except GPIO 16.
Find elsewhere
🌐
Esp8266-shop
esp8266-shop.com › esp8266-guide › interrupts-and-timers
https://esp8266-shop.com/esp8266-guide/interrupts-...
It is a good practice to design interrupt service routines as small as possible (e.g. setting a flag), so the processor gets back to the execution of the main program. So, we should not do blocking calls or handle communication, for example, inside an ISR. The best approach is to signal the main code, using for example a flag or a counter, to indicate that the interrupt has happened.
🌐
ESP32 Forum
esp32.com › viewtopic.php
Processing multiple interrupts sources - ESP32 Forum
If I pass individual ID's as arg to gpio_isr_handler_add(), I can handle multiple interrupt sources and I still only need 1 ISR handler. This is great! But how am I supposed to forward the individual ID's through the semaphore mechanism? Do I need to use a list of semaphores, 1 per event source?
🌐
Noveldevices
noveldevices.co.uk › es-interrupts
ESP8266 Projects - Novel Devices
January 6, 2020 - Unlike the Arduino UNO and Micro, where only two pins can be configured as interrupt pins, any ESP8266 pin can be used with the exception of GPIO16.
🌐
ESP32 Forum
esp32.com › viewtopic.php
How are multiple interrupts on different pins handled? - ESP32 Forum
To get an idea how often a pulse is triggered: Less then once a second, maybe twice a second at most. I could simply copy this routine, write a 2nd ISR interrupt service routine and connect the 2nd power meter to another pin of the ESP8266. Here's the question: I read that while in ISR, the ESP8266 does not register or handle other interrupts.
🌐
Reddit
reddit.com › r/esp8266 › need some help with interrupts and timers
r/esp8266 on Reddit: Need some help with interrupts and timers
September 18, 2022 -

Hi guys, i've been working on this for a couple of days now and my head hurts...

I am trying to do something like this:

  1. Pin interrupt turns on LED

  2. A 100ms timer starts while the main loop keeps running

  3. When the time is up, an interrupt turns the LED off exactly after 100ms.

The impulses come at random, sometimes 2 or more in less than 1ms.

I've tried adding the turn off command inside the loop but depending on where the program is, it never turns off afterthe same amount of time.

I know that there is an option with Timer1 but i just can't get it to work...

🌐
ESP8266 Arduino Core
arduino-esp8266.readthedocs.io › en › latest › reference.html
Reference — ESP8266 Arduino Core documentation
Receive is interrupt-driven, but transmit polls and busy-waits. Blocking behavior is as follows: The ::write() call does not block if the number of bytes fits in the current space available in the TX FIFO. The call blocks if the TX FIFO is full and waits until there is room before writing more bytes into it, until all bytes are written.
🌐
Microcontrollers Lab
microcontrollerslab.com › home › esp8266 › esp8266 interrupts and timers arduino ide – pir motion sensor example
ESP8266 Interrupts and Timers Arduino IDE - PIR Motion Sensor Example
December 2, 2025 - By using ESP8266 interrupt, we will be able to detect changes on GPIO pins without the need to continuously poll GPIO pins. Whenever an interrupt occurs, we can execute a certain function that should execute on state change of a specific GPIO pin.
🌐
Home
gndtovcc.home.blog › 2020 › 04 › 16 › esp8266-interrupts-and-timers-using-arduino-ide-nodemcu
ESP8266 Interrupts and Timers using Arduino IDE (NodeMCU)
April 18, 2020 - In this guide, you’ll learn how to use interrupts and timers with the ESP8266 NodeMCU using Arduino IDE. Interrupts allow you to detect changes in the GPIO state without the need to constantly check its current value. With interrupts, when a change is detected, an event is triggered (a function is called).
🌐
Mikrocontroller.net
mikrocontroller.net › attachment › 378394 › Problems_with_external_Interrupts.pdf pdf
1 External Interrupt Problems with ESP866
(maybe preferred) workaround is to block the external interrupts during the call to · ESP8266WiFiMulti::run().
🌐
Stack Overflow
stackoverflow.com › questions › 77691309 › esp8266-interrupts-issue
sensors - ESP8266 interrupts issue - Stack Overflow
... Please see How to Ask, then revise your title to ask a clear, specific question and not just state that you have an issue. We all have issues. Also take the tour. ... 1) For ESP8266, ISR() function need to have ICACHE_RAM_ATTR attribute (meaning ...