Tiny high efficiency audio DAC

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I need a very small and highly efficient audio DAC, capable of driving a 0.15Watt 20mm mini speaker.
Power source: 3V lithium coin cell.

20mm speakers are available with 8ohm, 32ohm and 100ohm impedance.
How about putting a LC filter on the PWM output of the Mega48 and drive a 100ohm speaker directly. Would this be the smallest and most efficient ADC possible?
I'am open to other suggestions.

Regards,
Timmy Brolin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How about putting a LC filter on the PWM output of the Mega48 and drive a 100ohm speaker directly. Would this be the smallest and most efficient ADC possible?

I do this, and it works pretty well. There are a couple of things to consider,
though. Driving a speaker will require some current from the battery.
What kind of sound are you wanting to produce, how loud, and for how
long? A coin cell may or may not be able to provide the required peak
current. The avr port pin can drive the filter/speaker directly if only
low sound levels are required. Otherwise an efficient switch circuit
will be needed to drive the filter. Check out the SOT-23 .4 ohm SPDT
analog switch by Pericom, for example. To keep the filter inductor
small you want as high a pwm frequency as possible, but the faster
you run the mcu, the more power it wants. It's all about compromise 8-)

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need to reproduce human speech. Perhaps one minute of continuous speech (but multiple times). I'd like at least an hour or so of total speech time from one coin cell.
It must be loud enough to be heard from within at least one meter or so of the speaker.

PWM frequency is indeed a problem, I was considering sacrificing one bit of precision in order to double the PWM frequency and get the size of the inductor(s) down.
The DC blocking capacitor is another problem, one solution I'am considering is this:

This circuit should have two advantages. 1: It quadruples the possible output power for a given supply voltage.
2: The DC blocking capacitor can be omitted if the software performs digital high-pass filtering.

Question is, are the ATMega8 pins strong enough to do this, and can they be damaged by the currents generated by the inductors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can probably get away with 20 to 40 ma from the port pins, but as the current increases
through the port fets, power will begin to be dissipated in the fets instead of in the
speaker where you want it, reducing overall efficiency. I don't think you will have
to worry about actually damaging the device. I think the real issues will be running
from a coin cell, and getting acceptable levels without buffering the pwm signals
with additional switches. Also, you can save a buck by just using one inductor instead of two.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are right. Coin cells are rated for 10mA (non continously).
I tried sticking my multimeter pins in my hifi speaker while playing some music at low levels.
0.005Watts is very audible. At 2.5Volts, that equals 2mA. I think lithium coin cells should be able to handle that. At thoose levels, the ATMega8 pins should be happy as well don't you think?
Good idea to remove the second inductor, that only leaves one inductor, one small ceramic capacitor, and software high-pass filtering to avoid DC biasing the speaker.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like a plan! Another thing to try when you breadboard the thing,
just omit the filter and drive the speaker directly with pwm and see what
it sounds like. With a fairly high pwm frequency, it might sound ok without
the filter.

Looking forward to hearing how it works!

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about using a ceramic (piezo) speaker to increase efficiency. Sound quality may suffer a bit, but they waste very little power... e.g. DigiKey P11123-ND http://dkc3.digikey.com/PDF/T052/1322.pdf.

I've used these to great effect in portable bio-acoustic field equipment where power consumption is critical (hard to recharge in a jungle).

Nick

Nicko

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nick: Really cool speakers! Nice and thinn as well. Unfortunately their outer dimensions are to big for this project.
At 0.005Watts the speaker will not be the largest potential power consumer in the system. The zigbee RF transciever is..
I had not previously considered the fact that coin cells have very limited current capability. Zigbee requires ~20mA when actively transmitting/receiving.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you can move to 5V maybe the CS4334 from cirrus logic can fit to your requests.
Kostas
(24 bit audio,SOIC-8 package, no need for external amps..)

It's better to keep your mouth shut and think you a fool, than open it and move out the doubts!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

krako: Thanks, but it is not really what I'am looking for. The device you are suggesting is power inefficient, big (SOIC-8) and requires 5V which is hard to provide using a lithium cell.

Regarding the discussed LC filtered PWM DAC solution, I have an idea. How about shifting the inverted PWM output 180degrees out of phase?

This would effectively double the frequency, hence easing up the filtering requirements making it possible to use smaller L and C values or a lower frequency oscillator for the AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yo ampz... tell this slow old geezer how you put pictures in messages again?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How about shifting the inverted PWM output 180degrees out of phase?

While it would double the frequency, it looks like it would also reduce
the maximum voltage by half.

I would be neat to digitally phase shift- I am using a little TI class D power amp
that feeds a 200 Khz square wave to each side of the speaker. Zero phase shift = zero
voltage, 180 degrees shift equals max voltage. If I could just do that inside the mcu...

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner: Put the picture on your web server, then use the [IMG] tag to put them in your message.

tpappano: Refresh this page, I updated the picture to show you there is no change in maximum voltage.
There is however a change in the voltage the AVR pins has to switch. Without 180 degree phase shift the pins has to switch 6Volts (assuming 3Volt power supply). With 180 degree phase shift, they only have to switch 3Volts. Also, without phase shifting the two pins will switch simultaneously, meaning high incident currents. With 180 degree shift they will almost never switch simultaneously.

tpappano wrote:
I would be neat to digitally phase shift- I am using a little TI class D power amp
that feeds a 200 Khz square wave to each side of the speaker. Zero phase shift = zero
voltage, 180 degrees shift equals max voltage. If I could just do that inside the mcu...

No. I assume you are talking about phase shifting a 50/50 square wave? The average voltage across the speaker will allways be zero, no matter how much you phase shift the signal. In order to change the voltage across the speaker you have to change the duty cycle of the signal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
No. I assume you are talking about phase shifting a 50/50 square wave? The average voltage across the speaker will allways be zero, no matter how much you phase shift the signal. In order to change the voltage across the speaker you have to change the duty cycle of the signal.

Oops, I lied! 8-)
You are right, I was remembering the wrong diagram. Duty cycles are changed, but
no filter is needed. The device is the TPA2000.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma