monitor a guitar signal strength, then output a DC level?


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653

    Default monitor a guitar signal strength, then output a DC level?

    I'm at an early exploratory stage, where I'm looking for some circuit or other (not sure if it'll be PIC based or not yet!), to do the following....

    Feed a guitar signal as an input to a a PIC input pin.

    Have this incoming signal level monitored...then output a DC level on an output pin that's inversely proportional to the incoming signal. Therefore if the overall incoming signal is too high, drop the DC level on the output pin. If the incoming signal is too low, raise the DC level on the output pin

    This DC level output will be fed to an audio power amp chip that has a DC pin dedicated to volume control.

    So in essence, it's an AGC circuit...but utilising a PIC to do this (yes, I know there are probably specialised ICs that already do this, but I have a unique need & need to control the charactersistic of the circuit)

    Is this do-able?

    If so...a lot of code? (I'm new...having just done a small amount of programming...though I did get my first PIC project working!)

    Anyone got a link to something I could rejig?

    Any comments to get me started most welcome!
    Last edited by HankMcSpank; - 2nd April 2009 at 12:07.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Hmm, any audio processing of this kind needs logarithmic amplifiers to cover the dynamics.

    You will not have satisfactory results with just the A/D converter of the PIC.

    Have a look at the http://www.picbasic.co.uk/forum/show...?t=2359&page=2 from post 51 and after.

    Also PIC are not very fast for the processing you may need.

    Ioannis

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    I'm not sure if this would help you. I remember a gentleman called Robert A Penfold in the late 80's-early 90's who used to write lots of audio related articles in Practical Electronics Mag or Everyday Electronics Mag. If you can search for his articles, I'm pretty sure, he has covered this too. What you're trying to do is called an envelope grabber, I think.

  4. #4
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    I probably didn't explain myself very well (for the sake of simplicity) - I can see that you've probvably not sussed what I'm trying to achieve!

    So, a little more meat on the bones...

    I'm intending 'tapping' off a guitar signal (six signals actually...one from each string)...I need the 'level of the output of these six strings monitored. I originally implied having the PIC carry out this monitoring on the alternating guitar signal, but it makes more sense to do the following...


    Since these six signals will be buffered (and will likely be amplified a little), I could actually turn them into a DC level with a full wave rectifier & smoothing cap...so I don't need any massive A/D processing...a simple sample of the string's DC level about 5 times per second should suffice.

    I need the PIC here to act as a DC voltage comparator....let's say the rectified/extracted DC level of a particular incoming guitar signal is 2V, but it needs to be 3V...therefore we get the PIC to increase a DC level on an output pin (this feeds a DC 'volume control' pin on a power amp IC, this elevated DC will make the power amp 'drive' a guitar string sustainer coil more, which in turn makes the string vibrate more...the 'increased' guitar output signal is fed back into my circuit.

    Thererefore, what we have is a feedback loop....if the incoming guitar signal is too low, the corresponding guitar string will be 'driven more' until its amplitude is increased & it hit's the target reference voltage.

    I know all of this can be done in analog, but I'd like the circuitboard to go inside the guitar, so small size is paramount & a PIC with say IO 20 pins is an awful lot smaller than the several opamps per sting needed to do this.

    So what I really need is a PIC to monitor 6 x DC levels against a reference voltage & subsequently change a DC output level on six of its output pins to suit. (ie I don't need any fancy logarithmic algorithms, etc)
    Last edited by HankMcSpank; - 2nd April 2009 at 18:24.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    IMHO, every audio needs at least 60-70db dynamic range. With the full wave rectifier I am not sure that you will reach over 25-35db. Your ear, no matter what post processing you are going to do, needs this logarithmic treatment.

    Anyway, about the PIC now, if 5 times/sec is enough for you, then almost any PIC may do the job. What you need at the output is a PWM signal with a low pass filter to get the analog control voltage for the VCA.

    Forum has covered the last many times.

    I really would love to hear some samples of the effect if you make it working.

    Ioannis

  6. #6
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    IMHO, every audio needs at least 60-70db dynamic range. With the full wave rectifier I am not sure that you will reach over 25-35db. Your ear, no matter what post processing you are going to do, needs this logarithmic treatment.

    Anyway, about the PIC now, if 5 times/sec is enough for you, then almost any PIC may do the job. What you need at the output is a PWM signal with a low pass filter to get the analog control voltage for the VCA.

    Forum has covered the last many times.

    I really would love to hear some samples of the effect if you make it working.

    Ioannis

    Many thanks...in the time since posting I've been on intense googling & realised that the PIC doesn't have the opposite of ADCin (which is a shame as DACout would have been fab!).....sussed the PWM approach but hadn't realised about the low pass filter on the PWM output - tks.

    Re the end result itself...I'm not trailblazing....it's been done - I'm just trying to do it with six channels (the commerical units send one 'summed' signal to their driver), as having six channels means more control & cool possibilities, but the component count will be 6 times more, hence trying to condense using a PIC...

    (about 12 seconds in)
    Last edited by HankMcSpank; - 3rd April 2009 at 01:03.

Similar Threads

  1. small dc signal amplifier schematic need
    By phoenix_1 in forum Schematics
    Replies: 9
    Last Post: - 8th May 2009, 03:32
  2. Output current to a DC motor
    By bigbanner in forum General
    Replies: 1
    Last Post: - 6th April 2009, 07:29
  3. Unwanted output signal jitter
    By LinkMTech in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th January 2008, 02:31
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts