OpAmp question - Nothing to do with stompboxes!

Started by jfrabat, July 07, 2020, 12:10:38 AM

Previous topic - Next topic

jfrabat

Hey, guys.  I am building a hot wheels racing track for my kid, and we are incorporating some "functions" with Arduino.  The first function is an automatic launch complete with "Christmas Tree" (for those not involved in racing, it is the stoplight type system to signal GO!) and servo release.  That I already got up and running.  But I wanted to make the "beeps" of the "Christmas Tree" louder.  No problem, I figured I will just make a quick booster, and boost the signal and use a pot to control volume to the "just right" level (read, as loud as possible without damaging the speaker!).

So I took the sound signal from the Arduino, and used this basic schematic:



Got nothing coming through...  Hmmm...  OK, no problem.  I will just do a simple non inverting OpAmp then.  Built one using a TL071 more or less along the lines of this one:



To my surprise, again, nothing (and yes, I did correct the pins for the different pinouts).  I checked the circuits, and they are simple, so I doubt it was an error in the circuit.  Both were running from 9V, by the way, not the 5V the Arduino runs at.

I remember a while back someone mentioning AC vs DC sound signals; could this be the cause of the issue here?
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

Marcos - Munky

You don't need a booster, but a small amp. A booster will boost a audio signal a bit, but you still have to amplify it to be able to hear it. That's why the transistor booster didn't worked.

The 2nd circuit is actually a small amp, as simple as possible. So this is the one you should go. But you used a TL071, which is a single opamp, when the circuit asks for a LM386, which is a amplifier chip. They're different beasts.

So, for you to make a small amp and solve your problem with a very simple circuit, get an LM386 and build the circuit you posted. I recommend using a power supply instead of a 9V battery, because you'll probably have it on for a good time.

PRR

The CPU "beeps" are probably >2V at a few mA. A LOUDspeaker wants a few V at hundreds of mA.

What Marcos said: you want a "power" amp for a loudspeaker, not an opamp made to swing a meter (and other small loads).

The LM386 is not an ordinary opamp. It is internally biased and fed-back to minimize external parts. Which means if you try a vanilla opamp "in a LM386 circuit" it usually won't work. It lacks the bias and feedback.

The LM386 _IS_ what you want, and use a LM386. Couple it with a four-10" Half-stack, feed MP3 recordings of Don Garlits, the kid's bedroom will sound like Lions Drag Strip. With a single Four it will beep great.
  • SUPPORTER

PRR

The opamp is like putting better leverage on the throttle pedal. Foot motion gets more power from the engine but does NOT make more maximum power. An opamp to a room speaker is like a model airplane engine on a Mack truck. Tinker the throttle leverage all you want, it won't go good.

POWER needs ENGINE. Big cylinders, big in/out pipes. The LM386 has "in/out pipes" 10 or 20 times bigger than most opamps.
  • SUPPORTER

antonis

#4
Quote from: jfrabat on July 07, 2020, 12:10:38 AM
I will just do a simple non inverting OpAmp then.  Built one using a TL071

Try to add a current booster..
As above said, for final stage you need POWER which mainly is obtained by CURRENT (for already given voltage swing margins..)



In case of Input signal level is high enough, you can utilize Volume control on Input (after C4 with another cap before R3 right leg), delete R5 & C3 and replace R4 with a short - shorting R4 makes R5 & C3 "useless" so you can just let them there for future use (e.g. low signal level on Input..)

P.S.
The above is just a potentially working configuration and it has nothing to do with "linear" and/or "noiseless" and/or "distortion free" circuit..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Digital Larry

LM386 might throw a few people off because on the schematic it LOOKS like a regular op amp, and everyone knows it doesn't usually matter that much which one you use.  The LM386 is different though!
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

duck_arse

we'll be wanting to see photos of the track and setup, y'know, just to check for errors, wrong values, too tight radius turns ....
don't make me draw another line.

Marcos - Munky

Quote from: duck_arse on July 07, 2020, 11:04:49 AM
we'll be wanting to see photos of the track and setup, y'know, just to check for errors, wrong values, too tight radius turns ....
And voltage measurements. I mean, there have to be some voltages somewhere :icon_lol:

antonis

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

jfrabat

Quote from: antonis on July 07, 2020, 06:07:59 AM
Quote from: jfrabat on July 07, 2020, 12:10:38 AM
I will just do a simple non inverting OpAmp then.  Built one using a TL071

Try to add a current booster..
As above said, for final stage you need POWER which mainly is obtained by CURRENT (for already given voltage swing margins..)



In case of Input signal level is high enough, you can utilize Volume control on Input (after C4 with another cap before R3 right leg), delete R5 & C3 and replace R4 with a short - shorting R4 makes R5 & C3 "useless" so you can just let them there for future use (e.g. low signal level on Input..)

P.S.
The above is just a potentially working configuration and it has nothing to do with "linear" and/or "noiseless" and/or "distortion free" circuit..

I will have to find one that works with the parts I have.  I do not have any TIP29 or BD135, but I am sure there are other alternatives.  But I get the idea...

Quote from: Digital Larry on July 07, 2020, 10:14:52 AM
LM386 might throw a few people off because on the schematic it LOOKS like a regular op amp, and everyone knows it doesn't usually matter that much which one you use.  The LM386 is different though!

OK, NOW I can be included in the EVERYONE column... I had NO IDEA until I read this!  I keep learning in this place!  LOL!

Quote from: duck_arse on July 07, 2020, 11:04:49 AM
we'll be wanting to see photos of the track and setup, y'know, just to check for errors, wrong values, too tight radius turns ....

Of course... I will post all "measurements" here, no problem.  I was thinking a somewhat reduced version of the King of the Mountain (https://www.youtube.com/watch?v=qybqetaafJM), but with much the same functionality (automated gate with Christmas Tree, screen with run time, and some decoration - albeit much less than what he has!).  Track will also be shorter.
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

jfrabat

OK, how about something like this then:



These components I have, and it looks simple enough.  The only (small) issue would be the 6V power supply (source is 9V; I got voltage regulators for 9V, 8V and 5V, but not 6V), but that is nothing a simple voltage divider cannot solve (and I do have resistors).  I will just need to brush up on calculating the right values (half the volts is what I typically use, but I know I can do almost any voltage between the input and 0).
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

Marcos - Munky

Just feed it with 9V and you're good to go. Maybe there can be some bias issues, maybe... but you want it to amplify a beep and not a hifi music, so you're good.

But it's still easier to go with an LM386, and if you don't have one they're way cheap and easy to find.

jfrabat

Quote from: Marcos - Munky on July 07, 2020, 02:09:11 PM
Just feed it with 9V and you're good to go. Maybe there can be some bias issues, maybe... but you want it to amplify a beep and not a hifi music, so you're good.

OK, I will try that then

Quote from: Marcos - Munky on July 07, 2020, 02:09:11 PM
But it's still easier to go with an LM386, and if you don't have one they're way cheap and easy to find.

Usually, yes.  But I live in Panama, and we have been in complete lock-down for 3 months...  And the end of this is nowhere near.  So all stores are closed, which makes ordering online the only option, and I refuse to pay $1 for chips and $15 in shipping (overseas).  Next time I make a large orders, I may get some, but in the mean time, I need something to keep me entertained!
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

Marcos - Munky

Ah got it. So go for the circuit you posted. It's simple enough to quickly breadboard it or just build it in a piece of cardboard or something like that to test it. Don't know how loud it will be, but it'll probably be loud enough for your application.

PRR

Quote from: antonis on July 07, 2020, 06:07:59 AM
Try to add a current booster..

The above is just a potentially working configuration...

No. Audio swings both ways. Yes, the pull-up is a fat transistor but what is the pull-down?

There's actually NO path to pull-down. Like an airplane which will only climb, not descend. An up-only elevator.
  • SUPPORTER

antonis

#15
When you're in a hurry it's normal to omit the "pull" part of a push-pull configuration.. :icon_redface:

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

PRR

  • SUPPORTER

antonis

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

jfrabat

Quote from: Marcos - Munky on July 07, 2020, 03:23:05 PM
Ah got it. So go for the circuit you posted. It's simple enough to quickly breadboard it or just build it in a piece of cardboard or something like that to test it. Don't know how loud it will be, but it'll probably be loud enough for your application.

I am actually stumped by this; I built the circuit, and checked it a million times, but the sound dies at pin 2 of the IC.  No sound is detected at pins 3 or 6.  Now here is the odd part; the circuit actually worked ONCE.  But ONLY once.  I thought it was a bad contact, so I rebuilt it.  Then I thought it may have been the 741, so I replaced it.  Then I thought it may be the BB itself, so I switched to a brand new one.  Nothing...  Sound still dies at pin 2...  Any ideas?

Here are some voltage readings if the IC:
Pin 1: 0V
Pin 2: 2.57~2.54V
Pin 3: 1.791~1.766V
Pin 4: 0V
Pin 5: 0V
Pin 6: 1.762V
Pin 7: 0V
Pin 8: 0V
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

antonis

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..