Developing a VERY simple DSP system for guitar

Started by dougman0988, December 27, 2010, 10:11:30 PM

Previous topic - Next topic

dougman0988

Hi all!  So, as the title says, I'm starting completely from scratch and beginning the difficult journey of creating my own DSP system for guitar.  The main point here is for me to learn as much as possible, though it'd be nice to have a working system to show off when it's all said and done.  Even a harsh-sounding digitally-generated distortion would be an accomplishment just for the fact that I can do it.  But hopefully it'll turn out better than that.

Here's a schematic of my system right now...(the preamp hasn't been built or tested yet).



Against all odds, so far everything looks good.  The only issue I have from time to time is the output of the DAC being kind of noisy.  It's steady most of the time but every so often it'll dip down by up to a whole volt.  I'm programming using a PicKit 2, and the DAC output was always steady when using that power from the USB.  I thought using the 7805 would only help, not make things worse  :(  Anyway, I know that layout has a lot to do with noise...so maybe it's just the placement of the parts on my breadboard.

Getting to my main question, I know that a compandor such as the NE570 can also help reduce noise on the output.  The problem is that I've never used this kind of chip before, and quite frankly just about every app note and example circuit I've seen is unique.  Anyone have a good suggestion for how to go about choosing the right design for this system?

Aside from that question, are there any suggestions for any other part of the system so far or in the future?  Anyone built something similar to this before?  I'm all ears and I'm completely open if anyone wants to tell me that this system won't work well.  I'm already planning on using a dsPIC for better performance, I just wanted to start with a PIC that I'm familiar with.

Thanks!
www.pickuptheguitar.com
Guitar lessons, music theory, audio projects

zeptin

Well, I'm not an expert at this sort of thing by any means, but I am in the process of building something very similar to what you have there, so I have a few comments.

Firstly, it's on a breadboard, so don't have too big an expectation of noiselessness ;D That said, there is the whole issue of power supply decoupling when you mix digital and analog circuitry. Since digital ICs usually have a large number of on/off transients happening all the time internally, the power rails can bounce around a bit unless you put an appropriately sized (~100nF is the usual) ceramic capacitor across the power pins of an IC to provide it with the sudden spikes of power it may require. If you have a large amount of ICs (not really applicable in your case, but anyway) you often put 'reservoir' capacitors (typically reasonably large electrolytic/tantalum caps) that supply the current demands of groups of the ICs at a time (above and beyond the ability of the 100nF caps).

You can take the amount of decoupling to any extreme you want. To do mixed analogue and digital circuits 'correctly' you should keep their power rails as separate as possible, connecting them only at one point. This avoids getting the digital hash cluttering up your analogue sections. On a slightly unrelated note, the 0.1uF cap across the output of the regulator could be a bit bigger, although the 9V coming into the regulator is probably already regulated, so maybe you needn't bother. It can't hurt to try it though. I'm not completely sure what could be causing the dips in voltages that you reported. Are you watching the DAC output on a scope?

I'm having a bit of trouble reading the value of that resistor near the 0.1uF cap in series with the Gtr In though, is it 825R or 825K, and what exactly is its purpose? :-/ Anyway, a preamp may not even be necessary for the circuit depending on how strong the output of your guitar's pickups is. A buffer is a good (actually, almost essential) idea though, and easy to connect up using an opamp.

Of course, the whole endeavor rests on you programming the PIC correctly :icon_mrgreen: How much experience have you had with them? There are lots of gotchas that can trip up the unwary! Fortunately the 690 doesn't look like it has a low voltage programming pin, so there's one major source of potential frustration out of the way. Maybe someday you could try using a dsPIC to get more processing power for less board real estate? Those are a whole new kettle of fish though :icon_confused:

I'm afraid I don't know enough about using compandors for noise reduction to be able to help you much in that regard. In my opinion if you do the rest of the circuit sensibly then noise shouldn't be too much of an issue.

Hope this helps, I really think you'll see the biggest improvement by putting it on a pcb in a decent metal enclosure though :)

dougman0988

Thanks for the reply zeptin  :D

I haven't been able to fiddle with it since my first post, but your reply gives me some other things to try.  I'll use caps across the power rails of each IC (as you can see I don't have any right now   :P) and make sure the analog and digital supplies/grounds are connected at one point.

The resistor you pointed out is 820k, as far as I know this is just a large value connected from the input to virtual ground which helps to eliminate the "popping" sound you often get when using a footswitch.  I may or may not be using a footswitch but I figure putting the resistor in there can't hurt anyway.

I'll definitely switch to using a dsPIC once everything seems to work with the PIC16F690.  DSP software libraries and higher MIPS should help  ;D  But so far I'm doing okay with the programming side.  I haven't used a dsPIC though so we'll see how that goes when I get there.  I don't think MikroC is compatible so I'll have to use Mplab instead.

I'll have to look more into the compandor issue.  I think you're right to say that its not really required to use one as long as the amount of noise is kept under control.

Thanks again and I'll try to post updates as they occur.
www.pickuptheguitar.com
Guitar lessons, music theory, audio projects