Bluetooth and Arduino Electromagnetic interference question

The circuit is a bit complex for me to picture it, but from what I can gather there is no need to connect the ground of the audio to the ground of the arduino because it is all opto isolated.

Ok. I'll be testing that today. I'm hoping for a miracle, but not expecting one...

Very neat construction by the way.

Thanks! I spent a lot of time laying it out - this is my first and only electronics project so it has been a real learning experience and incredibly fun. Now I'm studying an electronics book with the hope of learning how all this really works and what are the "normal" ways of doing things...

I'll report back later with the test results.

Ciao, Bob

As promised here are the results of extensive testing on the breadboard.

I set up a simple vactrol voltage divider commanded by 2 arduino pins and the BT mdoule connected to TX/RX.

I connected a gingle guitar pickup hot lead to the input of the voltage divider, and the pickup ground to the ground of the divider. The divider output went to the AMP hot, and the ground to the amp ground.

The vactrol leds were connected to ground with 51KOhm resistors to limit the current to the appropriate range for the the resistance values I want.

  1. I removed the 20cm wire harness from the bt module and replaced it by jumpers only 1cm long. This reduced the noise immediately.
  2. Extensive tests of many configurations showed that there is always strong hum at the amp if the Arduino ground is not common to the amp ground.
  3. by keeping the resistance of the 2nd stage of the voltage divider less than 300K ohm, the BT & hum noise are both diminished greatly.
  4. even with out the common ground, i.e. the voltage divider ground directly connected to the amp ground, the BT noise still gets in to the amp.
  5. The use of various ferrite beads on the amp cable had no effect at all.
  6. connecting capacitors in parallel to ground at all points in the circuit had no effect.

I don't know what to conclude.

Some hypothesis: - the noise must be RF from the BT module??? or maybe not? - The unshielded wires and vactrols are picking up the RF? - could I put the Vactrol part of the circuit in a Farday cage? is it worth the effort to even experiment? - use shielded wires to connect the tx/rx of the BT module to the rest of the circuit. - Put the BT module outside a Faraday cage protecting the rest of the circuit?

I'm really hoping that Not_Grumpy Mike will have some good ideas here...

Thanks, Bob, who is dead tired from a tough couple days hacking at this...

The vactrol leds were connected to ground with 51KOhm resistors to limit the current to the appropriate range for the the resistance values I want.

What current does this correspond to? You should not draw more than 40mA from an arduino pin.

  1. by keeping the resistance of the 2nd stage of the voltage divider less than 300K ohm, the BT & hum noise are both diminished greatly.

That is the sort of thing a schematic might have told me. A value of 300K across the input impedance of an amplifier is generally too high. As you have found it is prone to pickup noise. The lower the resistance the lower the pickup. Can you not arrange things so you have less than 25K across the amplifier's input. You might have to add something like a voltage follower op amp to reduce that impedance. It looks like you have found where it is getting in.

What current does this correspond to? You should not draw more than 40mA from an arduino pin.

I have not measured it but it is very small, certainly less than 0.1 mA.

That is the sort of thing a schematic might have told me. A value of 300K across the input impedance of an amplifier is generally too high. As you have found it is prone to pickup noise. The lower the resistance the lower the pickup. Can you not arrange things so you have less than 25K across the amplifier's input. You might have to add something like a voltage follower op amp to reduce that impedance. It looks like you have found where it is getting in.

I'm very sorry to not have a schematic. I can only try to explain how it works. A simple electric guitar has the hot wire from the pickup connected to one end of a 500k ohm pot. The other end of the pot is to ground. The wiper is connected to the amplifier hot input. The pickup, the pot, and the amp cable grounds are common. So the volume control is a variable voltage divider.

I have re-created that using 2 vactrols such that each can have a resistance from 0 to 500K, and the Arduino is programmed so that the sum of the 2 vactrol LDR resistance is always +/- 500K.

The noise gets worse if the second resistance in the voltage divider (i.e the resistance between wiper and ground) is greater than 300K. This can happen since to get maximum volume it will reach 500K ohm, causing lots of BT noise.

I still do no really understand how the noise gets in. But I saw that "partially grounding" the pickup output via the wiper-to-ground resistance somehow reduces the noise.

I will now try the experiment with a real pot and see if the noise still gets in?

What do you mean by using an op-amp as a voltage follower? I have seen that some people use a zero-gain amplifier circuit at the output of the guitar to ensure that the signal is not dampened by the long cable to the amp. Is that it? Do you have a reference circuit?

I'm happy to try anything you suggest!

Thanks again! Bob

A a zero-gain amplifier and a voltage op amp are the same thing. It is simply the signal fed into the +ve input and the -ve input connected to the output. It is a bit of a misnomer calling it zero gain. Yes the voltage gain is 1 ( not zero ) but it has a current gain and effectively reduces the impedance of the source because it has a low output impedance.

I still do no really understand how the noise gets in.

It is airborne electromagnetic radiation. It works just like a radio. Because the source is so close then it is so strong. It is being picked up on the wires, hence

I removed the 20cm wire harness from the bt module and replaced it by jumpers only 1cm long. This reduced the noise immediately.

However it requires a high input impedance to develop a significant voltage on the input. Therefore reducing the input impedance in effect makes the interfering voltage smaller.

I have not measured it but it is very small, certainly less than 0.1 mA.

No. You have 50R and an LED you are not going to get 0.1mA. Assuming a red LED at 1.7V then you will be getting something like 5 - 1.7 = 3.3 / 50 = 66mA which is too much.

A a zero-gain amplifier and a voltage op amp are the same thing. It is simply the signal fed into the +ve input and the -ve input connected to the output. It is a bit of a misnomer calling it zero gain. Yes the voltage gain is 1 ( not zero ) but it has a current gain and effectively reduces the impedance of the source because it has a low output impedance.

I understand that the gain is 1 ;-) They also call it a "unity gain" amplifier, Jerry Garcia of the Grateful Dead was famous for making that popular. He said that without it, the trebles didn't make it all the way from his guitar to the amp due to the long cables.

But to make one?

I would just take the output of my voltage divider, connect it to Vin+, then connect Vout to Vin- as well as to the hot wire on the the amp cable? that's all there is? Really?

No. You have 50R and an LED you are not going to get 0.1mA. Assuming a red LED at 1.7V then you will be getting something like 5 - 1.7 = 3.3 / 50 = 66mA which is too much.

No, I have a 51 K ohm resistor and the voltage drop at the LED is 1.35V so the resulting current is around 0.07mA = 3.65/51e-3 So all is ok on the Arduino end, I guess?

But to get back to the noise, you think that just by putting the op amp on the output of the voltage divider, the noise will disappear? I do not doubt your wisdom, but how does the op-amp keep the noise from getting in?

I'm really sorry to not have the knowledge necessary to do this kind of work, but I am studying "Practical Electronics for Inventors" to learn!

Thanks again and again, Bob

I would just take the output of my voltage divider, connect it to Vin+, then connect Vout to Vin- as well as to the hot wire on the the amp cable? that's all there is? Really?

No not of your potential divider but an op amp. http://en.wikipedia.org/wiki/Buffer_amplifier http://en.wikipedia.org/wiki/Operational_amplifier_applications

No, I have a 51 K ohm resistor and the voltage drop at the LED is 1.35V so the resulting current is around 0.07mA

That doesn't make sense either. At that current there will be virtually no light at all from the LED, so I can't see how that will work.

how does the op-amp keep the noise from getting in?

By lowering the input impedance of the amplifier. Suppose you have a certain amount of power being picked up by a load. The voltage developed across that load will depend on its resistance. For a low resistance this will be a low voltage for a high resistance it will be a high voltage. This is because the power picked up will be the same in both cases and to comply with ohms law the voltage has to be lower in the lower impedance circuit.

Jerry Garcia of the Grateful Dead was famous for making that popular

Not with me. Unity gain amplifiers were around long before the Grateful Dead. :)

That doesn’t make sense either. At that current there will be virtually no light at all from the LED, so I can’t see how that will work.

Indeed, but I used the 51K resistance as a result of lots of experimenting. I realize that I am outside the normal range of the Vactrols LED current, but that was producing the right resistance range when putting in PWM…

The circuit we have been talking about uses VTL5C4 vactrols (data sheet attached). Two of these, controlled by PWM, make up both sides of a 500K “pot”. It works very well as a volume or tone control for the guitar! Really it does! At the time that I started this project, I had no idea what vactrols were and just bought the ones that were readily available. It was only later, when I began to understand that I saw that the resistance vs input current characteristics were not what I needed.

My next circuit will use a more expensive (sigh) vactrol the VTL5C6 (data sheet attached) which should allow for a more “normal” current range. The future circuit was discussed (designed?) at long length (again I am sorry to be so ignorant) in this forum thread: http://forum.arduino.cc/index.php?topic=163280.0

By lowering the input impedance of the amplifier.
Suppose you have a certain amount of power being picked up by a load. The voltage developed across that load will depend on its resistance. For a low resistance this will be a low voltage for a high resistance it will be a high voltage. This is because the power picked up will be the same in both cases and to comply with ohms law the voltage has to be lower in the lower impedance circuit.

So the unity gain takes the load of the guitar amp out of the picture? And that would reduce the noise? Why wouldn’t the noise just go straight through with the rest of the audio ? Again, I am not doubting you, far from it! I am just desperately trying to understand how this works…

I have attached a schematic of what I think you are suggesting. Could you please let me know if that is correct?

I really appreciate all your help - you have been a lifesaver, and this forum is in general!
Cheers,
Bob

The 3 attachments are:
VTL5C4 data sheet for Vactrol in noisy circuit
VTL5C6 data sheet for Vactrol that will go into the future circuit
A schematic of my understanding of the unity gain circuit using an LM324 (that I have in stock)

VTL5C3+4.pdf (55.6 KB)

VTL5C6+7.pdf (59.3 KB)

So the unity gain takes the load of the guitar amp out of the picture?

No.
It reduces the input resistance.

Imagine a resistor just sitting there in free space next to a transmitter. Suppose that the resistor is picking up 1mW of power from the transmitter.
That power will manifest itself by there being a voltage across the resistor.

Now power = volts * Amps = E * I
but current I is just E/R so if you put that pack into the power equation you get
power = E * E/R or E2/R

Back to your resistor picking up 1mW of power
1 . 10-3 = E2 / R
or
E2 = 1 . 10-3 * R

Suppose R is 500K then E2 = 500V and so 22 volts of interference is picked up by the resistor.

Now suppose R is 1K ohms then E2 = 1V and so 1 volt of interference is picked up by the resistor.

The power picked up is the same but the resulting voltage is less. It does not disappear but it is much much less.

I have attached a schematic of what I think you are suggesting. Could you please let me know if that is correct?

By and large yes but you need to connect Vcc to a supply voltage and the output can only swing to that voltage minus 1.5V. So if you connect it to 5V the maximum output will be 5 - 1.5 = 3.5V
Also the output can nor go below zero volts. The signal from a pickup coil will swing below zero volts. So to cope with this you need to either take the chips negative voltage to a voltage lower than zero or bias the input signal to the mid point of the supply rail with two resistors. This will mean coupling the input and output through capacitors.
Like the attached circuit, only use 5V not 12V and 1K resistors not 1M.

op amp.png

Imagine a resistor just sitting there in free space ... The power picked up is the same but the resulting voltage is less. It does not disappear but it is much much less.

Ah! I get it!

By and large yes but you need to connect Vcc to a supply voltage and the output can only swing to that voltage minus 1.5V. So if you connect it to 5V the maximum output will be 5 - 1.5 = 3.5V Also the output can nor go below zero volts. The signal from a pickup coil will swing below zero volts. So to cope with this you need to either take the chips negative voltage to a voltage lower than zero or bias the input signal to the mid point of the supply rail with two resistors. This will mean coupling the input and output through capacitors. Like the attached circuit, only use 5V not 12V and 1K resistors not 1M.

I'm sorry to require such babying, but if I understand correctly this circuit will add DC bias to the ac signal from the pickup at the input to the op-amp and will then remove the bias at the output?

Could you tell me if I should use ceramic or polarized electrolytic capacitors? Also, would my LM324 opamp be ok?

I was thinking that I would just provide -5V to the negative supply of the op amp since I have already explored a charge pump circuit, or I could simply use a second 9V battery and supply +/- 9V.

On the other hand, I am intrigued by the idea of biasing the signal to positive. Could this biasing be used in general for my guitar circuit so that I always deal with positive voltage signal? in other words, bias each pickup hot wire, then somehow unbias the final output signal? Then I could try some digital pots instead of the Vactrols, or is that a silly idea?

I am so envious of your knowledge, and so grateful for your patience! Ciao, Bob

but if I understand correctly this circuit will add DC bias to the ac signal from the pickup at the input to the op-amp and will then remove the bias at the output?

Yes that is correct.

Could you tell me if I should use ceramic or polarized electrolytic capacitors?

None polarized capacitors, however for audio work ceramic is not the best option, use polyester capacitors.

Also, would my LM324 opamp be ok?

It should be OK because the signals we are dealing with here are small.

I was thinking that I would just provide -5V to the negative supply of the op amp since I have already explored a charge pump circuit, or I could simply use a second 9V battery and supply +/- 9V.

Yes either of those two solutions would work.

On the other hand, I am intrigued by the idea of biasing the signal to positive. Could this biasing be used in general for my guitar circuit so that I always deal with positive voltage signal? in other words, bias each pickup hot wire, then somehow unbias the final output signal? Then I could try some digital pots instead of the Vactrols, or is that a silly idea?

No that would work fine. Note however with a digital pot that in itself introduces noise when switched and removes the optical isolation from the circuit.

Non polarized capacitors, however for audio work ceramic is not the best option, use polyester capacitors.

So these capacitors would correspond to what you advise ? http://www.taydaelectronics.com/capacitors/polyester-mylar-film-capacitors.html

Or perhaps these? http://www.taydaelectronics.com/capacitors/polyester-film-box-type-capacitors.html

Or some others?

I will have to order the capacitors or find them in a shop, so there will not be any progress for a few days. I will still try with my ceramic capacitors, though. But I will not have much time in the coming days.

As to the biasing, could use that schema in general to add & remove dc bias to my pickup AC signal? That is:

  • a 0.1µF cap at the signal entry point,
  • a voltage divider,
  • processing,
  • and a 0.47µF capacitor at the exit point?

Is there a specific reason for the choice of 0.1µF and 0.47µF capacitors?

I hope you will remain patient - I do feel like I am abusing your incredible kindness...

This discussion with you has been a huge learning experience for me! Thank you! Bob

So these capacitors would correspond to what you advise

Any should do it is not that critical.

As to the biasing, could use that schema in general to add & remove dc bias to my pickup AC signal?

Yes that is how it is done in amplifiers, filters and effects peddles.

Is there a specific reason for the choice of 0.1µF and 0.47µF capacitors?

Well if we are getting technical the value of capacitor affects the low frequency cut off. The larger the capacitor the lower frequency gets through. If you multiply resistance by capacitance you get time, the value of RC is called a time constant. So the actual cut off frequency depends on both capacitor and resistor (impedance of input and output). Those values give results that are acceptable but it is not going to stop working if you have different values, is is just the frequency response of the whole circuit will change. This is why ceramic capacitors are not so good. Their actual value changes a bit more with frequency than other types of capacitors so in effect having different effects at different frequencies. This adds a bit to the total harmonic distortion of the waveform and Hi-Fi nuts think this is bad.

Great answers!

I'll be back with more test reports in a few days. In the meantime, I just received my DIY Carvin guitar kit. This is where I will be putting the improved version of my circuit, with lots of thanks to you as well as to dc42!

Here's the unboxing video: http://youtu.be/xEtvESGYM7w

More soon! Ciao, Bob

gratefulfrog: ... More soon! ...

waiting...

Hi Guys!

I'm back after being away and was able to test the unity gain circuit.

I'm sorry to say, that putting the unity gain amp on the output of my Vactrol voltage divider had no effect that I could hear. The BT noise is as strong as ever... I did not do the DC biasing since I had a -5V (charge-pump) source to power the low op-amp supply.

I also tried the old circuit, but with the ground on the Guitar & Vactrol voltage dividers separated from the Arduino ground. I'm not sure if the result was better or worse, but the the BT noise seemed less audible. I had previously tested this and the circuit hum had been terrible. I cannot explain why it was reduced today, but perhaps because I had all the lights and my pc switched off?

In any event, noise remains the problem with my circuit. I'm wondering if I should continue with the project since music requires pretty good sound quality, and the noise I get is still too much for my standards.

I wonder if shielding the pickups and using shielded wires (for example: http://www.zippertubing.com/EMI-Shielding-Solutions.aspx) for all the audio connections would make a difference? This would be physically hard to do, but do you think it's worth a try? I could also shield the circuit compartment, but I guess I would have to leave the BT transceiver outside then? Doing this will be hard for me, but I could try if it might help?

I know that seems like grasping at straws, but I am at a loss... And we seemed to have explored a lot of possibilities, or maybe not? I was thinking that I could replace the BT with WiFi instead but that is also a lot of work and some cost as well....

So, not_so_grumpy_Mike, what do you suggest?

Should I accept the noise and continue, or somehow can we solve it?

Thanks again, Ciao, Bob

Hi Bob. Without a schematic it is difficult to know what to suggest. There can be two interpretations of your problem:- 1) You did not do what you thought you did in the tests. 2) There is something else about the circuit that I don't understand through lack of a schematic.

Any EM problem is fixable with the correct measures, it is finding those measures that can be troublesome. Are you 100% sure that it is the BT module causing the noise, we m ay be missing something.

Hi Not_Grumpy_Mike!

I am sorry for the delay and thank you again for your patience.

I have attached a schematic of the test circuit. The version shown has the guitar audio ground NOT connected to the Arduino circuit ground. When they are connected, there seems to be more BT noise, but it is very hard to be sure…

I hope to try to build a shielded version next, but somehow I don’t see why the bt noise is so big…

Do you think that it would be better to use Wifi? Would that take more power from the battery?

Any ideas would be great, since I am really at a loss.

Thanks again,
Ciao,
Bob

Do you think that it would be better to use Wifi

WiFi and Bluetooth use the same frequency band so if you get trouble with one you will get it with the other. Things to try Keep the grounds seprate, there've is no need to connect them together. Put a very small capacitor across your pickup coil, about 100pF or so. This will cut down on anything picked up by the coil. Have you tested the noise with no PWM from the arduino? If that works you could try a 1uF across each LED.

Hi not-so-grumpy-mike and everyone else!

I'm sorry for the long silence but I'm back now ready for more fun!

I guess the last time we were trying capacitors across the LEDs? I will do it this week and report.

You asked if PWM impacted the noise: no the noise is the same with or without PWM.

Do we have any ideas as to how the BT signal gets into the opto-isolated audio part of the circuit? Are the vactrols acting as antennae? Might it help to shield them?

Any new thoughts?

Thanks again!

Ciao, Bob