Relay Module works fine on USB but doesn't switch when connected via HLK-PM01

I am having problem with relay module. When relay is connected through laptop USB, it works fine and switches on/off correctly. But I've to use my project on 220Vac mains and for this purpose I'm using HLK-PM01 Ac-->DC supply. When I connect my relay through this supply, the relay doesn't switch back once turned on. Although the led on the relay module turns dim but not properly off. Please help if anyone has had any problem like this one.

Thanks.

How is the 5V connected to your project? Can you post a wiring diagram?

If the problem goes away after you disconnect the AC load, then you have a problem with interference due to contact arcing. Should use a suitable MOV or RC snubber. A relay module with opto isolation is more suitable for switching AC loads.

What is the AC load your switching?

The problem exists only when I'm taking 5V Dc from HLK-PM01 (220VAC-5VDC Supply) or even if I aplly 5V Dc from Mobile charger. But worked fine when connected via Laptop USB.

I have tried Opto-coupler in order to isolate. I think there was some problem with the voltage levels when mains voltages are applied.

Now it's working fine.

An optocoupler improves the isolation ... especially on the power rails and if you use a separate DC supply for your relay.

An MOV like this will reduce contact arcing (EMI/RFI) and prolong the life of the relay.

Without MOV protection you may still get intermittent problems over time (emissive interference) and the relay contacts could weld closed due to contact arcing.

Hi,

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

Thanks... Tom... :slight_smile: