What am I missing about driving this little computer speaker?

Started by deadlyshart, April 14, 2017, 10:28:53 AM

Previous topic - Next topic

deadlyshart

Hi guys, so I'm doing some experiments and want to directly drive a spare cheap little PC speaker I had, like this one:



I want to just use it as a general output for sounds I make (whether from FX pedals or whatnot), when I don't want to plug in my full guitar amp. Basically so when I'm experimenting on my desk, I can just test the sound. My little PC speaker is 4 Ohm and says 3W on the back.

So I tried plugging it into the output of this square wave I'm producing from a CD40106 chip. The chip is run at 9V, so when I probe the output with my scope, I see the square wave going between 0-9V. But when I plug it into that output, no sound... I suspect because the output from that chip can't supply enough current to run it, or something?

Anyway, so in one of the books I'm following, they make an audio amp using an LM386 chip, which I have. It seems like it's basically meant to power a small speaker like this (they suggest 8ohm, .25-1W). They basically use exactly this schematic, which I'm using (from http://www.learningaboutelectronics.com/Articles/How-to-connect-a-LM386-audio-amplifier-chip ):



So I hooked that up. Now the problem is, it makes a *truly* terrible noise on the speaker, and is generally misbehaving... The pot that should control the volume only kind of does... it seems like when I make the signal small enough, it starts distorting it like crazy. (I removed the 10uF cap across pins 1 and 8 so the gain would only be 20, not 200.)

My best guess is that, because the signal I want to amplify is already 9V, trying to amplify that isn't going to work... so I tried making a voltage divider for that signal, dropping it to about 90mV amplitude, but that still doesn't really work...

Am I missing something simple here? It seems like an LM386 amplifier circuit should be really simple... thanks, any advice is appreciated.

rutabaga bob

Life is just a series of obstacles preventing you from taking a nap...

"I can't resist a filter" - Kipper

duck_arse

do those speakers have a power supply plugged in the back somewhere? that would make them powered. it is as likely you just need to get the TRS connections sorted, and some blocking cap between your square wave source, to get them to "werk". then you'd need to voltage divider the sq wave to a decent input level, obvs.
don't make me draw another line.

anotherjim

The way that pot is shown is not a good way of using it.
This...

As you have 2 speakers, you could wire them in series to make the load 8ohm.

deadlyshart

Quote from: rutabaga bob on April 14, 2017, 10:43:47 AM
Are these powered speakers?

ahh, good point... I didn't think of that because I just grabbed it from a pile, and this speaker itself only has 2 wires going to it, but looking at the other of the pair, it indeed does have a power jack input... so I'm guessing the one with the jack also powers the other (the one I took) ? Because the one I took only has that one cable (with two wires in it).

If so, what exactly is going on there? Is the audio signal it receives just amplified a lot, but otherwise the speaker is the same? thanks.

deadlyshart

Quote from: duck_arse on April 14, 2017, 11:03:12 AM
do those speakers have a power supply plugged in the back somewhere? that would make them powered. it is as likely you just need to get the TRS connections sorted, and some blocking cap between your square wave source, to get them to "werk". then you'd need to voltage divider the sq wave to a decent input level, obvs.

Hi, thanks for the reply. Since bob suggested the same thing, I checked and they (the pair, since I just grabbed one of them from the pile) are indeed powered. The power goes to one of them, and then a wire came out of that one and went to the other one (the one I grabbed). So I guess they're powered, but isn't that essentially what I'm doing with the LM386? If I understand correctly what you mean about the TRS connection (meaning the wire that you'd originally plug the speakers into your PC with, that has 3 conductors), there are only 2 wires *per* speaker, so I shouldn't have to worry about that, right? thanks!

deadlyshart

Quote from: anotherjim on April 14, 2017, 11:51:43 AM
The way that pot is shown is not a good way of using it.
This...

As you have 2 speakers, you could wire them in series to make the load 8ohm.

Ahhh, thank you... I actually tried that too, because another site had the 3rd terminal connected to ground, but just to make sure tried it both ways, and didn't notice any difference. That schematic looks better though, thanks.

GibsonGM

Sounds like you're powering the power ;)

Like ramming your signal thru a stompbox that is not bypassed, but has no power supply to it....

I'd sort out how the power is supposed to be delivered to the spkr's, and fire them up. Great for troubleshooting w/audio probe!!  5V supply maybe? Not sure of the connection polarity, you'll have to find a way to snoop that out...
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

deadlyshart

Quote from: GibsonGM on April 14, 2017, 06:35:48 PM
Sounds like you're powering the power ;)

Like ramming your signal thru a stompbox that is not bypassed, but has no power supply to it....

I'd sort out how the power is supposed to be delivered to the spkr's, and fire them up. Great for troubleshooting w/audio probe!!  5V supply maybe? Not sure of the connection polarity, you'll have to find a way to snoop that out...

Yeah, I mean I think something that's a little beyond my skillset is going on... the signal (from the CD40106) that I'm trying to amplify is already 9V, which is pretty large, right? So, I assume that when I connect it to my speaker and don't hear anything, either it can't source enough current to it, or there's some weird impedance matching thing...

Could that be it? Because I think I remember reading that you want the signal to always be going from lower to higher impedance, and the speaker is 4Ohm, and I can't imagine the signal source is lower impedance than that, so... could that be it?

GibsonGM

Well, maybe i don't get it?  Have you plugged a power supply into the SPEAKERS, to give them operating voltage??  If not, it won't work.  just like your guitar amp.

If you crack them open you can probably pull out the internal speakers and then use them with a 386.

Yes, 9V is too much, LOL!  I'd re-measure and set that around 1V.     The things are supposed to be amplifying, probably take line level and amp it up to drive the spkrs.   

For future work, keep in mind that w/computer stuff, you REALLY want to watch your voltages...like, plugging into a sound card, keep it <5V.  If you 'pop' something, you're probably looking at a new sound card.  That's why I'm saying turn your circuit down to 1V or whatever.  Probably the things are intended for FAR lower voltages. 

Gotta figure out how to power them (wall wart probly, but how much voltage, what is the polarity?)
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

EBK

The one little tiny nugget of missing info (well, not really missing; just, everyone said the same thing in a very subtle way...) is this: Those speakers essentially have a circuit like the 386 built in.  The plug coming out of them is connected to the input of that small amplifier.
  • SUPPORTER
Technical difficulties.  Please stand by.

GibsonGM

LOL, exactly, Eric. 

"Sounds like you're powering the power ;)

Like ramming your signal thru a stompbox that is not bypassed, but has no power supply to it...."


So, if the internal amp has no power - - - it isn't going to pass (much) signal. Very distorted crap may bleed thru, that's all.

We need to find out what voltage that little internal amp needs to run off.  I suggest 5v as a safe choice, but could very well be wrong. 


  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

EBK

Quote from: GibsonGM on April 14, 2017, 10:14:02 PM
"Sounds like you're powering the power..."

I just treated that like Hollywood wisdom, sort of like:
"You're chasing Amy"
Or
"You're gleaming the cube"
:icon_lol:
  • SUPPORTER
Technical difficulties.  Please stand by.

GibsonGM

Quote from: EBK on April 14, 2017, 11:52:18 PM
Quote from: GibsonGM on April 14, 2017, 10:14:02 PM
"Sounds like you're powering the power..."

I just treated that like Hollywood wisdom, sort of like:
"You're chasing Amy"
Or
"You're gleaming the cube"
:icon_lol:

My science profs always told me to 'be concise'.  My reply was concise but not informative enough.

"Sounds like you are sending a highly amplified signal to a power amp that has no power supply" would've been better...
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

Ice-9

On one of those speakers you can see a volume control knob which is likely also the on/off switch and next to it the power LED. needs a little psu adapter plugged into one of the speakers where is says power and the mini jack is the audio input. ;)
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.

ashcat_lt

The other speaker has a power amp circuit in it.  The one the OP is trying to use, though, should be completely passive.  It "expects" to get the amplified signal coming from its mate, but I can't think of a good reason it wouldn't work on its own the way they're trying to do it.  Course it seems a little silly to try to built an amp circuit when you've already got two that will work just fine built right into the other speaker...

I had some fun hacking around with something like this a while ago.  If you run the two amps in series it can get pretty crunchy.  Put some tone shaping before, between, and after, and it can actually sound pretty darn good.

EBK

Quote from: ashcat_lt on April 15, 2017, 12:38:37 PM
The other speaker has a power amp circuit in it.  The one the OP is trying to use, though, should be completely passive.  It "expects" to get the amplified signal coming from its mate, but I can't think of a good reason it wouldn't work on its own the way they're trying to do it. 
Oops!  My eyes ran right past that detail while on my way to your next point:
Quote
Course it seems a little silly to try to built an amp circuit when you've already got two that will work just fine built right into the other speaker...
  • SUPPORTER
Technical difficulties.  Please stand by.

deadlyshart

Hi guys! Sorry for the delay in response. You're all completely right though, I opened the other one up inside. The other one is the one that the PC signal goes to, and it amplifies it and then sends the amplified signal off to the one I have. Just to be clear, the pic in my OP wasn't the actual speakers, but they're the same type, with the power button, volume knob, external power, etc. Here's a pic of the speaker with the amp:



I don't have a pic of the IC on it, but it wasn't a common amplifier one I recognized (though I'm sure that's what it basically is).

Anyway, so I'm still not sure what's going on... if the circuit in the amplifier speaker of the pair is just amplifying the signal and sending a mono signal off to my speaker, isn't that what my LM386 circuit is doing?

Could it have something to do with how I'm passing the signal to it? CD40106 signal out, then I do a resistor voltage divider (using a 100k and 10k so the signal is ~10x smaller), then I pass that to the LM386.

GibsonGM

Dude!! I've said this about 2 times, LOL.... :)    If I'm reading you right, THERE IS NO POWER GOING TO THE PCB IN YOUR PIC, RIGHT!   So it is OFF.  Your amplified signal is hitting the dead end of a non-powered chip.  So it is like (well, it is) playing into an amp that is not turned on.    The jack we see in the pic, that's for a plug from a wall wart.

Try connecting your 386 output right to one of the speakers, see if it works.   The circuitry is in the way right now, that is all.  You're not really hitting the speakers with the signal.  Since the amp here has no power, it is not passing the signal on to the speaker.

Going forward tho, if you can get voltage to the board there, it will probably work better than the 386 you made, which you could save for a different use.  Figure out the polarity and get that thing some power (one side will be ground, you can find that on the board with a continuity tester)!  Then use it as a test rig!    All you'd likely need is a 5V wall wart and a volume pot on the input.    Then it has its own nice compact case...see what I mean?
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

deadlyshart

Quote from: GibsonGM on April 16, 2017, 07:52:27 AM
Dude!! I've said this about 2 times, LOL.... :)    If I'm reading you right, THERE IS NO POWER GOING TO THE PCB IN YOUR PIC, RIGHT!   So it is OFF.  Your amplified signal is hitting the dead end of a non-powered chip.  So it is like (well, it is) playing into an amp that is not turned on.    The jack we see in the pic, that's for a plug from a wall wart.

Try connecting your 386 output right to one of the speakers, see if it works.   The circuitry is in the way right now, that is all.  You're not really hitting the speakers with the signal.  Since the amp here has no power, it is not passing the signal on to the speaker.

Going forward tho, if you can get voltage to the board there, it will probably work better than the 386 you made, which you could save for a different use.  Figure out the polarity and get that thing some power (one side will be ground, you can find that on the board with a continuity tester)!  Then use it as a test rig!    All you'd likely need is a 5V wall wart and a volume pot on the input.    Then it has its own nice compact case...see what I mean?

hi, I think I've actually explained this badly, from what you seem to be saying...

The speaker I've been trying to power this whole time is *not* connected to anything else. It was one of a pair (like the ones in my first post), but not the one in the same chassis as the PCB (from my photo). The way it is now, it's literally just a speaker with 2 wires; no PCB. The photo is of the other of the pair, the one *with* the PCB, I just took it as an example to show that there was indeed an amplifying circuit, and also to show what the speaker itself looks like.

I just say this because it seems like I've given the impression that I'm trying to run my signal through the PCB in the speaker, which I'm not trying to do. I'm sending my signal to something that looks like this right now:



(like on the right, from this random internet photo)

So I have been trying to give the output from the LM386 directly to the speaker (like in the above photo) the whole time, because I have never actually used the one with the PCB, just took a pic of it.

I've actually made a bit of a breakthrough, though. Before I was a little puzzled because connecting the output of the CD40106 directly to the speaker wasn't making any noise, even though the frequency was in the audible (1kHz) and the amplitude was 9V. However, what I realized was, it was actually a square wave going from 0-9V, not a square wave going from -4.5V to 4.5V... so it was actually AC on top of DC, which apparently doesn't make the speaker go. So I put a cap in series and now the speaker plays directly out of the CD40106!

However, there are still two problems. One is that, looking at the output of the 40106 in the scope, the signal looks like GARBAGE. Like, clearly a square wave, but the frequency is wobbly as all hell, and there's just some garbage noise all over it. I read that CMOS chips are sensitive and to ground all the inputs I'm not using, but that didn't help.

The other thing is that it doesn't drive the speaker very loudly. So I'd like to amplify it through the LM386. So I first drop the signal using that divider circuit, then put it through the LM386, and it definitely makes a louder noise, but a TERRIBLE one. Not the correct amplified signal at all... so at this point I'm suspecting that these problems may be due to them being ghetto chinese chips. I've had mostly decent good luck with them but both of these chips I'm using now are... I switched them both out with multiple copies (from the same source) and I'm getting the same results...