PIC LFO - Update

Started by Benny, March 23, 2004, 12:31:42 AM

Previous topic - Next topic

Benny

A few weeks ago I posted about using a PIC to generate a LFO waveform for a phaser.  I've had a chance to play around with it for a while and it's working pretty well, here's what I have so far.

The phaser network I'm using is John Hollis' Easyvibe, with his suggested Small Stone mods (.01uF caps and feedback.)  I use VTL5C3's for the LED/LDR pair.  I programmed the PIC to generate a pulse-width modulated sine wave from a 64-entry lookup table.  This pulse train gets low-pass filtered and buffered, and then drives the LED's.  I also set up an analog input as a speed control, it reads the level of a pot configured as a voltage divider and sets the speed accordingly.  The resulting LFO has a range of about 0.25Hz to 20Hz.

It sounds about like I expected... pretty much your standard phaser.  It passes the 'Barracuda' test anyway.  :)  The only thing I'm not happy with is that I think there is some slight carrier frequency bleed-through into the signal.  The LFO low-pass filter is just a simple RC filter with a 3dB cutoff around 8Hz, but the carrier frequency is only around 500Hz and I still think I can hear it.  Of course the noise could be coupling in from anywhere, it's just on a breadboard... anyway if anyone could suggest an appropriate alternative filter I'll give that a try.

Any comments or questions about implementation, let me know!

Benny

Peter Snowberg

Very cool Benny! 8)

I have a DLFO in the works too, but I'm not going the PWM route, partially because of the very issue you're looking at right now, but probably for the most part out of some weird unfounded bias. ;)

I would suggest using as much shielding as you can and using filtering on all the connections to the PIC (esp. power & ground). With a corner frequency of 8Hz and a carrier of 500Hz you should have really good rejection and I wouldn't be surprised at all if the coupling was from somewhere other than the actual output pin. If you are getting bleed from the PWM output, you could always reconfigure your buffer stage as a 2nd order filter.

In any case... everything should be much cleaner when you move it to a PCB.

Best of luck with it!

Every "my LFO clicks" thread makes me think more and more that this is the way to go. 8)

Take care,
-Peter
Eschew paradigm obfuscation

Benny

Thanks for the reply Peter!

You are probably right about the carrier frequency noise coupling in from somewhere other than the optics.  I SPICE'd the design and the sine wave out of the filter looked pretty good, and I would expect the slow response time of the LED/LDR's to further smooth it out.  I wasn't very careful about the layout, and breadboards are notoriously noisy... well it's barely noticeable anyway, maybe I'll shuffle things around and see if it helps.

The other problem I have is power consumption, at 20mA it's a pretty hungry beast.  I'd have to get that down a lot to be a suitable replacement LFO in battery-powered circuits.

Looks like your bias against PWM isn't unfounded after all! :)   You must be using D/A converters instead?  Can't wait to see the results of your LFO project, it looks pretty cool!

Benny