Op Amp - Guitar Audio - Resistors - Page 1
Forum section: electronics / beginners

author: twjtwj
author_rank: Contributor
timestamp: February 23, 2013, 02:56:14 pm
content: I want to use an op amp (specifically OPA134) to boost my guitar audio (straight from the pickups). I want it to be a simple volume boost with little to no distortion added. From what I've researched, this means that I'm dealing with anywhere from 0 volts to a little over 1 volt (peaks from 200mV to over 1 volt). I want to change this boost dynamically using a digital pot. So here are my questions.Is the OPA134 a good choice for this? Are there better ones? Is this one good for the cost (around $4)?As I picture it, there will be a resistor alongside the digital pot so that I can vary the boost. What should be the ohm value for the resistor, what about for the digital pot?Thanks a bunch.

author: c4757p
author_rank: Super Contributor
timestamp: February 23, 2013, 03:04:34 pm
content: Why a digital pot? And I don't suspect you need a $4 op amp for a guitar signal. Have you tried a $0.05 transistor?

author: fcb
author_rank: Super Contributor
timestamp: February 23, 2013, 03:06:23 pm
content: proposed schematic?required gain (MIN and MAX)?digital pot?huh?

author: twjtwj
author_rank: Contributor
timestamp: February 23, 2013, 08:26:04 pm
content: I don't have any proposed schematics yet. I'm still in the "what components should I use" phase.I thought an op amp's purpose was to change the gain level according to what resistors you use. So my thought was to use one constant resistor along side a digital potentiometer controlled by an arduino (using SPI or 3-wire). Thus being able to change the gain level via code in the arduino.

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: February 23, 2013, 08:45:30 pm
content: How on earth did Jimi Hendrix survive without aurdino

author: fcb
author_rank: Super Contributor
timestamp: February 23, 2013, 08:50:17 pm
content: Quote from: twjtwj on February 23, 2013, 08:26:04 pm

author: c4757p
author_rank: Super Contributor
timestamp: February 23, 2013, 09:00:00 pm
content: What do you plan on doing that requires a microcontroller?

author: Noize
author_rank: Regular Contributor
timestamp: February 23, 2013, 09:17:11 pm
content: So you want to make a built in tremolo effect for your guitar?That would be cool, using different wave forms like square or sine. O0Quote from: twjtwj on February 23, 2013, 08:26:04 pm

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: February 23, 2013, 09:19:12 pm
content: It seem that nothing can be done without oneI've had counselling, I’ve attended all the meetings, but i can't help myself.The problem,,,,,I don't like the way my wall switch turns on and off my 100w room light bulb. I want to use a micro to sense the switch and turn on and off the light at the magic moment only possible with a micro. But the bloody arduino board won't fit behind the switchPlease helpSorry, but i couldn't resist thatWhat is wrong with a 10k pot and an expensive original marshal Guitar amp knob.

author: c4757p
author_rank: Super Contributor
timestamp: February 23, 2013, 09:21:24 pm
content: Maybe it's not that simple. Why don't you let him explain what he wants to do with it?

author: IanB
author_rank: Super Contributor
timestamp: February 23, 2013, 09:36:02 pm
content: Quote from: c4757p on February 23, 2013, 09:21:24 pmRight, but that's a common problem.Instead of seeing something like this:"I have this goal in mind, and I want to achieve this result, how could I go about it?"...you instead tend to see things like this:"I have learned about this piece of technology and I want to use it for some unstated purpose that it may not be suitable for, how should I include it in my design?"It is frustrating to encounter because even if you told the enquirer the technical answer to their question they wouldn't get what they needed.

author: c4757p
author_rank: Super Contributor
timestamp: February 23, 2013, 09:40:13 pm
content: I'm not saying "maybe he really should use an Arduino". The answer to "should I use an Arduino?" is often a resounding "no!". But if he had a reason to think he might need a controller of some sort, then perhaps a simple potentiometer isn't enough, and if there were more information, somebody could help with ideas. The usual pile of "You want to use anArduino? Back inmyday..." comments is not helpful at all and just serves to discourage people from even trying.

author: Noize
author_rank: Regular Contributor
timestamp: February 23, 2013, 09:41:24 pm
content: Yes, but he/she is obviously a beginner. So he makes a arduino controlled volume knob. Then he goes aha I could use an adc input and make a noise gate for the guitar as well and then a tremolo for it as well etc... So I don't see the problem when you are learning.Quote from: IanB on February 23, 2013, 09:36:02 pm

author: JuKu
author_rank: Frequent Contributor
timestamp: February 23, 2013, 09:44:19 pm
content: Quote from: twjtwj on February 23, 2013, 02:56:14 pmYes, yes*, and yes.*: Since you are going to ask... You can always go overkill. For example, LME49710 is better in about all areas, at more than 10x the cost. I would use NE5534 for this: a tad more distortion, insignificant in this application, but lower noise. Don't let the low price fool you, it is a very good audio amp.

author: IanB
author_rank: Super Contributor
timestamp: February 23, 2013, 09:52:45 pm
content: Quote from: Noize on February 23, 2013, 09:41:24 pmRight, but learning also involves learning how to ask the right questions.For instance, "I want to make a programmable effects unit for my guitar that I can control with an Arduino. I was thinking along these lines--am I going about it the right way?"With this there could be some helpful discussion.If the question begins "I want to use an op amp (specifically OPA134) to boost my guitar audio...", then firstly we jump straight to a piece of technology (OPA134) rather than a purpose, and secondly the implied purpose is a pre-amp (boost my audio) -- then where would an Arduino fit in?Leading with a possibly incorrect choice of technology and a possibly misleading purpose does not help to get the kind of answers that would be most useful.

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 01:57:06 am
content: You guys crack me up.The arduino is being used to record and adjust guitar volume levels (EPROM), flash LEDs after certain events like the recording of these levels (event handling), debounce buttons, etc.. Ran the code through the arduino and watched it through the serial interface. It works wonderfully. The one part that is missing is how to change the volume of the guitar levels. Which leads me to:1.) Change levels by simply using the digital pot to turn down the volume. Already have the 3-wire interface working and adjusting the pot as planned.Or2.) Change levels by boosting the volume. This would be the op amp idea and using a constant resistor along-side a digital pot.I'm not sure which one would give me the best sound without distortion, but I thought I'd setup both options for the heck of it.So that's where the original questions come in. What resistor and pot size to use.Does that help?

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 02:07:01 am
content: Added note. I'm going to setup a simple op amp, resistor, pot on a breadboard to see more how it works through my old school Tek 2465. But I've always wondered how you determine what resistors to use. Like if you use 1K and 10K it boosts by 10 right? What about a 100ohm and 1K? Will that do the same because it's 10x the size? If so is it better to use the bigger or larger value resistors?Yes I'm new at this. I've spend a year in electronics, but 0 time with op amps. Thanks.

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 02:16:59 am
content: Do you know how a voltage divider works? (If not, look it up, they're simple - or better, try to derive it yourself using Ohm's law.) The op amp in this configuration is basically reversing the voltage divider. (Because it tries to drive both inputs equal, if the noninverting (+) input is X and the output is Y, and you set the inverting input (-) to be Y/10, the inputs will be equal when Y = 10*X.) There is a tradeoff when choosing resistor sizes - small ones will load the amplifier, large ones are more susceptible to noise. I generally use resistors in a range from 1K to 50K or so for that sort of application, though if you're dealing with tiny signals with no DC offset you can go smaller.

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 02:22:31 am
content: You can also consider a dedicated programmable-gain amplifier. Some are digital and can be controlled by the Arduino. Others use an analog input, which you can drive by running a PWM output through a severe low-pass filter.I am still confused, though, as to why you need to do this. Why would you want to record the guitar levels? All the other functions of the Arduino seem to just exist to allow there to be an Arduino there. I'm genuinely curious - what are you doing this for?

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 02:27:43 am
content: When I'm on stage I get annoyed with different outputs of guitars and having to adjust. So with this I can plug a guitar in, strum, plug another in, strum, etc.. It will record all of their levels through the analog input. Then when you plug in one of those guitars in again it knows that it either can keep it at the same level. Or boost it up to the highest level recorded.. The other option I mentioned would be in reverse with limiting the output down instead.

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 02:46:29 am
content: I do like the programmable gain idea. Any recommendations for one? Looking on digikey it looks like they price from 83 cents to $73. Yikes.

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 02:49:17 am
content: I hesitate to recommend one. I've done a lot of audio, and a lot of digital, but I've never combined the two. I have never needed to do anything like this before, so even if it "looks good" in the datasheet, I've never used it to know if it's actually decent.

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 03:00:16 am
content: I'll just do what I did with audio switches.. Order a few different ones and test them all out.Right now on digikey I'm looking at MCP6S22-I/P-NDThanks for your help. You answered all of my questions and more.

author: cwalex
author_rank: Frequent Contributor
timestamp: February 24, 2013, 03:00:42 am
content: I have built this simple booster that uses a mosfet:http://www.muzique.com/schem/mosfet.htmIt works really nice and sounds good. I don't know how well it will work in your application and sorry I can't be helpful with your original question but it sounds like a really fun project you are doing.I also made a clean boost using just TL072 opamp and it sounded perfectly clean but I can't remember the schematic for that one, it was really simple though. Guitars definitely don't need these super low thd opamps, don't know if it will hurt to use them but easy to try and just put in a socket and swap in different chips, they all generally have the same pinout.Good luck, please post your results and schematic and code if you feel like it

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 03:06:48 am
content: If you didn't notice, MCP6S22 only has eight gain selections, it's nowhere near continuous over a range.

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 03:10:06 am
content: cwalex, you made that MOSFET amplifier and it sounded good? I've tried experimenting with similar MOSFETs (2N7000 actually, which they claim could also work) and could not convince them not to sound like crap. That is actually pretty similar to one of the circuits I tried. It was very noisy. I do like JFETs though.

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 03:14:09 am
content: CWI've learned from all pedal schematics, so yours will be helpful as well. Thanks!The first pedal I made was a 4-channel switch with different 500K volume pots for each. Plus each had a switch that would complete a circuit to parallel a 470K resistor with it to make them 250K'ish pots (both commonly used with guitars). I spent a good amount of time on them but it works perfectly now. Yes I used an arduino (ATTINY84), but it's really useful for the debouncing and storing values (plus I code for a living, so it's easier to think that way). Used the MAX 392 and then MAX313 for that one. Great switches for audio!Attached is a picture. Ignore the MAX312 reference, it's bogus to what's really in there (MAX313).Rock on. O0

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 03:15:27 am
content: I'm glad you pointed that out c4.. I'll look some more.

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: February 24, 2013, 03:21:19 am
content: Ok,So who read the original post and mentally converted it to the contents of Post #15NobodyWhy did it take 15 posts to get to what should have been in the original questionThe original post was ' i have an op amp and want to control it's gain with a micro'It's becoming mind boggling that almost every beginner around the world feels the need to use a micro from turning a led on for 10 seconds to building a linear power supply. Where have the basic simple electronic principles and circuits gone.Yes, micro's have their place, but not in everything - not even in my light switch

author: twjtwj
author_rank: Contributor
timestamp: February 24, 2013, 03:25:55 am
content: But the plan is still to use a micro for saving values and controlling a PGA.Plus the journey to the end was fun. If I wasn't a newbie I'd know exactly what to ask.. That's where you guys (and girls) come in.

author: cwalex
author_rank: Frequent Contributor
timestamp: February 24, 2013, 03:36:29 am
content: Quote from: c4757p on February 24, 2013, 03:10:06 amYeah, very clean and bright. I used a 2N7002 and followed the schematic exactly except I don't think I had a 5K pot so used another value (maybe 10K, I can't remember it was a long time ago). I built it on perfboard and I was inputing to the line input of an EMU0404 PCI sound card and using guitar rig so maybe that made a big difference, impedance would be huge difference to the input of a guitar amp. What problem did you have with it? Also I used all smt parts in case that matters. Sorry to take the thread off track.

author: c4757p
author_rank: Super Contributor
timestamp: February 24, 2013, 04:26:41 am
content: It was literally "noisy" - there was audible static in the signal. Perhaps it was a faulty one, I don't know. I didn't bother with it much.

author: cwalex
author_rank: Frequent Contributor
timestamp: February 24, 2013, 04:56:00 am
content: Quote from: c4757p on February 24, 2013, 04:26:41 amMine was silent, no static. It has a huge input impedance, maybe it was just something to do with the guitar pickups you have or maybe just a dodgy fet?

author: SeanB
author_rank: Super Contributor
timestamp: February 24, 2013, 05:39:45 am
content: 99% of all preamps and effects pedals have used at least a 741 or similar opamp, and many mixing decks use them internally. Opamp choice is based mainly on supply voltage, input and output voltage and currents desired and then frequency response, then you can look at better ones for the base unit. Initially get it working somewhat, then refine it.