Hello everyone,
I have been looking for about 2 days for a good way to generate sound from a biased square wave, using LTSpice to simulate everything, but I keep seeing high distortion or low efficiency. Since I'm quite unexperienced in this field I decided to post my question here, to make sure I get the basics right.
So at the start I have a pulse wave between 0 & 5 volts, with a fixed frequency (only one tone at a time). I could send this straight into a speaker, but then I would get a 2.5V DC bias into that speaker (not good as far as I read), high distortion because of the square wave, and most importantly , not enough power. My source delivers 10 mA and I need 600mA for the speaker (4 Watts, 8ohm). So I need to double the voltage (5V p-p instead of 2.5V) and a higher current. I have 5V, 9V and 24V available.
I've found some amplifier circuits online, but they all have problems:
1) http://bryanduxbury.files.wordpress.com/2012/01/amplified.png?w=400&h=183
has no DC bias compensation so not good for the speaker. A capacitor in series with the speaker doesn't work here. (correct me if I'm wrong)
2) http://www.electronics-tutorials.ws/amplifier/amp31.gif?81223b
Speaker between Vou and 0V would work, if the resistors in series with the transistor are very low (I need 5V over the speaker). Result: high power loss (easily 70%). Since I'm working on batteries I want to avoid this dissipation of 5-6 watts.
3) http://forum.arduino.cc/index.php?topic=66637.15
Same problem as 1 I think: DC current through speaker. (correct me if I'm wrong)
4) http://www.electronics-tutorials.ws/amplifier/amp47.gif?81223b
Could work, but has some disadvantages which were solved by this one:
http://www.ibiblio.org/kuphaldt/electricCircuits/Exper/05320.png
They both work fine with AC signals 0.5Vp-p I suppose, but again. Mine is 2.5V p-p. So I need to lower it through voltage division, and at the same time low-pass filter it (remove distortion square wave) and high pass filter it (to remove DC bias). This contradicts. And if I want 15kHz to pass I can't get a sine wave out of 2kHz with the same low pass filter. Additionally I don't have -9V so I need to use virtual ground, which gets complicated.
5) So I thought: if I have to go to 0.5V p-p anyway, why shouldn't I use an amplifier chip, like a TI LM384. This simplifies my work. But even then I still wonder how I can get from 0 - 5V pulse to -0.5 - +0.5V sine wave in the complete 2kHz - 15kHz spectrum. And do I have to do this before or after the amplification? I think in case of a chip I need to do it before. But is that the best choice?
6) Perhaps I'm going too far? Is a DC current really a problem? Do I really need a +- sine wave or will my speaker also sound OK with a square wave?
Here I got a bit lost... Can anyone point me in the right direction?
Thanks a lot for anyone who can help!
Kind regards,
Davy Van Rossem
I have been looking for about 2 days for a good way to generate sound from a biased square wave, using LTSpice to simulate everything, but I keep seeing high distortion or low efficiency. Since I'm quite unexperienced in this field I decided to post my question here, to make sure I get the basics right.
So at the start I have a pulse wave between 0 & 5 volts, with a fixed frequency (only one tone at a time). I could send this straight into a speaker, but then I would get a 2.5V DC bias into that speaker (not good as far as I read), high distortion because of the square wave, and most importantly , not enough power. My source delivers 10 mA and I need 600mA for the speaker (4 Watts, 8ohm). So I need to double the voltage (5V p-p instead of 2.5V) and a higher current. I have 5V, 9V and 24V available.
I've found some amplifier circuits online, but they all have problems:
1) http://bryanduxbury.files.wordpress.com/2012/01/amplified.png?w=400&h=183
has no DC bias compensation so not good for the speaker. A capacitor in series with the speaker doesn't work here. (correct me if I'm wrong)
2) http://www.electronics-tutorials.ws/amplifier/amp31.gif?81223b
Speaker between Vou and 0V would work, if the resistors in series with the transistor are very low (I need 5V over the speaker). Result: high power loss (easily 70%). Since I'm working on batteries I want to avoid this dissipation of 5-6 watts.
3) http://forum.arduino.cc/index.php?topic=66637.15
Same problem as 1 I think: DC current through speaker. (correct me if I'm wrong)
4) http://www.electronics-tutorials.ws/amplifier/amp47.gif?81223b
Could work, but has some disadvantages which were solved by this one:
http://www.ibiblio.org/kuphaldt/electricCircuits/Exper/05320.png
They both work fine with AC signals 0.5Vp-p I suppose, but again. Mine is 2.5V p-p. So I need to lower it through voltage division, and at the same time low-pass filter it (remove distortion square wave) and high pass filter it (to remove DC bias). This contradicts. And if I want 15kHz to pass I can't get a sine wave out of 2kHz with the same low pass filter. Additionally I don't have -9V so I need to use virtual ground, which gets complicated.
5) So I thought: if I have to go to 0.5V p-p anyway, why shouldn't I use an amplifier chip, like a TI LM384. This simplifies my work. But even then I still wonder how I can get from 0 - 5V pulse to -0.5 - +0.5V sine wave in the complete 2kHz - 15kHz spectrum. And do I have to do this before or after the amplification? I think in case of a chip I need to do it before. But is that the best choice?
6) Perhaps I'm going too far? Is a DC current really a problem? Do I really need a +- sine wave or will my speaker also sound OK with a square wave?
Here I got a bit lost... Can anyone point me in the right direction?
Thanks a lot for anyone who can help!
Kind regards,
Davy Van Rossem