Hello all,
I'm working a project that needs to sense vibration in a guitar string and send the value to an Arduino program through AnalogIn. Pitch is not needed as I'm using this pickup to create a velocity MIDI command... currently, the pickup generates an AC signal from -1V to 1V and I need to somehow scale that and shift it into something detectable by Arduino. I know I'll have to make an op-amp amplifier circuit which I can handle, I'm just not sure how convert this from AC to DC.
Any suggestions? Help would be much appreciated. Thanks!
What variable generated by the guitar are you interested in, the frequency of the signal or the amplitude of the signal.
Also consider that the guitar wihich has 4 or 6 strings (or 12) will be capable of producing a complex spectrum of sound which will have high frequency amplitude variations within a nominal level of signal.
Thinking a little more about this, you could use the following circuit
C:\Users\John Rae\Desktop\DC Bias.doc
With equal values of resistors (say 4.7k) this will set a DC bias of 1/2Vcc onto the signal. If powered from 5 volts, the bias will be 2.5 volts so your signal will swing from +1.5 to +3.5 volts with the AC signal being passed to the Arduino. The value of the input capacitor should be large enough to pass the guitar lowest frequency.
Hello all, thanks for the suggestions. Just wanted to clarify exactly what it is:
I'm detecting the amplitude of a single string, the entire pickup is underneath one string. This whole project is to emulate the dynamic of picking a guitar while playing MIDI notes.
Those Peak Detectors you were talking about, Richard... what exactly will the output look like then, and what range of capacitor values should I be working with?
That's a good question, I haven't quite figured that out yet, but here's what I have so far. Ideally, I'd like to be able to treat the amplitude of the input as a linear curve, triggering a Note-On when a certain peak is high (on the positive edge) and a Note-Off when the level reaches a lower threshold (on the negative edge)... therefore it'd be best if I had a circuit that would represent amplitude cleanly without a lot of varying voltage from the capacitors... something that would create a linear slope that fairly accurately represents the signal level...
It's hard to describe I guess, I'm not entirely clear on the difference between half- and full-wave AC conversion
edit: I will begin with Wikipedia. Thanks for helping me get this much... it seems to me that I'd just need to create a simple rectifier circuit and then amplify it with an op-amp... which seems to be exactly what those schematics described.
Yeah, that makes sense... it'll probably be a low E but the actual length of the assembly is only about 6 inches, so the pitch is quite high. Shouldn't affect the pickup though, just lower voltage...
Should I be using a voltage divider after the op-amp? I've seen that in similar projects but I figured that if I used proper resistor values the op-amp would amplify it properly...
You don't need to convert it to DC if you're feeding it to an analog pin. All you need to do is make sure the voltage is positive and less than 5volts. An op-amp can do that. By design an analog input will accept an AC wave form if it's above 0 and below 5volts.