Problems operating relay, internet disconnected

I’m using esp-01 with blynk and controlling relay with Arduino by providing input from gpio2 of esp-01. When i switch on gpio2 pin a relay starts the motor (triggering start button of motor starter) . But when i switch it off another relay stops the motor but just after that internet is disconnected from esp01. I tried using optocoupler between gpio2 pin and Arduino input pin but I’m still facing the issue. Is there some other reason that internet is getting disconnected just after motor stopping relay is triggered. If i disconnect Arduino output pin fromthat relay then internet remains connected. It happens only when motor is on and i just switch it off with the relay.

I’ve moved this to it’s own topic.

From your description, I have absolutely no idea what your hardware setup looks like, and how the EDP01 and Arduino (no mention of which type of Arduino) are interacting.

I’d suggest that you post a more detailed explanation of your hardware setup and the code you’re running on your devices.
Don’t forget to use triple backticks when posting code.

Pete.

1 Like

i used these to solve a similar relay related issue:

https://www.electronics-tutorials.ws/resistor/varistor.html

1 Like

Thank you Peter for fast response. God’s grace it’s solved now!
I have used gpio2 pin as output and I’m using Arduino Uno. Esp01 is connected with 3.3/5v breadboard power supply (usb port) via usb ttl converter. Project is working fine. But i noticed that internet was getting disconnected when i switch on motor with blynk app and then switch off. Something happened just after switching off. Then i used an optocoupler which was working fine and the issue was still occuring.
Then I removed ftdi usb from breadboard power supply (which was getting power from 9v ac adapter) and connected it to powerbank. Now it’s working fine and internet is not interrupted again. :grinning: