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


