DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: brett on November 15, 2022, 09:41:05 PM

Title: Ruby/Little Gem/LM386 amp owners.
Post by: brett on November 15, 2022, 09:41:05 PM
Hi.  I've built an LM386 amp and really enjoying it.
I have a question for other owners:
Does yours sound different with different batteries and power supplies?
Carbon zinc batteries have high internal resistance (~25 ohms) that in theory will reduce the output power.  By a lot !!
Alkaline batteries (~5 ohms) shouldn't affect the output so much.
Wall warts  (~1 ohm) should give "datasheet" output.  Almost ground to supply swings in the output (less 1 to 2 volts).
Do different batteries sound different?
Are carbon batteries crunchier? 
Are alkaline batteries a bit louder and cleaner?

My 12V wall-wart is loud and clean.  Too clean. 
Thanks for all comments and help.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: readingaregood on November 16, 2022, 12:35:10 AM
Interesting if there's a sweet spot. When I was playing on a Ruby it was about my first build so I was just glad it worked, didn't try batteries. My Smokey Amp uses batteries but it'll always sound like butt unless I were to plug it into a cabinet.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: PRR on November 16, 2022, 01:44:50 AM
Even 25r is not a big deal IF you have a large capacitor across the supply as the datasheet shows. The effective resistance is then like 25/6 or 4 Ohms, in series with about 60 Ohms, is like 93% voltage.

Can you even buy 9V in zinc anymore?

Is that what this guy is selling, $1.59?
(https://media.musiciansfriend.com/is/image/MMGS7/H99740000000000-00-2000x2000.jpg)
A vintage style 9V battery perfect for vintage pedals.
The Electro-Harmonix 9Volt battery is the classic carbon zinc type that has a higher internal resistance than an alkaline battery. This reduces circuit loading, especially in vintage effects pedals, to provide the best tone and dynamics.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: Clint Eastwood on November 16, 2022, 02:11:30 AM
So if you put a 24 ohm resistor in series with your wall wart it would behave like a zinc battery, I would think. Just try?
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: brett on November 16, 2022, 07:03:02 AM
Thanks for the replies.
PRR: I'm a bit lost how the capacitor in the power supply mitigates the resistance. As far as I know (consideration of the time constant) a 22uF cap does almost nothing wrt DC voltages  while a 220uf cap "holds up" for about a millisecond.  Great for ripple and grounding  guitar frequencies but not buffering a supply with resistance.  But I'm a complete beginner, and have a feeling that I'm about to learn something !!
I'm also wondering how the output of an LM386 can swing 6V from a 9V supply if there's "60 ohms" of resistance in the LM386 and associated bits and pieces.  The datasheet for the LM386 shows a push-pull pair with no emitter resistors.  In my simplistic view, I assumed it could swing almost rail to rail because there's almost no internal resistance.
So my thoughts when making the first post: I made a wild guess that adding 8 (or a bit more) ohms of battery resistance dissipates as much power as 8 ohms of speaker impedance (for the first 8 ohms).  ie roughly 50% less max power.  24 ohms might give a 75% reduction in power.
e.g. from 1 W to 0.25W, which would be audible in terms of loudness but perhaps mire importantly, produce clipping ('crunch') and not affect lower output levels (audible as 'compression' or ???).
Cheers.  Thanks again.  This has my brain working hard - always a good, fun experience.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: antonis on November 16, 2022, 07:50:31 AM
Quote from: brett on November 16, 2022, 07:03:02 AM
The datasheet for the LM386 shows a push-pull pair with no emitter resistors.  In my simplistic view, I assumed it could swing almost rail to rail because there's almost no internal resistance.

You tend to forget/ignore both C-E saturation voltage (VCEsat) and intrinsic Emitter resistance (0.026/ICollector).. :icon_wink:
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: PRR on November 16, 2022, 06:44:07 PM
> how the capacitor in the power supply mitigates

Yes, if you apply steady tone it does bleed-down quick.

And I apologize: the current Datasheet says nothing about a bulk capacitor. Only "The power supply should be well regulated and the voltage must be within the specified values. It is recommended to place a capacitor to GND close to the LM386 power supply pin."

(The old application note, IIRC? did say stuff.)

But the 2017 datasheet is riddled with other mishaps. "As this is an Op Amp..." a very poor opamp.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: anotherjim on November 17, 2022, 04:14:10 AM
Yeh, don't know what's happened to the TI LM386 datasheet. Typos and omissions. One power spec has a minimum = 700mW then typical = 100mW and no maximum.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: brett on November 17, 2022, 07:30:26 AM
It's becoming clearer.  Thanks Antonis for reminding me how easy it is to calculate Ree, internal emitter resistance.  26mV/Ie(mA).  With 13 to 52 of mA it's 0.5 to 2 ohms per emitter, and there's 2 emitters so 1 to 4 ohms.  That is just right for the couple of volts below supply voltage that the output swings.
Now that understand so much better, I'll so a few experiments and see if there's much audible difference.  I have a spare switch on the front panel that I can use it to optionally regulate from 12V low
resistance down to 5 or 8V, and add 10 ohms in.  To see if it 'crunches' down. 
There's a lot to do here.
Thans again.   ;D
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: PRR on November 17, 2022, 02:20:28 PM
> 13 to 52 of mA it's 0.5 to 2 ohms per emitter, and there's 2 emitters so 1 to 4 ohms.

That's for near-zero output.

If you assume 3.5V swing in 8 Ohms you have over 400mA peak so your intrinsic Ree drops to less than 0.1 Ohm. Except a 99 cent chip uses 6-cent output devices with a large fraction of an Ohm bulk and contact (parasitic) resistance. How much? For the price and market, they are not going to tell us!! Not deceptive, just to keep options open if they find a cheaper foundry (or the good foundry burns down, as has happened to other chips).

We also have roughly no idea what the Vas pull-up "current source" really is. A simple CCS may need 2V to stay in regulation; that's enough to hurt in a 9V world. Other types can pull below 1V (especially since it does not need dead-constant); but which one did they use? Has it changed over the >40 years and several foundries?

Also hunt for LM380 essays. Same core plan, altho at $3 it may have more complexity (and certainly larger devices).

I do think "try it and see!" is more useful than beating your brain and simulator.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: PRR on November 17, 2022, 03:02:27 PM
The LM384 data shows more gut details. As always "subject to change", or utterly bogus?

Emitter resistors on the output stage. A fairly reasonable current-mirror to pull-up the Vas. Other resistors larger to suit the intended uses.
(https://i.postimg.cc/bDQNt7rp/LM384-guts-42.gif) (https://postimg.cc/bDQNt7rp)

FWIW: I have never seen a '384, and can not recall it in catalogs in 30+ years. I think it was a market flop. (I'm also sure it could not be reliable at full 28V 5W.)

1980 National Databook:
https://archive.org/details/bitsavers_nationaldaLinearDatabook_84804192/mode/2up?view=theater
Try page 10-14, PDF page 1096

1980 National Audio/Radio Handbook, all and especially Chap 4
https://archive.org/details/bitsavers_nationaldaAudioRadioHandbook_17034677/page/n105/mode/2up?view=theater
No, the LM391 is long-long gone. (Some hi-fi amp used it with good result but not infinite life, and replacement LM391 chips are real scarce and fought-over.) Still good read for background theory.

This may be the first essay on the LM380 (and thus its children):
https://archive.org/details/bitsavers_nationaldaLinearApplications_29136087/page/n309/mode/2up?view=theater
Also AN32, FET Circuit Applications (Mu-amp!).

Bang ESC to pop out of the viewer to a page where you can download the files for posterity.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: brett on December 07, 2022, 09:12:20 PM
Hi all.
I finished do a lot of experimentation with my LM386 amp.

The main result is using a 12V supply increases the output quite a lot when compared to a 9V battery.  Even a 9V alkaline battery (internal resistance only about 10 ohms).

I added a switch to the back panel for 'full tilt' and 'battery simulation', which have wall-wart power (12V wall-wart, smoothed with a 220uF cap) and added 10 ohms of resistance (12 wall-wart, smoothed with a 220uF cap and then 10 ohms of resistance in series).  The volume drops by 2-3dB and the distortion goes up (barely noticeable). My guess is that power with the resistor drops from about 1 W to 0.25 W.  (Judging by comparison with a 75% reduction power soak, which gave a similar effect)

I'll post a schematic to my final design in a separate thread.
cheers
Brett
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: anotherjim on December 08, 2022, 03:58:49 AM
It occurred to me that if you used typical stompbox battery/DC power wiring, so 2.1 jack disconnects battery + and TRS input jack ring contact makes circuit 0v (battery or external), then the dropper resistor for 12v can go from the DC jack 0v lug. This will only affect the DC input and since the power supply doesn't have a ground pin, the circuit doesn't know any difference - the resistor will drop the 12v just the same. So it doesn't need a switch.
Title: Re: Ruby/Little Gem/LM386 amp owners.
Post by: Phend on December 09, 2022, 08:57:00 AM
Maybe old news for the experts here, but for reference
(I think I may build one myself some day)