arduino interrupt

Recently, I used interrupt on my Arduino which was paralleled with a timer. The timer will be on if there is interrupt 1, and it will be off if there is interrupt 2. Before the timer triggered, Arduino was used to turn on a pump. But what happened is... When the pump turned on, the interrupt on my Arduino messed up (triggered randomly).
I tried to solve this problem by blocking the electromagnetic field. I hoped, the electromagnetic field will not interfere the Arduino process. But it did not work.
Does anybody has an idea why this thing happened? Is interrupt on Arduino cannot be interfered by electromagnetic fields?
Thank you

What is supplying the interrupt signal to the arduino and how is it wired? Maybe a pullup/pulldown is needed to stop EM noise from triggering interrupt.

The output of magnetic sensor which connected to the pin interrupt supplied the interrupt signal.
Can you explain more about pullup/pulldown? :slight_smile:
Thanks

How if I change the pin interrupt with ordinary digital pin and the program will be executed without interrupt? Will it solves the problem?

alva:
Can you explain more about pullup/pulldown? :slight_smile:

I'm glad I learned about pull up/down resistors when I started playing with the Arduino.

Can you supply more details on what sensors your using and how they are wired to the arduino and posting the code (between # code tags) will help.