Using a PIC, I got a signal oscillating around 2.5V +-[0,2.5]V approximately. This is intended to generate a simple sound through a small speaker.
The speaker, unfortunately works with 0V +-[0,2]V, and I expect the direct usage of 0-5V not resulting in the same sound (or even breaking the speaker). Consequently, I would need to displace the ground to 2.5 for the speaker.
Could someone indicate me the direction for a solution?
I did not managed to go very far,
- Using opamp, but they mostly threat the input voltage, so a negative voltage source is required. I should probably reminder how they work in case it is the solution.
- Splitting the voltage with resistors, but that did not convinced me due to attenuation.
- I finally looked for some LM317 to generate a ground at 2.5V; However, I am not sure if it would work when the wave provide "negative" values.