# Electrical/electronics folks, how do I eliminate interference caused by line-level relay?

**URL:** <https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419>\
**Category:** In My Humble Opinion\
**Created:** [May 1, 2023, 2:36pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419 "2023-05-01T14:36:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 1, 2023, 2:36pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/1 "2023-05-01T14:36:20Z")

</div>

The device I am turning on is a is a shaded-pole line-level AC motor of the type typically found in old phonograph equipment.

How do I turn this on and off without affecting surrounding electronics?

I am working on making an old Seeburg 1000 background music system record changer appear to be running while the actual music is played by a Raspberry Pi.  
The reason for this is because the device is beautiful to behold when it is playing, and would look so much better if the records are turning while the music is playing.

I can easily set up a relay that I can trigger by the Raspberry Pi, but I have found that whenever I switch the motor on manually (or even if I turn on one of my other Seeburg machines), something happens when the switch is flipped that causes interference in the line voltage and causes the Raspberry Pi to occasionally think one of its buttons has been pressed.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [May 1, 2023, 2:41pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/2 "2023-05-01T14:41:32Z")

</div>

A few things come to mind:

Use an opto-isolator chip (e.g. Vishay K814P) between the Raspberry Pi and the relay.

Use a solid-state relay instead of a mechanical relay. (A solid-state relay has softer turn on/turn off characteristics vs. a mechanical one. Plus you can get them with zero-crossing circuitry.)

Google “snubber circuits.”

Use twisted pair + shielded cabling whenever possible.

---

<div class="post-metadata">

**Author:** ![Dorjan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dorjan/32/12440_2.png) [@Dorjan](https://boards.straightdope.com/u/Dorjan)\
**Post date:** [May 1, 2023, 3:00pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/3 "2023-05-01T15:00:45Z")

</div>

optocoupler, solid-state relay (SSR), or snubber circuit are all good ideas.

Some other options are adding a line filter on the power supply line to the raspi to filter out any voltage Are you using a separate power supply for the raspi and the motor? If not, doing so will also help eliminate the issue. You could also add decoupling capacitors close to the power pins of the raspi to help filter out high-frequency noise and stabilize the voltage supply.

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 1, 2023, 3:16pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/4 "2023-05-01T15:16:54Z")

</div>

Solid state sounds good. I like the idea of a soft start.

The pi is currently powered by a switching power supply that I use for the pi, amplifier, and cabinet lighting. The phonograph motor is not connected to anything right now–it is designed to be connected directly to 120VAC.

Enlighten me on “line filter to the raspi” and “decoupling capacitors close to the power pins of the raspi”… This is not my area of expertise, so I don’t know the type of caps or size, or what a line filter would be like.

---

<div class="post-metadata">

**Author:** ![Dorjan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dorjan/32/12440_2.png) [@Dorjan](https://boards.straightdope.com/u/Dorjan)\
**Post date:** [May 1, 2023, 3:47pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/5 "2023-05-01T15:47:28Z")

</div>

Are you powering the Raspi with the USB power supply? If so, forget the capacitor stuff (I’m used to powering them from a DC voltage source to the pins).

If AC powered, a line filter could still help filter out noise, interference, and voltage spikes from the power source. You would place it in between the power source and the usb power input on the raspi. These are off-the-shelf filters you can select based on voltage and amperage, but might require some splicing. Your power supply might have a ferrite choke on the USB power cable which essentially does the same thing though. i think the official raspi power supply does? In that case you would be better off trying the SSR or isolator chip between the pi and the mechanical relay.

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 1, 2023, 6:20pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/6 "2023-05-01T18:20:28Z")

</div>

No, I am powering with 5v to the pins.  
I figured that since I already had a power supply with +/-12 and 5v available, I ought to just skip the USB part.

---

<div class="post-metadata">

**Author:** ![Dorjan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dorjan/32/12440_2.png) [@Dorjan](https://boards.straightdope.com/u/Dorjan)\
**Post date:** [May 1, 2023, 6:37pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/7 "2023-05-01T18:37:45Z")

</div>

Ah, in that case you might be interested in the capacitor setup. You’ll need two capacitors, one 10-100 µF electrolytic capacitor and one approx 0.1 µF ceramic capacitor. The larger one is to filter out lower freq noise and the smaller one for higher freq noise. You’ll solder them in parallel between the 5V and GND pins (as close as possible to the pins), positive lead to 5V and neg to GND, of course.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [May 2, 2023, 12:51am UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/8 "2023-05-02T00:51:26Z")

</div>

All you need is a zero-voltage switching SSR.  
Everything after that is gravy.

---

<div class="post-metadata">

**Author:** ![carnivorousplant](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/carnivorousplant/32/3563_2.png) [@carnivorousplant](https://boards.straightdope.com/u/carnivorousplant)\
**Post date:** [May 2, 2023, 1:31pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/9 "2023-05-02T13:31:26Z")

</div>

> [@Dorjan](#):
>
> You’ll solder them in parallel between the 5V and GND pins

Don’t capacitors add in parallel?

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [May 2, 2023, 1:41pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/10 "2023-05-02T13:41:31Z")

</div>

Yes. But in this case you are trying to correct for impedance differences at high and low frequencies.

---

<div class="post-metadata">

**Author:** ![carnivorousplant](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/carnivorousplant/32/3563_2.png) [@carnivorousplant](https://boards.straightdope.com/u/carnivorousplant)\
**Post date:** [May 2, 2023, 1:48pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/11 "2023-05-02T13:48:13Z")

</div>

I would think you would want the small cap across the audio input.

---

<div class="post-metadata">

**Author:** ![Dorjan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dorjan/32/12440_2.png) [@Dorjan](https://boards.straightdope.com/u/Dorjan)\
**Post date:** [May 2, 2023, 1:52pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/12 "2023-05-02T13:52:11Z")

</div>

Why’s that? The interference is coming from switching the phonograph motor on, nothing to do with audio signal.

---

<div class="post-metadata">

**Author:** ![carnivorousplant](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/carnivorousplant/32/3563_2.png) [@carnivorousplant](https://boards.straightdope.com/u/carnivorousplant)\
**Post date:** [May 2, 2023, 1:53pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/13 "2023-05-02T13:53:38Z")

</div>

I would think the amp sees noise from the motor turning on, as an amp can “see” 60 Hz noise.

---

<div class="post-metadata">

**Author:** ![Dorjan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dorjan/32/12440_2.png) [@Dorjan](https://boards.straightdope.com/u/Dorjan)\
**Post date:** [May 2, 2023, 1:55pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/14 "2023-05-02T13:55:55Z")

</div>

That’s not the issue minor7flat5 is trying to deal with though.

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 2, 2023, 2:15pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/15 "2023-05-02T14:15:04Z")

</div>

I just went over and filmed a 30 second video demonstrating the problem. What is a good way to share an iPhone video here?

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [May 2, 2023, 2:28pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/16 "2023-05-02T14:28:57Z")

</div>

> [@carnivorousplant](#):
>
> Don’t capacitors add in parallel?

Yes. But you’ll sometimes see designers put a large capacity cap (e.g. 22 μF) in parallel with a small capacity cap, like a 0.1 μF. This is because the small cap has a higher resonant frequency than the larger cap, thereby increasing the bandwidth of the caps.

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 3, 2023, 12:58am UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/17 "2023-05-03T00:58:49Z")

</div>

I uploaded a short video to YouTube to demonstrate what I’m trying to fix…

`https://youtu.be/J0ncmOTJuNY`

(I’m getting that “An error occurred: Sorry, you can’t embed media items in a post.” error, hence the link)

I will eventually be running power to the motor of the chrome Seeburg 1000 (motor is in bottom left corner when I have it open). The demo using the other wood-cased Seeburg is to show what the exact same shaded-pole motor causes in the Raspberry Pi when switched on.

---

<div class="post-metadata">

**Author:** ![Projammer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/projammer/32/559_2.png) [@Projammer](https://boards.straightdope.com/u/Projammer)\
**Post date:** [May 5, 2023, 1:23am UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/18 "2023-05-05T01:23:04Z")

</div>

Wouldn’t a ferrite choke on the noisy line smooth the signal?

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [May 5, 2023, 2:17am UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/19 "2023-05-05T02:17:38Z")

</div>

Have you tried the zero-voltage switch?

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [May 5, 2023, 5:14pm UTC](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419/20 "2023-05-05T17:14:16Z")

</div>

Not yet–I don’t even know what one of those is.  
I copied and pasted “zero-voltage switching SSR” in Google and nothing obvious (to me) crops up.

With that said, there are multiple suggestions here, but I am ignorant of electronics so I am hoping there is a bit of consensus before I start ordering mystery parts.

Could you elaborate on your post? Will it solve the problem I demonstrate in the video?

I get the “SSR” part = Solid State Relay, so that probably is the best bet–I imagine that takes care of the electrical “pop” at the switch. Nevertheless, I would also like to easily robustify the raspi so it doesn’t misbehave if there is another similar switch nearby.

[Next page](https://boards.straightdope.com/t/electrical-electronics-folks-how-do-i-eliminate-interference-caused-by-line-level-relay/983419.md?page=2)
