Amplified Audio Circuit with Coin Cell Battery

Thread Starter

gillyman

Joined Feb 2, 2024
4
Hello,

I am working on a small audio circuit, which, due to size constraints, I want to power with a typical CR2032 coin cell battery (this is also a convenient battery option for replacement). In the current design (see attached image), I am using an ATTINY45 to produce a differential PWM signal from PB3/4, which is then amplified by the TPA2005D1DGN audio amp before going to the speaker.

My issue is that the amp is not actually amplifying the signal going to the speaker. In fact, the speaker is much louder when I connect it directly to the controller. I have spent a lot of time going through datasheets to figure out why this is happening, but have been unsuccessful.

I contacted TI about this issue, and they suggested utilizing a power source that could provide up to 450mA. I connected the 5V/500mA power supply from my Arduino Uno to the system, but that did not change the outcome.

Other potentially important details:
  1. Amp Input Resistors: 20kohm (recommended minimum is 15k)
  2. Speaker: 8 ohm, up to 1 W
  3. The system will be in standby mode most of the time, with the ATTINY and amp in low power (reason for the button). The power drawn from the coin cell will be negligible during this time.
  4. I need to maximize the volume because this device will be used in a noisy environment. For reference, I would like the output to be capable of a similar volume to current-gen iPhones.
  5. I am programming the ATTINY with the Arduino IDE.
  6. Eventually, I want to produce a more complex tone than a square wave, so I don't think a piezo-buzzer is the best option.

A couple of questions:
  1. Is there something obviously wrong with my circuit design that I am missing?
  2. Is there a simpler way to achieve my end goal (i.e., loud, simple, energy-efficient, compact speaker)? For example, I was thinking about using a MOSFET with the gate controlled by the ATTINY...

Thanks for your time,
gillyman
 

Attachments

Thread Starter

gillyman

Joined Feb 2, 2024
4
Thanks for the quick response, crutschow.

In that case, would you recommend that I throw in an RC filter to create a DAC or should I forgo the amp altogether for another strategy?

If I go with the RC filter approach, then I would need to up the PWM frequency above cutoff and simulate a sine wave by modulating the duty cycle at the desired frequency, correct?

Apologies if these are basic questions. I'm an aero engineer, not electrical haha
 

crutschow

Joined Mar 14, 2008
34,386
In that case, would you recommend that I throw in an RC filter to create a DAC or should I forgo the amp altogether for another strategy?
Yes, using an RC filter to derive the audio signal might be the best, as that TPA2005D1DGN amp should work well to generate a high efficiency audio signal to the speaker.
Make the PWM frequency as high as possible, to minimize the filtering required for minimum ripple and to give a good analog signal.

What's the highest PWM frequency you can generate and still provide the desired signal?
What would be the highest audio frequency?
 

Thread Starter

gillyman

Joined Feb 2, 2024
4
Okay, I'll give that a go.

I think the highest frequency signal I can produce with the onboard PLL clock is 64MHz/255 = 250kHz PWM. Is this what you mean?

Right now I'm just trying to get a smooth, loud 440Hz (A) tone. Eventually, I want to use the onboard programmable memory to produce a more complex tone (wav file decomposed into hex). I'll use a slower clock to step through the memory at a specified sampling frequency.
 

crutschow

Joined Mar 14, 2008
34,386
The CR2032 has a rating of :
Maximum discharge current: 3 mA. Maximum pulse discharge current: 15 mA.
Is that sufficient for powering your speaker?
If not, would you have room for a larger battery?
 

Thread Starter

gillyman

Joined Feb 2, 2024
4
Thanks for your responses.

The speaker I have is 8 ohm and rated to 1W. A ~350mA current would max it out, so I figured the 5V/500mA power supply provided by the Arduino Uno would have been more than sufficient to power the whole system. In any case, I originally thought the amp would amplify the signal no matter what (even if it ended up still being too quiet). I did not expect it to be quieter than without.

Regarding MisterBill2's question, even though the speaker is louder without the amp, it is still not loud enough.

I'll work on implementing a DAC and report back on whether that solved the issues.
 

LowQCab

Joined Nov 6, 2012
4,052
You're thinking way too small.

440hz is approaching the lowest Frequency that a tiny ~2"-Speaker can reproduce,
then it's output-efficiency starts dropping like a rock, and it wasn't much to begin with.

How will You know when the Battery is dead ?

If this is Safety-related, You should completely re-think this project.
.
.
.
 
Top