Unwanted servo movements caused by interferences

I'm a beginner, just started to play with arduino uno. I'm using a micro servo sg90 to turn on and off a boiler switch. It works. The problem is: when somebody turn on/off the light switch of the bathroom, it will trigger the servo, making it move and turn off the boiler switch. How can i stop this interference? Should i shield the servo? The light switch is around 40cm from the boiler switch, it's an old house with old cables, and i'm not an electrician, so any suggestion is appreciated, thanks!

The answer is by using decoupling.
Here is a page on it.
Decoupling

For servos I recommend the last schematic on the page.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.