I’ve attached 2 photos of the circuit to help you understand!
Let me give you an idea of how the circuit works, first, then I will tell you about the results of some experiments I did today.
First, as I mentioned, there is a single common ground for both the Arduino and the Guitar parts of the circuit. The signal or hot wires from the guitar are optically separated from any voltage coming from the battery via the Arduino.
The guitar has 3 pickups, each with a hot wire and a ground.
Each hot wire connects to the LDR of it’s “selector” LDR. To turn a pickup “on”, I set the LED to “HIGH” thus bringing the LDR’s resistance down from huge to around 80 ohms. This “HIGH” setting is a digital out from the Arduino.
The hot wires coming out of the selector LDR’s are connected in parallel to the input node of a voltage divider which is composed of 2 LDR-LEDs. These LED’s are controlled by PWM pins of the Arduino, at the highest frequency of PWM possible for the Arduino Micro (this was needed to keep the oscillating LED’s frequency from causing the LDRs to oscillate in harmony).
The voltage-divider LDR’s together provide the resistance range of a 500KOhm pot.
The output of the voltage divider goes to the amp lead, but it is also connected to another LDR-LED (500KOhm) which is connected to a 22nF ceramic capacitor to ground. This acts as the “tone” control of the guitar, just like the tone pot, it filters out the hgher frequencies if the resistance is low. This is again PWM controlled.
Finally, I used a little trick to boost the volume of the guitar at maximum vol setting. A LDR is connected in parallel to the voltage divider input, and its output goes to the amp lead. This is a digitally controlled on/off LED.
So to summarize, there are 3 vactrols controlled by PWM in the entire circuit. All the others are controlled by DC voltage.
Now that the stage is set, here are the results of my experiments:
- first I disconnected all the guitar pickups and the guitar ground from the circuit
- then I set all the arduino pins to zero
- under these conditions, there was very little bleutooth noise, it was still audible at the amp, but the volume had to be turned way way up to hear it slightly.
- Now here’s the first interesting point: no matter which digital pins I activated, there was absolutely no change in the bluetooth noise coming from the amp
- Here’s the next interesting result: as I increased the PWM of ANY of the PWM pins, the noise became gradually stronger. PWM values superior to 15 (on [0…255]) caused maximum noise. There was no significant difference for values greater than 15.
- Next, I tried to increase the PWM of the various parts of the simulated pots:
- Increasing the PWM on the tone pot, i.e. reducing the resistance to ground, turns on the noise strong
- Increasing the PWM on the second LDR in the voltage divider, i.e. the resistance to ground, turns on the noise strong
- Increasing the PWM in the first stage LDR of the voltage divider, i.e. the resistance between input and output nodes, causes the noise to come on but much less strong than in either of the other cases!
- Next, I reprogrammed the Arduino to eliminate the PWM. using only HIGH/LOW and no PWM.
- Now it was clear: turning on any connection to ground turned on the noise
- Turning on the 1st stage of the voltage divider, did not cause the noise
- Once either the tone LDR or the 2nd stage of the voltage divider was on, allowing a low resistance path to ground, then switching on/off the 1st stage of the voltage divider had no effect
There are perhaps several ways of interpreting these results. But it is clear that letting the signal into contact with the common ground lets the noise in. The question is if any ground will cause the noise, or if it has to be the common ground with the Arduino & bluetooth transceiver?
A second question is what would be the noise consequences of separating the 2 gounds? What will happen without the common 0V reference ?
I’m planning on doing a next experiment by separating the ground reference for the 2 sides of the circuit, but previously I had tried this and there was terrible hum… So I am not sure about it. This will require quite some work, so please be patient.
I feel that with your help, I have been able to make some real progress!!! Thanks again, so much!
I will get a ferrite brick tomorrow at a shop to try that.
I would be happy to hear your thoughts.