INT1 waking Arduino up without any external trigger

Hi,

I am new to Arduino and this forum. I have got a Arduino uno r3 and started a project with it. I am trying to control a pump via a relay circuit connected to Arduino.

I have attached the circuit I am using, it has an LED, a relay circuit and a button (to turn on/off the relay - for testing).

Briefly, my sketch looks like this - Arduino enters PWR DWN mode and waits on INT0. When pin2/INT0 goes down, it wakes up and turnhttp://forum.arduino.cc/index.php?action=post;board=3.0#s the relay and LED on. After a timeout, they are turned off and the Arduino goes back to sleep.

While this works fine, sometimes Arduino wakes up without INT0 being pulled down. This happens when I connect/disconnect any electrical device nearby to/from the wall socket (like my table lamp or external speakers of my computer). On debugging (by attaching to INT1) I found that INT1 was getting triggered causing Arduino to wake up.

Can anyone please shed some light as to what could be going on here? Is it because of some noise?

Also, how can I avoid this? may be by modifying the circuit? or could it be a board issue?

Thanks for helping!

Google "decoupling capacitors" for the full answer.

The short rule of thumb version is usually to stick a pair of capacitors across the power rails close to your arduino; 1 x 10uF, 1 x 100nF.

Theres a lot more to it than that, but most of the other stuff will depend on cable lengths etc :slight_smile:

Thank you very much for your suggestion, it helped me understand need for decoupling.

Arduino Uno has two 100nF (in schematics, C6 for Vcc and C4 for Aref). Is it for the same purpose? In that case, can I use 10uF capacitors to cover the range not covered by 100nF ones on the board?

Thanks!