I am using a relay SRD-5VDC-SL-C(generic module made for diy projects) to control AC current going to my SMPS(120-300v AC to 12V, 2A DC) driving my LED strip. The relay is controlled by a Lolin NodeMCU v3 microcontroller. The line from power outlet is connected to COM and the line to SMPS is connected to NO. The switching happens perfectly in the start, but if I keep the relay energized for a long time then when I turn the relay off it still lets the current flow and doesn’t switch. I checked the continuity and it is indeed between NO and COM even after turning the relay off(control pin high). Knocking the relay solves the problem.
I am fairly new to electronics. For a load like SMPS do I need some additional circuitry along with the relay to avoid this or is it a bad relay?
Thank you in advance, my iot project is on hold because of this.