Building a small guitar amp - Page 1
Forum section: electronics / beginners

author: Torrentula
author_rank: Regular Contributor
timestamp: February 17, 2012, 07:05:24 pm
content: Hey guys!I want to build a little guitar amp (nothing fancy, just for the hack of it). I do have a circuit in my mind (and already actually drawn a basic schematic) but I'm still not quite sure about it. Do you think the output RC-filter is not interfering with the output signal of the opamp?I haven't yet chosen on an opamp so I'd appreciate any suggestionsI have searched the forum and the internet but I can't find any information on how to set an opamps gain with a microcontroller. Do I have to use a digital potentiometer to set the gain or is it possible to set it only with the built-in peripherals of the microcontoller?Thanks for your helpTorrentula

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 17, 2012, 08:44:57 pm
content: An op amp is not going to drive an 8 ohm load directly.For a guitar amp you need a high-gain high-impedance input for regular passive pickups. Following the preamp stage you can then drive a small power amp into the 8 ohm speaker.What supply rails are you planning to use? The OPA743 is a +/-6V or +12V device. If you are planning to run the whole thing of 12V then you can always look at car radio power amp chips (eg TDA1519 etc) to make the output drive section easy.If it is a simple project, why would you even bother with a microcontroller in it? Just use pots to adjust the input and output gains. A microcontroller only complicates it and is unnecessary.

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 17, 2012, 10:05:34 pm
content: I've been in the music business for years and have been on a few guitar amplifier design teams. First off, this is just my opinion, monolithic operational amplifiers sound very unmusical for guitar applications - especially in the very critical first gain stage. I suggest looking into vacuum tube technology if you really want to learn about guitar amps; guitar amp designers have been trying to get solid state designs to sound like tubes from day one.If you are simply having fun and using parts that you have lying around, there is a virtual plethora of guitar related designs that you could borrow from on the net.Regarding your design, C1 is a bit large, you should make it closer to .01ufC2 is also very large, and should be closer to 1uf.Never!! put a gain pot in the feedback loop because if the wiper jumps off of the track, your op amp will peg to a rail.Not really sure why R3 is in parallel with an 8 ohm load.To power 8 ohm headphones, I suggest an emitter follower discrete transistor configuration with a very large 500uf dc blocking cap. You could prob get away with 32 ohm headphones without an emitter follower.741, 1458, 4558, TLO72 are basically the preferred operational amplifiers to employ on guitar designs because of their distortion effects. The older the better!!Here's a great place to borrow some designs from. Notice how lots of these pedals employ what is called LED clipping and other creative techniques for distortion effects.http://www.webphix.com/schematic%20heaven/www.schematicheaven.com/effects.html

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 17, 2012, 10:12:26 pm
content: I forgot to mention that you can't load you input with anything less than 1M or you won't hear anything:(

author: electronwaster
author_rank: Regular Contributor
timestamp: February 17, 2012, 10:59:51 pm
content: It doesn't answer your question directly, but I searched around quite a bit a few months ago looking for a very simple guitar amp schematic, and came across the noisy cricket.I built it and it's great - I really recommend it. If you have all the soldering equipment and don't mind a plastic peanut butter jar for an enclosure (for example), then you can build it for just a few dollars. It's based around the LM386 IC. The project is very well explained and there are PCB layouts, veroboard layouts (off-site) and so on. I think it's aimed at (and is ideal for) beginners.I built mine in a hammond-type case the size of a stompbox.Here's the page:http://www.beavisaudio.com/projects/NoisyCricket/If you're interested in this kind of thing in general, there is loads more interesting stuff at that site.Cheers,electronwaster

author: amspire
author_rank: Super Contributor
timestamp: February 18, 2012, 01:09:17 am
content: I would use an audio amp power amp IC instead of a power opamp. It is designed for the job so you get a soft start-up - no ugly thump from the speaker as the power comes on, and it will be completely stable with the reactive speaker load. Pick a speaker that is more powerful then you need so it can handle the low notes without hitting its limits.Now small guitar amplifiers will be regularly driven to overload, and solid state clipping sounds really bad. I had always heard how it was the odd harmonics from clipping in particular that were bad, but I thought I would do some calculations to see why this is. So say we take a C note and clip it generating 2nd, 3rd, 4th, 5th, etc harmonics. What notes are these harmonics? (Hope I get the numbers right)Fundamental: C2nd Harmonic: C Pretty good - always sounds great3rd Harmonic: G Not too bad.4th Harmonic: C excellent5th Harmonic: Out of tune E Doesn't sound good6th Harmonic: G OK7th Harmonic: Very out of tune A# Yuck8th Harmonic: C9th Harmonic: Slightly pitchy D Not good10th harmonic: Out of tune E again like the 5th harmonic but an octave higher, so for the first time, the even harmonics are going bad11th Harmonic: Half way between F and F#12th Harmonic: GSo I guess the story is that even harmonics in distortion are great, as long as there is not much 10th harmonic and above. With odd harmonics, anything above the 3rd is a disaster.What this means is it is really worth adding a soft limiting circuit before the power amp to make sure that there is never any power amp clipping and to limit the amplitude in a way that boost the lower even harmonics, and minimizes odd harmonics. If you are interested, I can suggest some ideas. Something reasonable can be done with a few cheap parts that may not give the true "valve" sound, but will sound decent.Richard.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 18, 2012, 02:25:34 am
content: There's been a lot of work done on distortion characteristics. Some sound good and some sound OK and some sound terrible. The worst one is crossover distortion. Avoid it at all costs. Edward Cherry did a demo at the 1984 AES convention (http://www.aes.org/e-lib/browse.cfm?elib=11640)with varying amounts of different distortion types on different types of music.Harmonic distortion is related to the input signal, the music, and as such it can add to the sound, providing additional texture. The harmonic degrees and amplitudes will determine the type of texture. Crossover distortion, on the other hand, is not related in any way to the music and just sounds awful on all signals.

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 18, 2012, 04:39:17 am
content: Quote from: DrGeoff on February 18, 2012, 02:25:34 amI disagree. Awful is a matter of opinion:) Some folks like what you might call awful and vice versa. There are several guitar pedals that create crossover distortion in their signal paths on purpose! Personally, I bias guitar amps with a tiny bit of crossover distortion in the output tubes; this is also a matter of opinion.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 18, 2012, 05:49:30 am
content: Of course. From an instrument amplifier and musical signal source perspective any form of colouration is fair game. You can't get that heavy metal sound with a pure amplifier!

author: amspire
author_rank: Super Contributor
timestamp: February 18, 2012, 06:03:46 am
content: Quote from: DrGeoff on February 18, 2012, 05:49:30 amBut you can with a pure amplifier with a foot switch controlled distortion box connected to the guitar. Any distortion any power amplifier can add can also be done at preamp stage followed by a low distortion power amp. It is not unknown for big bands to be using fake gigantic speaker boxes and valve amps on stage while they are actually using off-stage solid state amps.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 18, 2012, 06:13:37 am
content: Or just use a good power amp and a DSP box like the line6 pods, NI guitar rig etc, that will model a vast combination of guitars, amps, cabinets and effects.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 18, 2012, 10:26:03 am
content: Wow that's a lot of informationWell let's see... so how can I achieve an input impedance of 1MOhm on my preamp? Can I use an LM386 as a preamp and then feed it's output into the TDA2040 directly?Sorry for my noob questions but I'm pretty new to analog electronics.Thanks for your adviceTorrentula

author: electronwaster
author_rank: Regular Contributor
timestamp: February 18, 2012, 10:35:42 am
content: The input impedance of the LM386 is 50K (http://www.ti.com/lit/ds/symlink/lm386.pdf), so it will load down the instrument a fair amount.You can get around this by having a unity-gain amplifier, such as a jfet transistor in common-drain mode (also known as voltage buffer). The noisy cricket uses a MPF102 in common-drain mode with a 1M resistor to ground to set up input impedance (http://en.wikipedia.org/wiki/Common_drain).Here is an interesting page on buffers specifically for guitars (http://www.muzique.com/lab/buffers.htm)Cheers,electronwaster

author: Zero999
author_rank: Super Contributor
timestamp: February 18, 2012, 03:44:45 pm
content: I think the OPA743 would be perfect for building a buffer for a power amplifier such as the LM386 or TDA2040.To achieve lower distortion and noise, you may also want to add some gain to the buffer stage and reduce the gain of the power amplifier as much as the IC you choose will allow you. Power amplifier ICs tend to have better THD and noise when operated at lower gains. Don't go too low though as it may cause oscillation, for example the LM386 has a minimum gain of 20. I don't know about the TDA2040, I haven't read the datasheet.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 18, 2012, 04:56:55 pm
content: So taking all you advice into account, I now come to the problem of adjusting the gain, if I shouldn't put a pot into the feedback loop of the amp and if I set the gain of the power amp (LM386) as low as possible to keep the distortion low.QuoteHow do I make the gain adjustable without using a pot? Doesn't the buffer lose it's infinitely high input impedance when I add some gain with the help of a voltage divider?

author: Zero999
author_rank: Super Contributor
timestamp: February 18, 2012, 06:54:06 pm
content: Quote from: Torrentula on February 18, 2012, 04:56:55 pmFor the audio amplifier IC you read the data sheet. For the op-amp you look for a tutorial on calculation the gain you require.QuoteAn op-amp keeps its high impedance when connected as a non-inverting amplifier.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 18, 2012, 08:29:28 pm
content: Ok so now I've redrawn the schematic.R5 and C3 are the tone control and the LM386 is set to a gain of 20 (lowest possible).I'm still not sure about R4 as the gain control for the buffer

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 18, 2012, 09:00:48 pm
content: I don't think you want a pot directly on the input. Most guitars have level controls on them already.Perhaps you should use a FET input op amp like the TL072/LF353 and make the preamp 2-stage. The first stage is high impedance input with a fixed gain of around 20dB. This is followed with an input level control which feeds the next stage which has a 40dB fixed gain, giving a total of 60dB gain through the preamp when the input level control is set on max. The output of the second stage would then go through an output level control into the power amp stage.

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 18, 2012, 09:18:20 pm
content: You're getting there. You've input impedance is still less than 100K - get rid of R2 and replace R1 with 1M. You might also want to put a small cap in parallel with R1 or an ac integrator cap in the feedback loop of the first op amp, probably both for stability. Replace R3 with the same setup as R5 where you've got the wiper tied to one of the pins. R3 should be 500K in series with a 10k resistor. Replace R4 with a 10K resistor. R5 wiper needs to go to pin 3 of the second op amp; this will give you a fixed load on IC2. Also, I wouldn't bother with the fancy op amps. Just use a 4558 A and B section. Pin 2 of IC1 should have a resistor there to eliminate bias current effects. I'm not sure why IC1 doesn't have a feedback loop and don't know much about it.

author: Zero999
author_rank: Super Contributor
timestamp: February 19, 2012, 02:39:19 am
content: What does R5 and C3 do? Nothing, get rid of them.C2 is so small the cut-off frequency will only be 20kHz which is above the audible frequency range which is useless, make it 1000uF for a lower cut-off of 20Hz.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 19, 2012, 11:03:48 am
content: So here is another revision of the schematicQuoteAdded a 1M resistor on the input:1 / 2*PI*106*10-8= 15.91HzSo I'm now using the dual stage preamp as suggested, I hope I got everything right with that one.I'm not sure about what value to choose for R7, in the Datasheet for the LM386 the inverting input is not grounded through a resistor.

author: Zero999
author_rank: Super Contributor
timestamp: February 19, 2012, 12:43:27 pm
content: You've still forgotten to chance the value of C2.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 19, 2012, 03:33:59 pm
content: Okay so now all suggested improvements are made. Still the question remains what value should be chosen for R7?

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 19, 2012, 04:04:38 pm
content: HiNo need to use R7, it will just increase noise...

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 19, 2012, 06:52:41 pm
content: The pin 4 of the LM386, must be connected to ground, and not to a negative voltage...

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 19, 2012, 08:07:06 pm
content: Unless you want the pots to sound scratchy, it is usually best to AC couple the signals in and out to eliminate any possibility of having DC current running through them from offset voltages.Also prevents your second stage from amplifying any DC offset output from the first stage.

author: Zero999
author_rank: Super Contributor
timestamp: February 19, 2012, 09:38:45 pm
content: Quote from: Tube_Dude on February 19, 2012, 06:52:41 pmIt could easily be connected to a negative voltage, providing the total supply voltage doesn't exceed the maximum rating, the input is AC coupled and the inverting input connected to the negative supply, rather than 0V.

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 19, 2012, 10:19:22 pm
content: Quote from: Hero999 on February 19, 2012, 09:38:45 pmHave you seen the data sheet? The inputs of the LTP (long tail pair) are referenced to ground via a 50KOhm resistor, and not floating, as is usually used in any OP-AMP type typology.Quoting LM386 data sheet:[[ The inputs are ground referenced while the output automaticallybiases to one-half the supply voltage.]]For reference, the LM386 data sheet:http://www.ti.com/lit/ds/symlink/lm386.pdf

author: Zero999
author_rank: Super Contributor
timestamp: February 19, 2012, 10:42:57 pm
content: Quote from: Tube_Dude on February 19, 2012, 10:19:22 pmYes, I've read the datasheet.None of that stops you from powering the LM386 from a bipolar power supply and AC coupling both the input and output.

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 19, 2012, 10:53:24 pm
content: Quote from: Hero999 on February 19, 2012, 10:42:57 pmAs the input signal (before the input cap) is ground referenced, all the noise at the eventual negative rail, will be present at the output without any attenuation...

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 20, 2012, 01:37:49 am
content: Quote from: Hero999 on February 19, 2012, 10:42:57 pmI just read the data sheet... Is there some reason that the LM386 was selected in the first place? It is designed for battery or single supply operation. It doesn't have protection diodes. The tail of the LTP is tied to the feedback loop and doesn't reference the opposite rail so that it self centers the output. It lacks a Miller cap in the VAS (prone to self oscillation at higher gain unless cap is added to pins 1 &With such an irregular configuration as Hero999 has suggested, who knows if it will survive power up, power down on a home brew PSU. Why not select another op amp?On another note, without going into too much detail, you will find that any bypass cap over 50uf doesn't make much of an improvement except for HiFi related stuff. The output impedance and load that you are driving are big factors in the equation too. Musical instrument applications are a different story and audio related irregularities like capacitor distortion are sometimes welcome. On a guitar, you won't even be able to hear the difference between 10uf and 50uf anyway because the guitar only goes down to about 8OHz. 10uf is the maximum size that I would employ on the output bypass cap. The larger ones have a tendency to suck your tone and will make the amp sound bass heavy. Too much bass will cause all sorts of problems when a guitarist mutes low notes or plays with their palm - like blow up your speaker!! Buy a few extra values if you can and compare the difference.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 20, 2012, 05:25:25 pm
content: So now I've exchanged the LM386 with the TDA2040, AC coupled all of the pots (are there really two caps needed?) and I've added one of the tone controls shown on this site:http://www.gmarts.org/index.php?go=212Should I add the clipping diodes before or after the TDA2040?Is there anything else to pay attention to?Thanks,Torrentula

author: Zero999
author_rank: Super Contributor
timestamp: February 20, 2012, 06:36:53 pm
content: All rihgt, I can now see why my suggestion may have not been such a good idea.

author: DaveHardy
author_rank: Regular Contributor
timestamp: February 21, 2012, 01:44:36 am
content: I'd give IC2A more gain and turn IC2B into a unity gain configuration to drive your eq. You don't need to go over 60db. The 2040 doesn't have a feedback loop if I remember correctly. There are 6 pins on it or something for setting gain. You should check the data sheet. Also, you don't want a cap after the 2040 because the 2040 is moving lots of current . The current will charge the cap strange ways and cause phase distortion issues when the speaker coil returns from excursion. (inductive load)

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 21, 2012, 02:12:25 am
content: Quote from: DaveHardy on February 21, 2012, 01:44:36 amI disagree with that. You don't want to clip the input stage with a hot pickup configuration. Using 2 fixed gain stages allows for ample gain with level control between them to allow the first stage to overdrive the second stage if desired as an effect.Quote from: DaveHardy on February 21, 2012, 01:44:36 amProbably also need to bypass the supply rails of the power amp with 220UF//0.1UF combination, but I guess this circuit does not show any of the power supply section anyhow.

author: Torrentula
author_rank: Regular Contributor
timestamp: February 21, 2012, 05:21:38 pm
content: Okay so now this is the final version of the amp section I think, unless there are any other improvements to be made or mistakes to be corrected.So now I need a power supply circuit. I don't think two 9V batteries in the proper configuration will get the job done, but I don't want to do any mains wiring either. Is there any way around a transformer and mains voltage?

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 21, 2012, 05:47:21 pm
content: Put a electrolytic capacitor in series with R6 1k, for to degenerate DC gain to 1, and get lower DC offset voltage.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 21, 2012, 09:39:44 pm
content: Quote from: Torrentula on February 21, 2012, 05:21:38 pmWhat supply voltages are you hoping to use?

author: Torrentula
author_rank: Regular Contributor
timestamp: February 22, 2012, 12:21:44 pm
content: QuoteI think I'll need +15V / -15V supply rails to power the op amps properly.Is it possible to use an MC34063 in a boost converter configuration to get the +15V / -15V or is there an easier way to get around mains voltage and a transformer?Thanks!

author: T4P
author_rank: Super Contributor
timestamp: February 22, 2012, 03:06:20 pm
content: Quote from: Torrentula on February 22, 2012, 12:21:44 pm18-0-18 or 2x18VAC or 36VCT into a bridge rectifier of at least 3 amps . you can use 50VA transformers or 30VA .take the output from the bridge rectifier and setup 7815 and 7915 , you only need 100uf caps for the opamp sectionFor the amp section ( TDA2040 ) another set of 7818 and 7918 and 2200uf caps .

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2012, 05:29:31 pm
content: A regulated supply is generally not required for an audio amplifier because of the supply rejection ratio and with a bipolar power supply, changes in the positive supply are met with equal changes in the negative supply which tend to cancel one another out.

author: T4P
author_rank: Super Contributor
timestamp: February 22, 2012, 08:10:09 pm
content: Quote from: Hero999 on February 22, 2012, 05:29:31 pmWell , i'm worried not needing a regulator might mean ... big caps .

author: Torrentula
author_rank: Regular Contributor
timestamp: February 22, 2012, 08:38:11 pm
content: So there is no way around stepping down mains voltage to 15V?I have not yet done anything with transformers and mains voltage. I know the theory behind it and full wave rectification etc. but I'm a little scared of the mains voltage itself and I don't want to burn down my transformer or even worse, just because of a short circuit or something

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 22, 2012, 09:38:27 pm
content: Well since you need quite a bit of power to drive that power amp, you are going to need more than batteries or a wall wart. Looks like you will need to get a transformer, bridge rectifier, a couple of large caps and some regulators.Unless you can modify the circuit to run off a single 12V rail and use a 12V 5A switch mode supply.

author: ciccio
author_rank: Frequent Contributor
timestamp: February 23, 2012, 09:39:40 pm
content: Quote from: Torrentula on February 21, 2012, 05:21:38 pmQuote from: Tube_Dude on February 21, 2012, 05:47:21 pmThis is a good suggestion, but I'll also add a 100k resistor from IC1B pin 5 to ground.This op-amp ha no ground reference.Please consider that IC1B (TL072) has a gain of 101: this is a lot for such a noisy op-amp.Please consider lower noise types (NE5532 or NJM4580).Best regards

author: Torrentula
author_rank: Regular Contributor
timestamp: February 26, 2012, 09:26:11 am
content: The pots all have to be logarithmic pots, right?

author: Tube_Dude
author_rank: Regular Contributor
timestamp: February 26, 2012, 12:50:51 pm
content: Quote from: Torrentula on February 26, 2012, 09:26:11 amNo! Just the volume pot must be logarithmic, not the tone controls ones...