# Eliminate Interference in Bluetooth Audio Output

**URL:** <https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433>\
**Category:** General Guidance\
**Created:** [January 5, 2023, 7:00am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433 "2023-01-05T07:00:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toreupfeet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/toreupfeet/32/1098783_2.png) [@Toreupfeet](https://forum.arduino.cc/u/Toreupfeet)\
**Post date:** [January 5, 2023, 7:00am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/1 "2023-01-05T07:00:58Z")

</div>

When my Bluetooth receiver is powered by a 5V USB charger plugged directly into mains power, I get no interference/noise. But when I power the Bluetooth receiver in the manner I've depicted below, I get a lot of interference/noise.

My setup is a bit more complex than the diagram I've put together; I actually have a ground loop isolator on the audio line, which then continues on to a preamp mixer that is grounded to mains ground, then the audio continues on to an amp. But, those things are working properly. What I would like to address/discuss is the diagram.

 ![BT Circuit](https://europe1.discourse-cdn.com/arduino/original/4X/3/1/d/31db2d1ed10c2433a3921ba3e3fc32fc790d51e1.jpeg)

Clearly the relay is to blame. I perceive there to be three potential remedies:

1. Maybe a resistor on the 5V power line between the relay and the Bluetooth receiver (just a guess)

2. More confident in this alternative: Put an optocoupler after the relay and have the collector/emitter switch on power to the Bluetooth receiver on an isolated circuit. Yes, it's redundant to have a relay before the optocoupler, but since the ESP32 and the relays are in a junction box that I'd rather leave alone, I could build the optocoupler circuit as a simple addition instead of making revolutionary changes inside the junction box (unsoldering, soldering again, etc.).

3. The Bluetooth receiver probably draws more than 50mA, so the pc817 I would use is not enough for an isolated on/off circuit. I'd need the opto to drive something else, like an 2N2222 switch. If I were to solve this dilemma on my own, without reaching out for help, I'd probably aim for this, but before I start I'd like to ask for advice.

Edit: Perhaps it's not "clearly" the relay. I'm no expert. I suppose it could also have something to do with the shared GND.

---

<div class="post-metadata">

**Author:** ![Toreupfeet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/toreupfeet/32/1098783_2.png) [@Toreupfeet](https://forum.arduino.cc/u/Toreupfeet)\
**Post date:** [January 5, 2023, 4:11pm UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/2 "2023-01-05T16:11:24Z")

</div>

Or maybe a ceramic capacitor would do some good(?).

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [January 5, 2023, 11:42pm UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/3 "2023-01-05T23:42:26Z")

</div>

Why did you connect BT power ground to ESP ground.  
Or is this a drawing error.  
Leo..

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 6, 2023, 1:08am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/4 "2023-01-06T01:08:48Z")

</div>

For a noise issue, **full** disclosure is _de rigeur_.

---

<div class="post-metadata">

**Author:** ![Toreupfeet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/toreupfeet/32/1098783_2.png) [@Toreupfeet](https://forum.arduino.cc/u/Toreupfeet)\
**Post date:** [January 6, 2023, 4:51am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/5 "2023-01-06T04:51:57Z")

</div>

> [@Wawa](#):
>
> Why did you connect BT power ground to ESP ground.  
> Or is this a drawing error.  
> Leo..

I'd planned to use the 5V as VCC for some sensors that I've connected to my ESP32. But I've changed my design so I can power all sensors from "Power Source 1". I then removed the shared GND (connected the "Power Source 2" GND directly to the Bluetooth receiver), and left the "Power Source 2" 5V in the relay. The noise/interference was still very pronounced even though the GNDs were now not-shared.

I tried a resistor (and a potentiometer), which had no desired effect.

I tested the Bluetooth receiver with my multimeter, to find that it seems to peak at 40mA when it connects to my phone, but operating current is between 20mA and 27mA (music not playing vs. music playing). ...and 15mA when nothing is paired. Nonetheless I couldn't get it to power on with only the pc817.

Long story short, I've found success with remedy #3 from my original post. I tested it on my breadboard with a great result! Here is a schematic. I might have made some protocol errors; I don't know much about schematics but I did my best. Any feedback would be appreciated.

 ![solution](https://europe1.discourse-cdn.com/arduino/original/4X/a/c/0/ac00d243f6283362f11aa71499a53e3bbb1bb92b.jpeg)

---

<div class="post-metadata">

**Author:** ![Toreupfeet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/toreupfeet/32/1098783_2.png) [@Toreupfeet](https://forum.arduino.cc/u/Toreupfeet)\
**Post date:** [January 6, 2023, 5:04am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/6 "2023-01-06T05:04:02Z")

</div>

> [@anon57585045](#):
>
> _de rigeur_

I didn't want to convolute things. I have an SX1509 driving the relays but including that would have only added to my time with the ol' Photoshop. ...and the audio stuff works/worked fine when the BT was powered in a non-relay fashion. So, I knew the culprit was captured in that diagram.

I'm happy with my remedy #3 result. If anyone has any recommendations for the resistance values, do chime in. I know these resistors work but if they can be improved upon I'm interested.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 8, 2023, 12:57am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/7 "2023-01-08T00:57:52Z")

</div>

Those can't be completely justified without access to the entire documentation. If it works for you now, fine. There is nothing really bad about the circuit you posted.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 8, 2023, 1:06am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/8 "2023-01-08T01:06:16Z")

</div>

> [@Toreupfeet](#):
>
> I didn't want to convolute things.

This sort of implies that there are unrelated things that wouldn't affect the question. But that presupposes absolute confidence that they are not related.

Frequently here, we find that people miss things that they think are not related. That is often exactly why they can't find a solution. They aren't able or interested in pursuing possibilities that they have ruled out, without any reliable testing or investigation to prove them unrelated.

That is why we almost always expect questioners to follow the guidelines, which spell that out in detail:

> [@How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966):
>
> See also [FAQ - Arduino Forum](https://forum.arduino.cc/faq) for general rules on forum behavior and etiquette. Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frus…

---

<div class="post-metadata">

**Author:** ![Toreupfeet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/toreupfeet/32/1098783_2.png) [@Toreupfeet](https://forum.arduino.cc/u/Toreupfeet)\
**Post date:** [January 8, 2023, 2:26am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/9 "2023-01-08T02:26:06Z")

</div>

Thanks for the helpful nudge.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 8, 2023, 2:40am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/10 "2023-01-08T02:40:30Z")

</div>

We have a difficult job sometimes, it's hard to estimate the harm in small deviations from the normal forum expectations. It's not meant to scold, but it often has to be said.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 7, 2023, 2:41am UTC](https://forum.arduino.cc/t/eliminate-interference-in-bluetooth-audio-output/1073433/11 "2023-07-07T02:41:10Z")

</div>

Closed on July 7, 2023, 2:41am UTC

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