I am using a relay to control a 230 VDC duct fan. Sometimes when the relay turns off my USB sound card freezes, to get it back I have to toggle the power (pull the USB cable, as it is USB bus powered). I have a lot of computer equipment and nothing else seems to be affected.

I have a diode across my relay and I have moved the relay further away from the USB sound card, the distance now is about 1.5 meter. But it is still happening. I am trying to understand why.

All computer equipment is connected through a UPS, the fan and relay circuit is not. I think that maybe the relay might be affecting the analog speaker signal going from the USB sound card. But I am surprised it is that sensitive, the sound card has never frozen like this until I got the relay installed.

Any thoughts would be appreciated, I am stuck trying to figure out a solution...

Update: After some more testing I can only get the sound card to freeze if the relay is actually controlling the fan. If the relay is controlling nothing, just turning on and off I have not been able to reproduce. But I am also not able to reproduce if I just turn the fan on and off manually with the switch.

Update 2: I disconnected the audio wire from the sound card, thinking that it might have picked up some noise. But the sound card still froze. It is very surprising that it is this sensitive.

Final update: I replaced the relay with a solid state relay as suggested. This not only made my circuit a lot easier, since I can power the solid state relay directly from the Raspberry Pi without a small 5V relay before the load relay, but it also seems to have eliminated my problem.

  • \$\begingroup\$ What supply are you powering the relay from? Have you tried adding a 1000uF decoupling capacitor across that supply? \$\endgroup\$
    – user16324
    Commented Jan 21, 2015 at 22:02
  • \$\begingroup\$ The relay is powered by a small 24V power supply, which powers nothing else. The power to the 24V relay is controlled by a tiny 5V relay controlled by a Raspberry Pi. I also updated the question with some more observations. \$\endgroup\$ Commented Jan 21, 2015 at 22:09

2 Answers 2


The fan is an inductive load, so the contact bounce may cause arcing. I would add a capacitor in parallel to the relay switch (not across L and N as Brian suggested).

Or use a solid-state relay.

  • \$\begingroup\$ I did try to add a 10nF polyester capacitor in parallel with the coil. Didn't help. \$\endgroup\$ Commented Jan 21, 2015 at 23:12
  • \$\begingroup\$ Not the coil. The switch. Make sure it's rated at least 500 Volts, and I would go for 100 nF. \$\endgroup\$ Commented Jan 21, 2015 at 23:13
  • \$\begingroup\$ Oh, yeah I get it. But, I just finished replacing the relay with a solid state. And no freezes yet :) \$\endgroup\$ Commented Jan 21, 2015 at 23:29
  • \$\begingroup\$ That's a better idea in general. \$\endgroup\$ Commented Jan 21, 2015 at 23:48

This may not be the answer, but I see no way of embedding a schematic in a comment...

Look for loop area in the mains switching circuit, and minimise it. Here's what I mean. Try to turn this circuit...


simulate this circuit – Schematic created using CircuitLab

into this circuit


simulate this circuit The tests you have done so far suggest the interference may be coming from the switched mains circuit, but only if the relay (not the original switch) is used. One possible source is untidy layout, creating a large loop area, which increases the radiated energy of a switched current.

The second current routes live and neutral together where possible (indeed, twisting them can reduce the area further) and reduces radiated interference.

It is also possible that the relay contacts bounce more than the switch, so connecting an X2 rated (safety) capacitor of 0.1 uF across L and N after the relay may also suppress interference.

  • \$\begingroup\$ Thank you, I don't have that kind of capacitor on hand. I'll get one and try. My wiring looks like circuit #2, with only 2+gnd wires used. But the relay sits further from the fan than the manual switch. Thanks for you input. \$\endgroup\$ Commented Jan 21, 2015 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.