Go Down

Topic: 5v relay activates itself (Read 288 times) previous topic - next topic


My 5v relay activates itself when power is switched on/off on the 220v net. In the socket is a 12v powersupply that is connected through the relay. I tried running the arduino on its own powersupply, but same problem.

It only does not turn on/off when the cable to the relay data is off.

How can i stop the powersurge on 220v net from activating the relay?


Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Also can you post a picture of your project so we can see your component layout.

What model Arduino are you using?
What is the 5v relay that the Arduino is driving?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


If you are using pin interrupt function in your Arduino setup, for example a button with pin interrupt function to switch the relay, then you cannot avoid these false positives.

Just use polling the button pin for state change using digitalRead (button_pin) along with some debounce technique and it will work like a charm.


Thank you. I will avoid using the interrupt function. That rules out using the sleep function though.

Go Up