Need tips for electric guitar electronics project

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
Hey guys I'm about to start a new project and am looking for some advice. I would like to build myself a two stage circuit that I can fit inside the body of my electric guitar. The first stage will be a distortion circuit, likely an op-amp or two and some diodes for clipping. The second stage will be a headphone amplifier so that I will be able to play the guitar without the need of a standalone amplifier.
I would like both circuits to have bypass functionality. My questions for the experienced are:

1. Best op-amps for this application, any audio op-amp do? noise, slew rate matter much for this frequency range/application? Hows the LM386 http://www.national.com/mpf/LM/LM386.html#Overview

2. Would 2 9V batteries provide enough juice for both circuits? Is it okay to power them both from the same power source? Would it work fine with just 1 9V split?

3. I want this to work with a full sized pair of koss headphones. How do I know how much gain I will need from the amplifier to drive a pair of headphones? I don't know much about this. Do I need a power amp?

Frequency Response 25-15,000 Hz
Impedance 32 ohms
Sensitivity 92 dB SPL/1mW
Distortion < 0.3%
CordStraight, Dual Entry, 8ft
I've found these stats for my headphones. I'm not really sure how to drive speakers.


There are volume and tone pots currently in the guitar. I plan on just cutting the wire to the output and routing it into this circuitry first and then to the output. I have a Dremel to cut out some of the body of the guitar to fit these electronics inside. Any help appreciated. I'm sure I will have more questions if I get any responses. Thanks!
 

ifixit

Joined Nov 20, 2008
652
I have used the LM386 to drive PC speakers and headphones. It worked great.

Your headphones seem to need only 1 milliwatt of input power to produce 92dB of sound output. That's 180mV into 32 ohms.

The LM386 has a preset gain of 20, without using more external parts, so it would need an input of 180/20=6mV into its 50K input impedance to blow your ears off. Use a volume control at this point.

The outputs from your sources (string pickup, or distortion gen) would need to be no more than 6mV. Amplify or attenuate as required.

A Vcc of 9 volts is good enough for the LM386. Its output will bias itself to half of the Vcc. Decouple to the speaker with a cap.

The other circuitry will likely need a split supply. 9V is OK if the opamps will work with ±4.5V. You may be able to split the supply with a couple of 3.3K resistors. Your ground reference point would then be the junction of these two resistors.

Do you know what the string pickup output level is?

Have fun with your project.
 

THE_RB

Joined Feb 11, 2008
5,438
...
Do you know what the string pickup output level is?
...
A cheap pickup will be 0.5v p/p or more, a good "hot" pickup for rock use will be 1v to 2v p/p.

There are lots of little LM386 guitar amps, most are directly driven from the pickup well into distortion.
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
I'm gonna hook up my guitar to a scope this weekend to see what kind of output I get from the pickups. Here is a basic block diagram that should help. I'm hoping to have each circuit be bypassable so I'll need to look into what kind of switches will allow this. Thanks for the help, I'm sure I'll have more questions.

 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
thanks guys, I've run into some problems for a powering circuit. I tried using a biasing technique to power a ua741 but it has trouble pulling below 0V presumably because its negative rail is 0v. Many sites say most guitar effect circuits are built using this technique though. What am I missing?


Input is green, output of amp is blue, then signal output is red.
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
the headphone amp however sounds surprisingly clear and runs fine from a 9 v battery. i have yet to try the circuits together.
 

Audioguru

Joined Dec 20, 2007
11,248
Your distortion circuit properly biases pin 3 at half the supply voltage with R8 and R11 but is missing an input coupling capacitor to block the DC from being shorted to ground by the input signal generator. Add a 0.1uF input coupling capacitor.
Remove R16.

Your LM386 amplifier is missing a few important parts that are shown in every circuit on its datasheet.
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
thanks, i made a few changes and have some more questions. Here is my latest circuit as well:

1. Would a gain potentiometer be better at R23 or R10. It seems R10 and C9 have a much larger effect on frequency response so it would make sense to leave R10 stable and have R23 a 500k linear pot.

2. To get a decent low end response I bumped up C9 from a .1u to 1u cap. Will this size affect anything other than frequency response?

3. R15 and R17 will be replace with a trim pot. What range should I use? If I put in a 100k it would keep my load roughly the same impedance but wouldnt it kill my current getting to the load through R15? If I used a 100ohm trim I would maintain the current but adjust the load impedance wouldnt I?

4. The LM386 datasheet has an ac coupling output capacitor at 250uF like I am using. Why is this so big and do I need something so big? Also is it okay to use an electrolytic capacitor here since they are polarized?

Im also having a bitch of a time making a true bypass switching mechanism for the point between the effects in my block diagram above. even with a 4pdt i cant seem to get the output from reaching back into the output of one of the effects...its driving me mad but ill figure something out so I can hopefully get led status as well as powering on and off the amps depending on the switches...phew..thanks for the help!




 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
1. Would a gain potentiometer be better at R23 or R10. It seems R10 and C9 have a much larger effect on frequency response so it would make sense to leave R10 stable and have R23 a 500k linear pot.
Correct.

2. To get a decent low end response I bumped up C9 from a .1u to 1u cap. Will this size affect anything other than frequency response?
It changes the -3dB cutoff from 340Hz to 34Hz. Nothing else is affected.

3. R15 and R17 will be replace with a trim pot. What range should I use? If I put in a 100k it would keep my load roughly the same impedance but wouldnt it kill my current getting to the load through R15? If I used a 100ohm trim I would maintain the current but adjust the load impedance wouldnt I?
R15 plus R17 total 10k so use a 10k trimpot. The current does not matter because it is almost nothing.

4. The LM386 datasheet has an ac coupling output capacitor at 250uF like I am using. Why is this so big and do I need something so big?
The LM386 feeds an 8 ohm speaker and 250uF causes a cutoff at 80Hz.
Your opamp is driving the almost dead short of the diodes so maybe 250uF is reasonable.

Im also having a bitch of a time making a true bypass switching mechanism for the point between the effects in my block diagram above. even with a 4pdt i cant seem to get the output from reaching back into the output of one of the effects...its driving me mad but ill figure something out so I can hopefully get led status as well as powering on and off the amps depending on the switches.
I don't know what you mean about "the output from reaching back into the output of one of the effects".
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
The LM386 feeds an 8 ohm speaker and 250uF causes a cutoff at 80Hz.
Your opamp is driving the almost dead short of the diodes so maybe 250uF is reasonable.


I don't know what you mean about "the output from reaching back into the output of one of the effects".
thanks again i think ive figured out the switching with 2 3pdt's for led indication. the only caps that have significant values above 1uf are electrolytic which are polarized. would i really want them in my signal path? seems i dont have a choice for the 250 but do they pass ac?
 

Audioguru

Joined Dec 20, 2007
11,248
The 1uF and 250uf electrolytic capacitors have 4.5VDC across them in your circuit so they pass AC pretty well.
There is no signal across the 4.7uF and 10uF filter capacitors.
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
So I've built everything on a breadboard and it seems to work great. I also decided to wire up all the switches, 2 3PDT's and got them functioning correctly as well as LED indication. Everything was fine until I just started getting an oscillation of some type. The output now rails up to 4V when the headphone amp is on. The frequency is about 36 Hz. I can't figure out whats going on, have caps across the power rails and everything. I've checked shorts. Sometimes it works fine, but most of the time I get this oscillation. When I disconnect the input to the trim pot of the headphone circuit, it goes away. This is connected to the messy switch setup so I feel like its possibly acting like an antenna or something. Any ideas?

played some more with a voltmeter and apparently somehow I've got the output shorting back to the input...
 
Last edited:

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
Just figured it out. The switch was Bad! Had a short between two of the poles. Thanks $5 taiway pos. Anyways, when i touch the input with my finger I pick up a mexican radio station pretty clearly. Hows this work if I don't have a demodulator. Is the station not modulated?
 

Audioguru

Joined Dec 20, 2007
11,248
when i touch the input with my finger I pick up a mexican radio station pretty clearly. Hows this work if I don't have a demodulator. Is the station not modulated?
The input transistor or input transistor in an opamp rectifies a strong AM signal the same way as an AM detector diode. An FM station would need to be very powerful to be detected with an AM detector.
 

rjenkins

Joined Nov 6, 2005
1,013
Add some small capacitors to the first stages to reduce the RF gain.

Something like 100pf across the input or 10pf - 100pf between base and collector (or gate and drain) of the first transistor.

If you get a suitable value, it will kill the gain at RF with no perceptable effect on the audio. Too big will start to cut the treble response.
 

Thread Starter

gizmoman0

Joined Jan 21, 2010
26
Hey guys heres what I have of the layout so far. Im using Pad2Pad and think I'm going to try Futurlec for producing it since its the cheapest I can find. I don't have many guidelines so if you have any resources or tips for ground planes or anything that would be nice. The outside blue box lines are actually the dimensions of an altoids case. I'm going for small so I can fit in my guitar and hopefully others in small enclosures. Thanks

Traces are currently 0.032 inches, that okay?
http://www.futurlec.com/PCBService.shtml

 
Last edited:
Top