I am building a project which I need sound. To achieve this, I bought an off brand mp3 player and removed its battery and connected straight to the 3V output from an Nano. However I am having a problem with a buzzing sound coming out of the speaker (from my research it seems I have a ground loop).
EDIT
I attached the three circuits that I have tried:
Circuit 1 has a buzz, circuit 2 has a hiss, and circuit 3 sounds perfect.
Here is a soundcloud playlist where you can hear it for yourself - goo.gl/dz8RHK
Now I'd rather use only one power source if possible.
I'm not really following your setup, but one advice i would give you...is it possible to make out a pattern of the noise. If it is, see if it is correlated to something you're running on the arduino (the code etc). Working with high gain stuff, the operation of the chip might affect the output.
To simplify things I unplugged all the non-essentials from the arduino and uploaded a blank code.
I also updated the original post with circuit diagrams and links to soundcloud so you can hear the problem.
In your case you need something big like a 47uF capacitor across power and ground on your MP3 player. You might even need the last circuit on that page with an inductor.
Thanks a lot Grumpy_Mike. I'm heading to my local electronics store to buy some goodies and see if it works!
Would you go with circuit 1 or 2? Bear in mind I will also add a servo, which will have it's own regulator connected directly to the battery.
Ok so I tried adding a 47uF capacitor across the power and ground for the mp3 player for circuit 2, and it sort of works without noise.....the caveat is that it only plays if I do not connect the power input of the amp to ground.....if I do all I hear is a clicking noise....
I also discovered that the mp3 player can take 5V, so I connected to the same regulator as everything else, and put the 47uf across its the power output....and I got the same results as above....no noise, but it only workd when the amp is not grounded.
I also tried adding a 10mH inductor as per the diagram in the website you sent me, but then nothing worked...
Grumpy_Mike:
Try AC coupling the audio into the amplifier. That is use a series capacitor to connect the amp and reconnect the ground.
I use the 47uF, and although I can now it works with ground connected, the audio became extremely low.
I also tried with a 0.1uF capacitor, but it made no difference and I still couldn't connect ground
You rearly need to do some measurements to see what is actually happening with your signal. I suppose you have not got access to an oscilloscope have you?
Not sure what to suggest without.
If you have got what you put as a block diagram then you are not doing anything silly. I am assuming that your regulators have capacitors on both input and output. Maybe you could post a picture of your circuit.
Ok, so I have attached my setup of what I thing circuit 2 is....without any capacitors.
Also, there is a video of it kinda working but not really - - YouTube
It is worth to note, that without the capacitors, if the amp ground is connected,the mp3 player goes into some sort of short and keeps restarting. If I put the capacitors, the mp3 player works regardless, but the amp still only works when ground is not connected.
Hi,
Can I suggest you get rid of the transistor 9V battery and use a decent power supply.
Can you measure the voltage of that battery when you have everything turned on and running.
They are not designed for this sort of work.
Where is the NANO?
You see it is all down to words. You said you had a regulator but you did not say it was a regulator board. Most people here would assume you had a regulator chip.
Can you post a link to the regulators, amp and MP3 player.
It is worth to note, that without the capacitors, ......
Which capacitors are you talking about, you have two different ones, the decoupling capacitors on the supply and the AC coupling capacitors on the audio.
Yes Tom is quite right a 9V battery like that is not much good for you.
TomGeorge:
Hi,
Can I suggest you get rid of the transistor 9V battery and use a decent power supply.
Can you measure the voltage of that battery when you have everything turned on and running.
They are not designed for this sort of work.
Where is the NANO?
Tom.....
So the "9V" battery I'm using has an output of 7.8V when everything is off and 7.7V when the circuit is on.
I changed that to a breadboard power supply (http://goo.gl/cgP2mf) connected to a 12V wall wart, but I get the same problem
And I removed the NANO for now, because it did not seem to be the problem and I wanted to try to simplify things as much as possible.
As I seem be be slightly over my head, I'll just describe the whole setup and maybe I can get some advice.
I am trying to build a dancing baby Groot. I need to move a servo in time with music as well as playing the music, so I will also connect a servo and then use the NANO to convert the audio input from the mp3 to an output to the servo (basically using the volume level of the music). I do not have much space in the flower pot I got for a lot of batteries, so do you think 4 AA can do the job, or should I try to get my hands on a LiPo?
Grumpy_Mike:
Which capacitors are you talking about, you have two different ones, the decoupling capacitors on the supply and the AC coupling capacitors on the audio.
I was talking about the decoupling ones (47uF)...I'll try again with both decoupling and AC coupling one (I assume 47uF is also a good value?)
Grumpy_Mike:
Yes Tom is quite right a 9V battery like that is not much good for you.
For now I'm using this connected to a 12V wall wart, and skipping the regulators altogether. I'll put decoupling capacitors before the amp and mp3 player as well as the ac coupling capacitor and report my results.