Author Topic: Project: PIC-based LFO Tremolo  (Read 21810 times)

.Mike

Project: PIC-based LFO Tremolo
« on: June 28, 2009, 05:28:58 AM »
I didn't know what forum to put this in, so please move it if there is a more appropriate place. Here goes...

Alright, so, here is the first project I've ever "designed." I didn't really design anything, but merged two designs, info gathered from datasheets, and what I've learned around here... heh. I took the audio section of the Tremulus Lune, and merged it with a microprocessor-based LFO that is normally used for synthesizers. I've given it the uninspired name of the PICulus Trem.



Here are the main features:
  • - 5 Knobs
    • Gain - Increase or reduce the volume, useful when using some of the extreme LFO options.
    • Speed - Ranges from 12.8Hz (in theory, but good luck with that) to 0.05Hz (20 seconds, in practice).
    • Waveform - Select from seven different LFO waveforms: Ramp Up, Ramp Down, Square, Triangle, Sine, Sweep, Spike. See image at top of page here.
    • Depth - Modify the depth of the effect.
    • Wave Distort - Hard to explain. Bends the shape of the wave from "more on" to "more off." See image under "Waveform Distortion" here. This is a really cool feature.
  • - Indicator LED that pulses with the LFO.
  • - Basic reverse-polarity protection and power-supply filtering.
  • - Runs from 9V up to, I believe, 30V, provided you use properly-rated capacitors for the power sections.

As laid out, it should fit into a BB box in landscape orientation. Since the pots are mounted on the board, the knobs would be on the top of the enclosure, but I believe you could use right-angle pots and have the knobs on the face.

I'm still a relative beginner, so there were a lot of firsts for me in this project: First time drawing a schematic, first time designing/etching/drilling/filling a PCB, first time using a PIC, first time using an LED/LDR combo, and probably a few more. There were some errors in the design when I first built it, and I fixed them during the debugging process. They have been corrected in all of the project files, so my images will be slightly different than how it would look if you built your own version of this. I've also renumbered a few of the resistors.

Here are some photos.

Here is my blank board:



Here is the finished board:



For the LED/LDR combo, I used the cheapest, lowest-value Futurlec photocell (#PHOTOCELL1) and a diffused red LED from Mouser (# 593-VAOL-5LAE2), but I've spaced the board so that a Vactrol should fit. I put the LED in one end of a piece of a straw and the LDR in the other, and used two layers of heatshrink to hold them together and block out light. I packed the ends with black foam and a drop of clear nailpolish to fully seal them.

Even though the photocells are supposed to have an ON resistance of 5K-ohms, I found that all of mine measured under 200R when the LED was running at 20mA. This is good, because turning on two LEDs at 20mA each was causing a huge audible pop. I ended up reducing the current way down to under 2mA, and I still get an ON resistance of about 500R. This allowed me to use a 1K pot for the gain, and get a mild boost when the pot is maxed out.

If you build your own, you will probably have to experiment with the LED resistors and gain pot in order to come up with the best match for your particular LDR/LED combo. I recommend keeping the LED current as low as possible to avoid clicking in the audio.

The LFO is controlled by a microprocessor, so you will have to write the HEX code, available at the site referenced above, to the chip. There are a lot of resources on how to do this online. Truth be told, I had a friend make one for me, so I'm not going to be much help.

You might notice that the LFO is capable of producing a Noise waveform. I thought it would act like a random waveform. Unfortunately, it doesn't work that way, so I have eliminated that waveshape.


Here is noise fed through each wave shape.



Here is what the Wave Distort knob does to a couple of the LFOs.



Here are some audio samples. Ibanez GAX-70 -> Modified Valve Junior -> Isobox w/ 12" speaker, SM57-equivalent -> Yamaha Mixer -> M-Audio Delta 66. Sorry that it's a bit out of tune... my Strat is just too noisy for demo-ing (it was the noise source for the tests above!). I haven't touched this guitar in over a year. I tuned it, but it went out of tune faster than I could record the demos.

Cycling through each waveform. Bypass -> Ramp Up -> Ramp Down -> Square -> Triangle -> Sine -> Sweep -> Spike: Link

Sine wave, maximum speed to minimum speed: Link

Wave Distort demo, Square wave, Full counter-clockwise to full clockwise: Link

Here is the zip file that contains all of my project files, ready to go: Link

And finally, thanks to Tom Wiltshire from ElectricDruid.net for the VCLFO and for his help with a bug I couldn't figure out. And of course, thanks to everyone here for all of the shared knowledge.

So there you have it. Questions? Comments? Suggestions?

:)

Mike
« Last Edit: June 28, 2009, 05:31:18 AM by .Mike »
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

frequencycentral

  • Awesome!
  • ****
  • Posts: 4964
  • Total likes: 130
  • Virtue signalling keyboard warrior since 2020.
    • frequencycentral
Re: Project: PIC-based LFO Tremolo
« Reply #1 on: June 28, 2009, 05:44:33 AM »
Hey Mike, that's a very well thought out project, and quite a major accomplishment. PIC is beyond my skill right now, but that LFO looks and sounds so sexy.............I can think of lots of uses for it as well as tremolo. I see the main challenge with PIC as the programming (not having a clue myself), so how do us mortals program one of those things? Well done, you should be suitably proud of yourself. This be in the main forum though, to get the coverage it deserves
http://www.frequencycentral.co.uk/

Questo Ŕ il fiore del partigiano morto per la libertÓ!

.Mike

Re: Project: PIC-based LFO Tremolo
« Reply #2 on: June 28, 2009, 05:49:16 AM »
Hey Mike, that's a very well thought out project, and quite a major accomplishment. PIC is beyond my skill right now, but that LFO looks and sounds so sexy.............I can think of lots of uses for it as well as tremolo. I see the main challenge with PIC as the programming (not having a clue myself), so how do us mortals program on of those things? Well done, you should be suitably proud of yourself. This be in the main forum though, to get the coverage it deserves

Heh... Thanks, Rick.

I did absolutely zero programming, honest. Tom provides the HEX code at his site, and apparently all you need is a programmer (hardware) and a compiler (software). There are even DIY projects for the programmer out there that look pretty simple.

I might have told you this already in a PM, but I hooked the LFO up to a Rebote 2.5., and it worked great. I plan on putting together a 4-knob LFO-only board based on this. It should be pretty simple.

:)

Mike
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

timotet

Re: Project: PIC-based LFO Tremolo
« Reply #3 on: June 28, 2009, 02:03:23 PM »
great job
awesome layout!! :)

ElectricDruid

Re: Project: PIC-based LFO Tremolo
« Reply #4 on: June 28, 2009, 02:16:51 PM »
Hi Mike,

Glad to see you got it all finished off. The final board looks great. I think you might have started something good here with simple DIY PIC-based effects.

I'd better get my backside in gear and finish off the tap-tempo PIC LFO I was developing (http://www.diystompboxes.com/smfforum/index.php?topic=76436.0) as I can see that folks here have plenty of ideas for this sort of stuff.

Regards,
Tom

frequencycentral

  • Awesome!
  • ****
  • Posts: 4964
  • Total likes: 130
  • Virtue signalling keyboard warrior since 2020.
    • frequencycentral
Re: Project: PIC-based LFO Tremolo
« Reply #5 on: June 28, 2009, 02:34:06 PM »
Hi Mike,

Glad to see you got it all finished off. The final board looks great. I think you might have started something good here with simple DIY PIC-based effects.

I'd better get my backside in gear and finish off the tap-tempo PIC LFO I was developing (http://www.diystompboxes.com/smfforum/index.php?topic=76436.0) as I can see that folks here have plenty of ideas for this sort of stuff.

Regards,
Tom

Yes, very inspiring work. I'd certainly be interested in a pre-programmed PIC chip LFO or two. Very cool stuff Tom.
http://www.frequencycentral.co.uk/

Questo Ŕ il fiore del partigiano morto per la libertÓ!

.Mike

Re: Project: PIC-based LFO Tremolo
« Reply #6 on: June 29, 2009, 02:18:29 AM »
Thanks again for all the help, Tom. Emailing you was on my list of things to do!

I really think the barrier into getting into a project like this is putting the code on the chip. I had a friend make mine, and probably would have bought one if I could have. Otherwise, I probably would have never tried this, especially as a relative newbie.

It would be much easier to spend $10 on a ready-made chip than $50 on a programmer. Now that I have done one project, though, I definitely plan on buying/building a programmer and having some fun with PICs.

By the way, to anyone building this, R11 should be 1.8K, not 1K.  8)

Mike
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

JKowalski

Re: Project: PIC-based LFO Tremolo
« Reply #7 on: June 29, 2009, 03:02:22 AM »
Hi Mike,

Glad to see you got it all finished off. The final board looks great. I think you might have started something good here with simple DIY PIC-based effects.

I'd better get my backside in gear and finish off the tap-tempo PIC LFO I was developing (http://www.diystompboxes.com/smfforum/index.php?topic=76436.0) as I can see that folks here have plenty of ideas for this sort of stuff.

Regards,
Tom

Yes, very inspiring work. I'd certainly be interested in a pre-programmed PIC chip LFO or two. Very cool stuff Tom.


If you ever spent the time to get this off the ground, you could seriously make alot of money with this. I'd be willing to pay up to $10 for one pre-programmed, seeing as the part itself costs a mere $1.40 on bulk on mouser. Although I would buy many more if they were around $7, which I think is very reasonable. That's still a 500% profit, for not much work at all, provided you have a interface and a code set up for transferring!

Auke Haarsma

Re: Project: PIC-based LFO Tremolo
« Reply #8 on: June 29, 2009, 12:12:45 PM »
Sounds nice! Thanks for sharing!

soggybag

Re: Project: PIC-based LFO Tremolo
« Reply #9 on: June 29, 2009, 01:19:31 PM »
I'm impressed good work. I had been working on a Micro Controller project myself a few months back. But this far beyond what I was working on.

fNNR

Re: Project: PIC-based LFO Tremolo
« Reply #10 on: June 29, 2009, 04:51:30 PM »
I'm loving the square wave/wave distortion sounds. Great job, thanks for all the links!

I've programmed quite a few PICs, but never in the field of audio (mostly robotics). This looks like a great starting point for me to start using PICs with audio.

Awesome
I want my rockstars dead!

.Mike

Re: Project: PIC-based LFO Tremolo
« Reply #11 on: June 29, 2009, 08:38:29 PM »
I've recorded a longer demo of various settings to show the flexibility of this thing. I'm using my shielded-but-noisy strat, and the board is connected to my unshielded breadboard for the input/output/power. I'm in a very noisy environment, surrounded by a TV, studio monitors, two LCD displays, my amp, a whole rack of gear, and... ermm... a coffee warmer.

The clip is noisy, but not from the tremolo. My strat has a bigger buzz than a high schooler at his first kegger.

I added some reverb using an aux channel on my mixer, since my isobox sounds, well, like a box. Pardon the sloppy playing. Hopefully you'll get the idea how flexible this effect really is: Link

:)

Mike
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

cloudscapes

Re: Project: PIC-based LFO Tremolo
« Reply #12 on: June 29, 2009, 09:31:03 PM »
thats really really cool!
I build a trem with a microcontroller shaper semi recently as well
nice to see more people doing it! wave distort looks really useful
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

Processaurus

Re: Project: PIC-based LFO Tremolo
« Reply #13 on: June 30, 2009, 07:10:41 AM »
Quote
I'm still a relative beginner

Programming pics, designing & debugging analog circuitry, board mounted pots, silk screened PCB, maybe a beginner relative to like, Sir Robert Moog?  Thanks for sharing your project, very inspirational.

Bunyaman

Re: Project: PIC-based LFO Tremolo
« Reply #14 on: March 03, 2012, 02:45:32 PM »
Men, can I take only tap-tempo part from this schematics http://www.guitar-gear.ru/forum/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id=17150(resistor r9 and button to pin 4 of PIC) ? and I didn`t want to use multiplier pot.

ElectricDruid

Re: Project: PIC-based LFO Tremolo
« Reply #15 on: March 04, 2012, 11:44:23 AM »
Men, can I take only tap-tempo part from this schematics http://www.guitar-gear.ru/forum/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id=17150(resistor r9 and button to pin 4 of PIC) ? and I didn`t want to use multiplier pot.

That schematic is the one that Mike developed above and that I put in my Tap Tempo LFO datasheet:

http://www.electricdruid.net/index.php?page=projects.taplfo

If you don't need the Multiplier knob, just connect the input to +5V with 10K. That sets it to a permanent "x1" multiplier.

HTH,
Tom

Bunyaman

Re: Project: PIC-based LFO Tremolo
« Reply #16 on: June 05, 2012, 08:25:12 AM »
I`ve done this device and added tap tempo part from this schematics 
http://www.electricdruid.com/images/lfo/TapTremolo.gif

I used SPDT button and I have the problem. Tap is response by pressing not every time, but on first, third fifth pressing.

http://www.youtube.com/watch?v=RZIJ6qlh8lE&feature=player_embedded

What's the problem?

.Mike

Re: Project: PIC-based LFO Tremolo
« Reply #17 on: June 05, 2012, 09:09:40 AM »
I used SPDT button and I have the problem. Tap is response by pressing not every time, but on first, third fifth pressing.

What's the problem?

The switch needs to be momentary, not latching. :)
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

Bunyaman

Re: Project: PIC-based LFO Tremolo
« Reply #18 on: June 05, 2012, 09:18:25 AM »
It`s not lathing! I checked it....

ElectricDruid

Re: Project: PIC-based LFO Tremolo
« Reply #19 on: June 11, 2012, 10:10:38 AM »
If the chip is working correctly, it should measure the time between the first and second taps. If you keep tapping, it'll measure the time between the first and second taps, then between the third and fourth taps, then between fifth and sixth, etc etc.

On the first tap of each pair, the waveform is reset to the start point - the top of the waveform for most shapes. If that's what you're seeing on the first, third, and fifth taps then that's entirely normal and correct.

HTH,
Tom