Esp32 gpio pins ISR misfired

MobileMicro
Posts: 5
Joined: Tue Dec 22, 2020 1:36 pm

Esp32 gpio pins ISR misfired

Postby MobileMicro » Tue Dec 22, 2020 2:30 pm

I have esp32 devkit plugged into the breadboard to test out motor rpm sensor attaching simple gpio pin ISR with rising. The kit is also communicating with Dshot esc via uart and another gpio port directly. When the motor battery is plugged in , the gpio pin which is not even wired to rpm sensor signal line constantly misfires. Is there a way to fix this problem. When the motor battery is taken off, this problem doesn’t appear to happen.

Thanks

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp32 gpio pins ISR misfired

Postby ESP_Sprite » Tue Dec 22, 2020 2:44 pm

If nothing is connected to it, the GPIO will act as an antenna and pick up any ambient noise, for instance as generate by the motor.

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

Re: Esp32 gpio pins ISR misfired

Postby liebman » Tue Dec 22, 2020 3:18 pm

Maybe add (or enable) a pull-down resistor?

MobileMicro
Posts: 5
Joined: Tue Dec 22, 2020 1:36 pm

Re: Esp32 gpio pins ISR misfired

Postby MobileMicro » Tue Dec 22, 2020 3:47 pm

Is there a better way to filter out the noise ? I think it likely comes from esc which is connected to one gpio pin and uart pin plus the gnd. Decoupling capacitor for esc probably is not an option at this moment.

MobileMicro
Posts: 5
Joined: Tue Dec 22, 2020 1:36 pm

Re: Esp32 gpio pins ISR misfired

Postby MobileMicro » Tue Dec 22, 2020 6:15 pm

Enabled pulldown resistor, but it still misfires a lot

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp32 gpio pins ISR misfired

Postby ESP_Sprite » Wed Dec 23, 2020 1:34 am

MobileMicro wrote:
Tue Dec 22, 2020 6:15 pm
Enabled
You mean in software? If so, that's only a 50K'ish pullup; you may want to add a much lower external pullup instead.

MobileMicro
Posts: 5
Joined: Tue Dec 22, 2020 1:36 pm

Re: Esp32 gpio pins ISR misfired

Postby MobileMicro » Wed Dec 23, 2020 6:16 pm

I have 2k external pullup/down resistor plugged in. But it still behaves the same. Even if the gpio pin is plugged in gnd, it still misfire when battery is on with esc which has same ground.

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

Re: Esp32 gpio pins ISR misfired

Postby liebman » Wed Dec 23, 2020 6:24 pm

Are there any other GPIOs used for interrupts? (especially if they are edge interrupts)

MobileMicro
Posts: 5
Joined: Tue Dec 22, 2020 1:36 pm

Re: Esp32 gpio pins ISR misfired

Postby MobileMicro » Thu Dec 24, 2020 3:50 pm

No other pins are used for edge interrupt. One pin is using rmt to talk to esc. And if I take this off, no misfire but functions will not work. What I have found is that the interrupt pin somehow is corrupted due to this rmt pin connected to esc. When esc is off power, no corruption. Is the esp32 hardware having issues ?

Who is online

Users browsing this forum: No registered users and 160 guests