4
\$\begingroup\$

I want to use a 5 V square wave generated by an ATTINY85 to drive a 1 W, 8 ohm speaker at 1 W. The project has to be battery powered.

I would like to use a 18650 rechargeable 3.7 V Li-ion battery and a 5 V 600 mA boost converter:

18650 3.7V Li-ion battery and 5V boost converter

With a simple emitter-follower circuit, it doesn't seem possible to me to achieve the required 2.82 V (RMS) swing.

I considered using an LM386N amplifier, but from the datasheet it seems that the output voltage would not be enough to achieve the required 1 W maximum power.

I am wondering if I have to use more capable boost converter, making the project more complex having other stuff which need to work at 5 V, or if it is possible to do something else.

\$\endgroup\$
5
  • \$\begingroup\$ why emitter-follower instead of common-emitter? \$\endgroup\$
    – user253751
    Mar 22, 2021 at 11:23
  • \$\begingroup\$ Just a dump idea, but maybe a FET driver would work nicely? \$\endgroup\$
    – Michael
    Mar 22, 2021 at 17:11
  • \$\begingroup\$ @user253751 Because I already had 5 V at the base so I thought that I could have solved my problem with current gain. \$\endgroup\$
    – stenio
    Mar 23, 2021 at 8:08
  • 1
    \$\begingroup\$ An emitter follower loses 0.7V of voltage; a common-emitter amplifier (driven all the way to saturation) loses 0.2V. \$\endgroup\$
    – user253751
    Mar 23, 2021 at 8:24
  • 1
    \$\begingroup\$ @user253751 It is still not enough but I will keep it in mind for future projects. Thanks. \$\endgroup\$
    – stenio
    Mar 23, 2021 at 8:37

3 Answers 3

9
\$\begingroup\$

If you need to drive a square wave the usual trick (from the piezo days) is to use an H-bridge do double the applied voltage:

  • On 'forward' you have 5V applied
  • On 'reverse' you have -5V applied

… driving thus the speaker with a 10Vpp signal You could use a bridge intended for small DC motors, the load is in fact similar.

Just remember to switch off the bridge when you are done otherwise you'll burn the speaker with a DC signal.

\$\endgroup\$
3
  • \$\begingroup\$ "from the piezo days" this means that something else is being used these days... can you please tell me about what is being used in these days? \$\endgroup\$ Mar 22, 2021 at 10:38
  • 1
    \$\begingroup\$ @Sanmvegsaini Speakers, I guess \$\endgroup\$
    – user253751
    Mar 22, 2021 at 11:23
  • \$\begingroup\$ I meant that's a trick often found for piezo in battery powered equipment. Some japanese MCU (Epson I'm talking to you) had a mask option to pull out the inverted phase to drive a piezo beeper; the piezo have usually no issues with DC biasing. Now piezo are often self oscillating so it's a while I don't see this done \$\endgroup\$ Mar 23, 2021 at 8:51
3
\$\begingroup\$

Overkill for a square wave, but you can use a class-D amplfier-on-a-chip such as the PAM8403. It will give you typically 900mW (or is it 1.8W?) at 10% distortion (meaningless with a square wave) with an 8 ohm load, using just one half. Not sure if the specs are per channel or total.

enter image description here

The chips are available through distribution or you can buy an inexpensive module from China for a dollar or two.

More conventional mono bridged amplifiers such as the LM4871 are also available. They have been cloned and very inexpensive modules are available. The cloned chips (eg. LTKCHIP Shenzhen) are only a few cents each in one reel quantity.

enter image description here

\$\endgroup\$
0
\$\begingroup\$

A simple way is to add a push-pull stage to the output of an op amp. See: https://en.m.wikipedia.org/wiki/Push%E2%80%93pull_output.

That just adds two transistors, and pretty much any transistor will work.

For more info, see also: https://www.analog.com/en/technical-articles/increase-amplifier-output-drive-using-a-push-pull-amplifier-stage.html this app note uses a dual supply, it would also work with a single supply. Whatever your + and - supply to the amp is would work as the + and minus of the push pull.

EDIT: I originally wrote that you could add a push pull after the LM386. However, the LM386 has an internal feedback resistor that will take away the benefit. I edited the answer to say to use it with an op amp instead of a LM386. (See discussion below)

Also, I made it clear that the app note can use a a single ended supply.

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Doesn't address the actual question asked so downvoting, I'm afraid. (a) The LM386N already has a push-pull output, so adding another does nothing but spend money. (b) The Analog Devices link shows a circuit that uses positive and negative supplies to gets its power increase. The OP hasn't got a negative supply. \$\endgroup\$
    – TonyM
    Mar 22, 2021 at 9:33
  • \$\begingroup\$ I also realized that the lm386 also had an internal feedback resistor, so you can't easily use the push pull in a negative feedback.I think you can use a second push pull even if the output is push pull, you are kind of making a darlington pair in that case, but you still need the feedback after. I'm changing my answer to say that it won't work as well work a LM386, but it would with a regular op amp. \$\endgroup\$
    – KD9PDP
    Mar 22, 2021 at 10:08
  • \$\begingroup\$ @tonyM I made the edit I mentioned in the previous comment, but wanted to point out you can still add a push pull after an op amp that has a push pull output. The ap note I linked was for adding a push pull to an op amp that already has a push pull output analog.com/media/en/technical-documentation/data-sheets/… the fact that the op amp is single or dual supply doesn't really matter, the push pull still works if it's to ground and single supply op amp. Whatever your op amp supplies are, push pull will take the same supply and work. \$\endgroup\$
    – KD9PDP
    Mar 22, 2021 at 10:20
  • \$\begingroup\$ But my comment "(a) The LM386N already has a push-pull output, so adding another does nothing but spend money" is true and nothing to do the general topic of additional push-pulls. I'm writing specifically about the OP's question so the edits still leave the answer wrong. And you've ignored "(b)...The OP hasn't got a negative supply" and left the AD link in - how come? \$\endgroup\$
    – TonyM
    Mar 22, 2021 at 10:43
  • \$\begingroup\$ @tonym If you are current limited after a push pull, you can add another push pull and still get more current and therefore more power. The LT6020 also has a push pull output just like the LM386 and you can increase power putting another push pull after it. It isn't true that adding a push pull is a waste just because the LM386 already has a push pull. Also, it doesn't matter that the OP doesn't have a negative supply. Whatever your negative supply to the amp is (even if it is ground) will still work. It's still a good example of what the circuit looks like. \$\endgroup\$
    – KD9PDP
    Mar 22, 2021 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.