I’m building a simple synth using an Arduino Pro Micro. When i hooked up a speaker to it it was very quiet, so I thought since I have a bunch of TL072 chips I could add an amp to it. But the Arduino doesn’t have a negative VCC. So my questions are:
Maybe you should explain how you connected a speaker to the arduino first.
If you really want to have a negative voltage to power a TL072 in a single power circuit, you can make a virtual negative power supply. If you connect the +V of the TL to VCC and the -V to GND and create a virtual GND between Vcc and GND using 2 resistors and use that as the GND for the opamp circuitry, you should have a working situation. You need to connect the output of the arduino via a capacitor to the input of the opamp. But a TL072 is not meant to produce a lot of power so it will not drive a loudspeaker too well.
The minimum recommended (VCC+ - VCC-) is 10V; you maybe can get away with that virtual ground setup on a +12V supply, but if that simple synth is running off say a 9V battery, you’re outside that recommendation.
That’s an odd little article (equations like “Vout = R2 * R1 + R2 * Vin”, the 1.5 V battery in the photo, and then the “I can’t make much sense of the calculations” discussion in the comments), and most of it seems to be lifted from the first reply to this stackexchange post, but slightly garbled:
(where I ended up earlier when going “wait, 5/8 = 625 mA so wouldn’t 8 ohm on an Arduino output damage the Arduino” and that 6.8 ohm resistor felt familiar ).
The schematics is the “class A layout” from there, which mentions that you need a 5^2/6.8 = 3.6 W resistor, but then 5/6.8 is 740 mA through the transistor which seems quite a lot for a component with a max rating of 200 mA so not sure what these guys are up to (and of course, the stack exchange post has its own “I am confused by your logic” in the comments).
Thanks for keeping me honest @fredrik, I just wanted to suggest a single transistor amplifier, Google pointed me to that article which at a first glance seemed to offer explanations of the classic single transistor amplifier circuits, so I pointed to it without reading it. I should not have done that.
Yeah, the “this looks somewhat reasonable (later) eh wait does it?” happens all the time on this newfangled interweb thing I spent a bit more time googling but failed to find any single-transistor design that convinced me that the author had any idea what they were doing, or for that matter had done any testing whatsoever… But I’m sure it’s somewhere out there, there’s just too much noise in the way.
But until I find one, I think I’d recommend, in order:
getting some cheap computer speakers, which tend to have good enough amplifiers and fairly robust input stages
(Note: The MPF102 is no longer in production, so can be tricky to source. Other small-signal JFETs probably work just fine. Or you can use an opamp. Or you can drop the input stage completely, if you don’t plan to use it with a high-impedance source like e.g. a guitar mic.).
I’m also not sure why connecting an 8 ohm speaker directly to a GPIO pin doesn’t damage the pin; sure, there’s some internal resistance that’ll cause the voltage to drop, but seems you’d still exceed the 40 mA max output. Oh well, I’ll figure it out some day.
The first one is the right pinout, but for a single supply configuration (which is a bad idea, see above).
The second is people being bad at web stuff – they used a table, but put all the information in one row, instead of using the table as a table, so of course things have shifted out of sync (note that the browser split “CA3240E-1” over two lines and the pinout column starts one line higher than the others). Which is why the TL072 is described as a “quad low-noise” and it points to the TL071 pinout.
There’s a lot of low quality electronics sites out there, unfortunately. Use the product pages and data sheets on the manufacturer’s sites, whenever possible.