Why does this LM386 breadboard not work as a guitar amp?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I achieved a no-hum output by putting a 10k linear pot followed by a 10uF/35V cap between pins 1 and 8. The no-hum is present with the pot thru approx. 0-4 of 10; in that range the guitar is amplified. The hum returns and increases from approx. 4 up to 10. I'd say this is progress. It pays to add the gain control with a pot and cap between pins 1 and/to 8.
 
I got rid of ALL hum by adding the "Bass Boost" between pins 1 and 5 and doing my best to separate physically all the off-board components - battery, mini toggle switch, guitar jack, 3 pots, and speaker. The Bass Boost uses a 10k linear pot and 0.033uF cap. Where these go relative to other components already on pins 1 and 5 is a hard to describe in words, but I'll try: viewing the Bass Boost as a line, it begins on pin 1 AFTER the insertion point for the gain control, and ends on pin 5 AFTER the cap-&-resistor-to-ground and BEFORE the speaker cap.

Another thing that I did - on my own initiative - was to add a cap to every wire-to-ground if the wire did not already go through a cap. It seems to me - a noob - that it might undermine the purpose of caps already placed on wires-to-ground if I left other wires-to-ground uncapped. My thinking is that the uncapped wires-to-ground might feed some DC into the ground network and cause undesirable feedback - although, as I write this, it occurred to me that the caps already specified would block such feedback - although, again, as I write this, I have to wonder if that is true where the caps already specified have polarity and any feedback would reach the negative pole first. I don't know how to address those issues, if they are issues. In any event, I don't see how having a few extra caps on going-to-ground wires would cause any problems, but I would welcome any comments.

The off-breadboard components all have wires that are way too long. I'll need to shorten them as much as possible as soon as I figure out what type of board/box to use. (In the long run, my goal is to build a pedal board/box with a lid, with this little amp and a decent speaker built into the lid. Although, now that I think of it, I can always build another little amp - or a little, more ambitious one - for the lid of the pedal board/box.)

Schematic of current, functioning build with volume control, gain control, Bass Boost, and extra caps on the ground network to follow.
 
Last edited:
Are there and rules of thumb how best to move a build from a breadboard to the final enclosure? Install the off-breadboard components first, then the chip? Install the chip first? Do a hub (chip) and spokes (pins & off-board components) drawing to get a good sense of an easy potential layout before drilling holes? Any preferred order hear? ... I like the idea of a hub and spokes drawing before I do anything else.
 
While moving the breadboard, several wires detached and initially I could not figure out where they go. Frustrating. After a night's rest, I tore apart most of the build and reconnected each section carefully. Without all the extra caps on the wires-to-ground. The amp works now as before, except there is hum again. Bummer. Based on gnobuddy's comments, I assume the reason is the long wires shown in the attached photo and the connecting metal in the breadboard itself. The hum varies as I move components with long wires around and touch various metal surfaces. I've been very careful, as best I can be, to wire every pot correctly (yeah, the chaotic wire colors are embarrassing; I need to find something better than alligator clips for temporary connections to pot lugs). Time to move everything over to the final board and an enclosure. Lots of photos in case wires get detached again while moving. Need more wire colors for easier visual tracing of the various sections. Final schematic before anything else.

P.S. Anyone have a link to JMFahey's book? Now that I have a functioning amp, I want to make sure I try everything to eliminate the hum which has returned.
 
Last edited:
I'm switching my power source from a 9V battery to a wall wart. I have one rated for 15VDC/1.4Amp. With this wall wart plugged in and no load, the multimeter reads approx. 18.4VDC. What is the least expensive and simplest way (least parts) to turn this into, as nearly as possible, a constant 15VDC with no, or minimal, surges up or drops down in voltage?
 
Last edited:
Are there and rules of thumb how best to move a build from a breadboard to the final enclosure?
Chapter four of the book I linked earlier (Craig Anderton's book) should give you most of what you want; it's a whole chapter on how to actually construct and house an electronic circuit, written by a talented writer, with actual proof-readers and editors and fact-checkers to assist. In other words, it's likely to be more comprehensive and more accurate than the usual Internet how-to document.

The one major weakness of Anderton's book is that it was written many years ago, and many of the actual electronic projects in later chapters are no longer relevant, or in some cases, cannot be built at all due to components that are no longer available. However, chapters 1,3,4 and 7 are all still very relevant, and I think they will be useful to you.

I sometimes use graph-paper to lay out a circuit before building it onto a board. I put dots on the paper representing the positions of wire leads of whatever device(s) I'm using - I use the bottom view - then tinker with position and orientation of components until the board-to-be looks good.

If you can get inch-grid paper (with a 0.1" grid), it makes life simple, because traditional through-hole chips like your LM386 have pins spaced 0.1" apart, so you can easily make a drawing in 1:1 scale.

Canada is caught halfway between metric and imperial units, so sometimes my choices are millimetre-grid paper, or paper with a quarter-inch grid. No biggie, I just scale my drawing, so that 5mm on the drawing equals 0.1" in real life. (Or, if I'm using paper with a 1/4" grid, 0.25" on the drawing equals 0.1" in real life.

I do suggest paying attention to the positions and layout of anything that mounts to the chassis (controls, jacks, etc.) This is the only part of the project you see and interact with once it's finished, so it's important to position controls within easy reach, jacks where wiring is convenient, and so on.

For this reason, I suggest planning the housing and exterior first, then working out the circuit board so it will fit. Doing the reverse is more likely to lead to a rats-nest of wires running everywhere inside the housing. :)


-Gnobuddy
 
Is that from the bottom, with the wiper shaft on the other side?
Yes, pot shaft pointing into the computer monitor, away from your eyes. I've added a notation to that effect to the image now.
Mine is not wired that way now
Then it's mis-wired; I think this is what PRR pointed out many posts ago.

Unfortunately, most of the electronics information you find on the Internet is inaccurate, or outright wrong. You have to pick and choose your sources carefully if you want correct information; for example, anything written by Lady Ada (of Adafruit) is worth paying attention to, because she's an actual electrical engineer, with a degree from MIT, no less.

The Instructable you took your original project from makes some incorrect statements, for example, the LM386 is not an op-amp, and in many significant ways, it doesn't behave like one. Other comments - such as "they (op-amps) take something small and make it big!" are essentially meaningless; are they talking about people blowing up balloons? They take something small and make it big, don't they? :eek:

Then there's "Op-amps are perfect when you need to take a signal and have it go much higher than the original", which isn't even remotely correct, doesn't make any sense whatsoever, and isn't even correct English. A road-flare is a signal; if I pick one off the roadway and throw it in the air, I've made it "go much higher than the original"; so is an op-amp perfect for the job of throwing road-flares up into the air? :D
...but the amp is working, albeit noisily. If it's wired incorrectly, shouldn't the pot not work at all?
Not necessarily...there are lots of incorrect ways to wire a pot, and some of them might kinda-sorta work.

There are some classic Fender (valve) guitar amps that have horribly mis-wired potentiometers. They work, kinda-sorta, but very badly (extremely nonlinear response, controls interact with each other heavily.) Generations of DIY amp builders have carefully re-created the ill-designed (or maybe accidentally miswired) original controls, for reasons I can't quite fathom. :confused:

As an analogy, if I took one rear wheel off my (front wheel drive) car, and tied it sideways under the rear bumper, it would still hold the rear end of the car off the ground, and if I mashed the throttle hard enough, the car would move forwards, dragging the tied-on tyre sideways...it kinda-sorta works, but it's definitely not the way that wheels should have been mounted! :D


-Gnobuddy
 

Attachments

  • Volume_Pot_Wiring_2.gif
    Volume_Pot_Wiring_2.gif
    55.4 KB · Views: 71

PRR

Member
Joined 2003
Paid Member
There is no good point to running a LM386 on 15V. For typical loads it runs out of current with 12V supply. While there is an 18V version (for hi-Z loads), most '386 are rated to blow-up with 18V, and 15V is right on the edge. My experience is that such chips will take a few extra volts today, but die "for no reason" next year or even tomorrow.

You have enough on your plate now without also fooling with excess voltage. Feed it right.
 
I'm switching my power source from a 9V battery to a wall wart. I have one rated for 15VDC/1.4Amp. With this wall wart plugged in and no load, the multimeter reads approx. 18.4VDC. What is the least expensive and simplest way (least parts) to turn this into, as nearly as possible, a constant 15VDC with no, or minimal, surges up or drops down in voltage?

A little buck converter should do the job - they are inexpensive.

Something like this maybe:
DC75W 5A Buck Voltage Converter Constant Current Module Step Down For LED Driver | eBay
 
P.S. Anyone have a link to JM Fahey's book?
I'm pretty sure he was just using the expression "In my book....", which means "In my firm personal opinion..."

Now that I have a functioning amp, I want to make sure I try everything to eliminate the hum which has returned.
First question to answer: What is the source of the hum?


IIRC, you said there was no hum with the volume control turned to zero. This means the power amplifier itself does not hum, when its input is shorted to its ground (by the volume pot set to zero.)


Next step: disconnect the wire from the "preamp" (FX pedal) to the LM386 amp volume control. Turn the volume (of the amp) up from zero, so the input is no longer shorted to (amp) ground. Does the LM386 hum?


If yes, what happens when you put a grounded piece of metal under it? What happens when you invert a grounded metal pan, etc, over it?



If grounded metal around the amp removes the hum, you're dealing with noise pick-up from thin air. Nothing will cure this other than mounting the amp in a proper grounded, conducting housing. It doesn't have to be expensive - an old tin can is as good as an expensive die-cast aluminium box as far as stopping RF interference goes.


Once your power amp is hum-free at all volume control settings, you move back to the preamp (FX pedal), and test it in a similar way. Unplug the guitar. Power the pedal with a 9V battery. Does the amp hum? No?



Power the pedal with the 9V AC wall wart. Does it hum now? Yes? The problem comes from the wall wart, which most likely isn't grounded.


And so on. Use logic, work your way back one step at a time from loudspeaker to guitar pickup. Find out where the hum originates, and once you do, you can find out how to reduce it.


I'll add that I've never heard a hum-free audio circuit built on an exposed breadboard sitting out on a table like this. :)



Sorry about all the double and triple-spaced paragraphs; this forum software appears to have a bug, causing vast numbers of blank lines to be randomly inserted into every post I type. Normally I waste lots of my time editing, and re-editing, and re-re-editing every post to remove them; right now, I don't have the time to do that.



-Gnobuddy
 
Great suggestions, all!

Just now I tried to start soldering onto a generic PCB. Although I have little trouble soldering wires onto panel-mount components, soldering onto a tiny little board is another thing all together - I suck! Part of the problem appears to be that my iron is not hot enough; part, my 59YO eyes. I have no illusions of possible grandeur here and am inclined to continue doing direct point-to-point soldering, either in the air or on a larger board without metallic traces/runs.

One question I have about direct point-to-point connections is whether wire bits are necessary to maintain spearation between components as shown on schematics, or whether, say, with an in-jack followed by 2 caps on a schematic, one can connect both caps and the downstream wire directly to the lug, such that the lug and 2 cap legs are soldered together, all in direct contact with each other. I'm inclined to use the schematic as a literal blueprint and add the wire bits between the jack lug and 1st cap leg, and then add another wire bit between the 1st cap and the 2nd cap leg. Off course, with caps wired in series, the cap legs are the wires themselves. I guess I'm thinking more about a situation such as decoupling of PSU rails by connecting a cap between the + and - wires followed by another cap going between the + and - wires downstream a bit. IIRC this or something like this is "snubbering" when done in a PSU. IAE, see attached drawing for visual clarification. A or B or both OK?
 

Attachments

  • pointtopointwiringAorB.pdf
    11.4 KB · Views: 32
Last edited:
Jimbo, I know you are partly doing this to scratch a diy itch, and sometimes the pleasure of finding something out is really the whole point. But you’re also looking to build a less loud amp, so if you’re interested I have a pcb design for a ruby amp, a simple lm386 with preamp built in that I’d be happy to send you the gerbers for. I’d offer to send you a board but I’m not sure it’s any cheaper than simply ordering a small prototype batch from a board house.

Anyhow just an offer, and I fully understand if you prefer to soldier on :)
 
By the time I finished adding pot controls for volume, gain, and bass boost, the breadboard was essentially as indicated in the attached schematic at circuitbasics.com with modifications indicated in the notes. Rather than using a variety of different component values selected randomly from a hodgepodge of sources, I used the values on this schematic.

P.S. Another change: I removed the resistor on pin 7 to ground.

P.S.S. And, of course, the stomp box powered by a 9V wall wart functions as a preamp before the 1/4" mono input jack.
 

Attachments

  • circuitbasicsschematicwmods.jpg
    circuitbasicsschematicwmods.jpg
    397.4 KB · Views: 95
Last edited:
Part of the problem appears to be that my iron is not hot enough; part, my 59YO eyes.
I use one of these when soldering tiny things: YOUKOYI LED Magnifying Lamp Metal Swing Arm Magnifier Lamp - Stepless Dimming, 3 Color Modes, 5X Magnification, Desk Lamps - Amazon Canada

Dollary-store close up spectacles help, too. :)

As for the soldering iron, I suggest upgrading when the budget allows. I have used a Hakko iron for a long time now, and it makes soldering a pleasure.
question...whether wire bits are necessary to maintain separation between components as shown on schematics...
Nope. Electrical continuity is electrical continuity. However, it is difficult to solder several wires together properly - it's quite easy to end up with one wire in the middle that is coated in a thin layer of insulating flux, and not actually making electrical contact!
I'm inclined to use the schematic as a literal blueprint
It's good to gradually wean oneself away from this mindset. A good schematic is drawn for maximum readability, which is not necessarily the optimal way to package it for an actual physical build. (It won't make much difference for very simple circuits, though, only when you start moving on to more complex things with more components.)


-Gnobuddy
 

Yeah, I need one of those.

I have used a Hakko iron for a long time now, and it makes soldering a pleasure.

Another item for the wishlist. I'm using the most el cheapo from Harbor Freight. Fine for direct point-to-point but essentially unusable on a generic PCB. Tap, nothing, tap nothing, tap, nothing, tap - a lake!

Nope. Electrical continuity is electrical continuity.

I have a lot to learn about electricity. Thank again for that book link.
 
I'm using the most el cheapo from Harbor Freight.
Been there, done that, used a similar dirt-cheap iron through most of my childhood and teenage years, and right through my twenties, because I was still a dirt-poor college student.

IMO the worst thing about these irons is that there is no temperature control at all, so the temperature of the iron varies with the mains voltage, and with the size of the item you're soldering. Because you never know what temperature the iron is at, it's much harder for your hands and brain to figure out the optimum duration to apply heat, so that your joint is neither under nor over-cooked.

Pay lots of attention to the visual appearance of the joint: when the iron temperature is poorly regulated, it's the look of the joint that gives you feedback as to whether you timed it right, or it's a cold joint, or a "dry" joint from overheating. With experience and focus, you'll find you can make good joints even with a lousy iron. (But it's much easier to do with a nice temperature-controlled iron!)
Tap, nothing, tap nothing, tap, nothing, tap - a lake!
Something is very wrong - tapping the iron should definitely not be a part of your soldering technique! :bigeyes:

The idea is to first clean the parts to be soldered (to remove the inevitable oxide layer), then place them in position to be soldered, then heat them with the iron, then touch the solder wire to the hot metal (with the soldering iron still in contact with them) so that it melts and flows around them. Then lift off the tip of the iron from the joint.

An alternative method is to place the tip of the solder wire between component-lead-to-be-soldered and the tip of the iron, and heat the whole lot until the solder flows and makes the joint, at which point you lift off the tip of the iron. Again, NEVER apply the solder to the iron first, and then try to transfer it to the joint.

NEVER dab solder onto the iron and try and "spackle" it onto parts; NEVER tap or shake the iron itself. The first of these atrocities makes dry joints; the second one makes bad joints and simultaneously creates considerable risk of burns. A drop of molten solder flung onto a body part can cause third-degree burns - the stuff is at over 700 degrees Fahrenheit! (370 Celsius to the rest of the world.)

Whichever method you use, the goal is to take no more than three seconds to make the joint - this is particularly important when soldering to small semiconductor devices (like your LM386.) With practice, proper prep of the parts, and the right tools, soldering small items will take considerably less than three seconds.

You can allow yourself to take a little longer when soldering to electro-mechanical parts (switches, relays, potentiometers) as they are not quite as heat-sensitive. They also tend to have more massive electrodes to solder to, and the additional thermal mass will slow down the soldering process - it will take a little longer to heat up a bigger piece of metal.

Still, five seconds is more than enough. Take much longer than that, and you may damage things like small pots and plastic jacks and plugs.


-Gnobuddy
 
This tutorial might help with the soldering: Electronics Primer: How to Solder Electronic Components

By the way: are you using 60/40 lead/tin solder? That's the only type you should be using for electronics work at this stage of the game.

In particular, steer clear of the lead-free stuff (it's shiny, and a spool weighs less than dull-looking 60/40 solder.) Lead-free is better for the environment, but using it for DIY results in poor joints and burned-out semiconductors, particularly when it's used by someone new to soldering. Avoid it like the plague!


-Gnobuddy
 
Oh, no, I don't tap the iron. What I meant to say was place the solder at the point where I want it to melt. Since I have to guess when the iron is hot enough, the solder sometimes sticks. I seem to become less coordinated when it sticks, so when that happens I may struggle to lift it and then try again in a second. Probably bad technique.

I've been using whatever solder I picked up at Harbor Freight. I ordered some Kester 60/40 and received it today. A lot of people on this site seem to like Kester solder.

Thanks for the soldering tips and link.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.