novice confusion about transistors in simple 8-ohm speaker amp

Like many before me here, I'm an electronics and Arduino beginner, at the point of wanting to hook up an 8-ohm speaker rather than just drive a passive buzzer, like the poster here. In that thread and others like it, dc42 has suggested a simple combination of a BC337 and BC327 (e.g. his reposted Scan 177.jpg) that I've breadboarded and works great.

Moving on to soldering and enclosure-building, I've soldered a circuit that I believe trivially extends dc42's amplifier to include a volume control and an on/off switch. I have a LOG POT WITH SWITCH that does both, so have imagined the circuit and its corresponding wiring diagram as pictured in the attachment, where the Pot/Switch is the pink beast lower-left in the wiring diagram. (GND is up top in the wiring diagram because all three conductors exit the enclosure in a single cable).

I am mightily surprised to discover my on/off switch is irrelevant to this setup, and in fact, on some debugging, to learn the entire +5V input is irrelevant. In other words, the speaker happily plays sound driven by SND with the switch open, and even with input power disconnected.

Can anyone explain this to me? I don't think I'm seeing a wiring error, but am happy to be wrong about that. Is the (lower-voltage, and possibly volume-attenuated) SND signal coming into the 337's base dumping into its emitter even in the absence of any "collected" voltage (i.e. no +5V downstream of the switch), and the whole speaker being driven off of that? Or...

Also, where could I conveniently orchestrate a fix? I was naively assuming that a good way of implementing OFF would be to interrupt the power (+5V). Should the switch instead be, say, in the orange wiper signal (volume-attenuated SND) coming off the pot, before it hits the base of either transistor? Or further along in the flow, like between the capacitor and the speaker? Do I have to worry about ambient signal "floating" downstream of the switch, and to correct it PULLUP or PULLDOWN somehow? (If so, erm, how?)

Sorry to be so ill-informed about my options. I am trying to learn from library books and web-resources, and while I find lots of "do it exactly like this" projects I find very little big-picture guidance for heading out on my own. Regardless of my understanding of transistors this has been an excellent early soldering exercise; I've got the whole thing down to a 15 x 6 hole chip of perfboard. Still, I would like to grow my understanding of transistors and also have a functioning on/off switch!

Thanks in advance for your help, especially where calibrated to my weak foundations!

Nick

The image file that you uploaded .... shown above.

If the 5 V supply is totally removed (ie. switch open), then it looks like the circuit can still be driven by the input signal (ie. "SND").

As long as the source of 'SND' is able to provide the adequate current (power) needed to drive the speakers, then you'll hear something.

If 'SND' is a constant DC voltage ... like 5V, then the voltage divider will drop that voltage. And the capacitor will charge up to that voltage (which takes a finite amount of time). At the same time that the capacitor charges up, the voltage across the speaker reduces (decreases) toward 0V. This puts some energy into the speaker to drive the speaker in one direction. Then, if "SND" becomes 0V, the capacitor can discharge, becoming an energy supplier......and the voltage across the resistor jumps up to the capacitor voltage (and decaying will follow), which drives the speaker in the other direction. If you keep applying 5V and 0V in cycles .... at suitable frequency, then the speaker should make noises....as long as the source of "SND" can supply enough current, and provided that the voltage from "SND" is big enough.

When the capacitor discharges.. the current goes through emitter to base (of the 327).... so need to make sure this transistor can handle the current (for the EB 'diode' current). Similar situation for the 337 (base-emitter current when "SND" is arbitrarily 5V) for the case where the power source (not the SND voltage) is switched out.

That amplifier is so bad/wrong in many ways.
There is no input biasing, the transistors have to be matched and they will never survive as they will over heat.

The days of making an amplifier from discrete components has faded into oblivion.

Reasearch a proper all in one package.

.

Yeah, try searching for LM386 module.

Like this one: https://amzn.to/2KdvU7O
Or, how about this little Class-D module [just add pot at input]: Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302 : ID 2130 : $3.95 : Adafruit Industries, Unique & fun DIY electronics and kits

ReverseEMF:
Yeah, try searching for LM386 module.

In the thrift store?

Things have moved to class-D.

Try the PAMxxxx range for tiny amps.
PAM8403 2*3watt class-D (high efficiency) on a circuit board for < US$1 on ebay.
Leo..

OP here. Thanks for the feedback on different directions but I'm interested in learning, rather than shopping! I understand a LM386 gives me a convenient amp in a chip. But a chip doesn't help me understand how it works. Can you help me understand why the circuit as shown "is bad in so many ways," or why it delivers sound even when the power switch is open, or where a better location might be for that switch?

Thanks,
Nick

@SouthPark, I think I follow your explanation---thanks! So the 337 passes divided-SND's voltage on to its emitter, and from there (through the capacitor) to the speaker. In this scenario, it sounds like moving my switch into the SND channel (either pre- or post-pot) should provide a more functional "off?"

Nick

The classic class-B transistor output stage is more like this:

[ The correct terminology is "complementary push-pull output stage", meaning NPN + PNP ]

Note the diodes to bias the bases just into conduction and the small resistors on the output to
limit the current and stabilize the bias - this removes cross-over distortion (which is horrible).

The values chosen here are for a low power headphone circuit, in bigger amps the output
resistors are much smaller in value.

The input is capacitor coupled so no DC offsets are pushed back to the input, the output is capacitor
coupled so the speaker/headphones don't burn up or end-stop.

With no power to the amplifier stage it will be attenuating the signal, not amplifying it. The
base-emitter diodes in the transistors conduct once there's 0.6V or more available, which accounts
for the break-through of the signal without power applied. Generally its not a good idea to run an
amp like this.

If your volume control/switch is correctly configured the volume is fully down when the switch
operates so you'd never hear break-through.

Here is a reasonable resource on amplifier design.

http://files.books.elebda3.net/elebda3.net-gh-238.pdf

Are you proposing to build a device which will make a loud noise, or a proper HiFi amp? And at what power level?

There's an awful lot of difference....

Allan

allanhurst:
Are you proposing to build a device which will make a loud noise, or a proper HiFi amp? And at what power level?

There's an awful lot of difference....

Understood. Per my subject, I am building "a simple 8-ohm speaker amp" at novice level driven by an arduino and a 5v powersupply.. nothing HiFi or high powered!

Thanks to the many respondents with suggestions I buy a different amp, or build a different amp, and special thanks to MarkT and SouthPark whose comments helped me understand the two specific questions I was asking about the amp I'm trying to build -- where the "breakthrough" comes from and why my switch appeared useless. I've rewired my volume pot/switch to eliminate breakthrough (bingo, MarkT!), keeping the rest of the circuit design since at least (SouthPark!) I now understand it. Next I'll build something incrementally fancier even if I'm still a ways from making sense of some of the other suggestions.

The circuit drawn by MarkT is a perfectly viable starting point - but..

  • It has a gain of 1.
  • it'll only generate about 3.8v p-p, which into 8 ohms is only (3.8 / 2 x SQRT (2))^2 / (8 + 4.7/2) or about 200mW.

Not much.

Allan

I think that includes the power generated in the 4.7ohm resistors.
Leo..

Consumed by. But yes.

So into the 8R load even less.

But fairly clean.

If you want significant power you need either a higher supply rail, or a bridge amp. Or both.

And for efficiency, class D

The PAM8403 gadgets work well.

Allan

njackiw:
Understood. Per my subject, I am building "a simple 8-ohm speaker amp" at novice level driven by an arduino and a 5v powersupply.. nothing HiFi or high powered!

Now, when you say, "driven by an Arduino", do you mean from a digital output -- i.e. using something like the tone() function?

If so, then all you need is a square wave amp. Like this:

R2 is the Volume Control.

But, I get it. You want to get an audio power amp working. :wink: