TL072 amp with an Arduino

Hey, this might be a dumb question.

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:

  1. Can I just connect the -VCC to ground?
  2. Is this even possible?
  3. Should I just buy a LM386 instead?

Cheers!

No, you don’t want to try to use a TL072 with a single power supply.

An audio amplifier chip is probably a better idea.

4 Likes

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.

3 Likes

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.

1 Like

10 volts, rats! It appears I was a bit optimistic. And the virtual negative voltage may make things more complicated than one would want.

2 Likes

Thanks folks! yeah it’s shame about the 10-12v I guess I’ll have to try something else.

FYI I was using one of the analog outs of the arduino as the audio out. I’m using the Mozzi FM Synth library

2 Likes

You can try this simple circuit instead of an opamp.
image
It’s from:

7 Likes

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 :thinking:).

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).

2 Likes

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.

3 Likes

All good this happens. I was looking up the pin outs for the TL072 and found 3 different ones.

1 Like

Yeah, the “this looks somewhat reasonable (later) eh wait does it?” happens all the time on this newfangled interweb thing :upside_down_face: 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
  • getting a cheap “class D” amplifier board, e.g. https://www.adafruit.com/product/2130
  • getting a slightly cheaper (but much worse) prebuilt LM386 board (typically from ebay/aliexpress)

or if you’d really like to DYI from scratch,

  • build yourself a Noisy Cricket (or some of its predecessors, the ancestry of which you can trace all the way back to the LM386 datasheet)

    (more here: http://beavisaudio.com/projects/noisycricket/, including a slightly enhanced version of the schematics)

    (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.

2 Likes

Seriously? That’s weird.

Anyway, go to https://ti.com, enter “TL072” in the search box, click on “Data sheet”, and get your answer from the horse’s mouth:

1 Like

Yeah! one had VCC- as GND

Another only had the one amp:
image

I’m guessing these are simple typos or, maybe more likely, I’m reading them wrong :slight_smile:

This is probably a better solution with a LM386 right?

Edit:

Oops didn’t see this, I’ll check it out!

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.

5 Likes

Good point! Also this forum is great :slight_smile:

4 Likes

Oh my God I just looked at the page source. Someone needs their Internet license revoked. Sheesh.

2 Likes