I have this speaker that will be getting its audio source from my Arduino Mega using the TMRPCM library where it will play some wav files.
I have successfully played the songs but the power source of the speaker is coming from an external battery(not connected to the Arduino Mega).
I need the speaker's amplifier to be connected as the same source with the arduino so I can power everything through one rechargeable battery.
Ill be attaching the picture of the schematic.
The Lipo battery having a voltage of 3.7v will be connected to a step up module where it will "step up" the voltage to 9v to be connected to VIN pin of the Arduino Mega in order to power it up.
The speaker on the other hand is also connected to that 9v supply but instead of having a loud sound it only produces a weak sound but still plays the wav file.
When I have the speaker connected to a 9v external battery not connected to the arduino it produces a loud volume which is what I need.
Thank you for those who will help out
Try disconnecting the ground of the 3.5mm jack. The speaker could be splitting in the 9V into 2x 4.5V, meaning that the speaker's "ground" level is at 4.5V, instead of 0V.
The signal should be capacitor-coupled anyway, so the DC offset doesn't matter. (Although it will give a click when turning on the device.)
Pieter
So what Ill do is, Disconnect the gnd of the 3.5mm jack? then try to supply the speakers from the arduino mega source?
Thanks Pieter
Bat+ → Arduino Vin & Speaker Vcc
Bat- → Arduino GND & Speaker GND
Arduino output pin → 3.5mm jack signal
nothing to 3.5mm jack GND
Pieter
Thank You sir Pieter! its now working
Another question.
The speaker has a headset jack, but when I would connect a headset it would be too loud to use.
Originally the speaker used an ac socket as its supply. I removed the ac part and transformer and instead connected the dc source of 9v(as i mentioned earlier 9v supply from step up module).
Is there a way to decrease the loudness from the headset but still maintain the loudness of the speaker when the headset is not connected?
Thank you again sir