Relay works fine but it won't turn off after a while

Hello. I'm using ESP8266 (nodemcu V1.0) and I made relay circuit as below picture. I connected 220V AC powered devices for test, and It works fine at first but then it doesn't work properly.

First, I think relay was broken (I'm using TIANBO TRA2 5V) but It works again next day. And it didn't work as time goes by.

I tried to change diode from 1n4001 to 1n4007 but it works same. I think electromagnetic compatibility problem might be happened (because it woks fine without any load but only happened with load and took a time)
and but I don't know what should I do.

Could you help me ?

Yes I agree with that conclusion.

is there an Arduino involved somewhere in the setup, as I can’t think of a mechanism apart from contact weld if not.

What is the load?

It looks like the PC817 is driven by a nodeMCU. The opto-coupler can as far as i know be used to drive the relay directly though, i don't see a need for the 2n2222

that's correct. PC817 octocoupler ic connected with nodemcu.

RELAY_P signal sent from nodemcu, and connnected with octocoupler and control relay.
and I tested with monitor and laptop, it almost consume 20W. it's not big load..

No but what actually is it?
More specifically is it an inductive load?

I thought that the 'sticking' of a relay would only happen with a DC load ?v Anyway, can you confirm that this is actually the case by removing the 5v power from the relay ?

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