News:

SMF for DIYStompboxes.com!

Main Menu

PIC based sequencer

Started by potul, February 19, 2010, 05:39:30 PM

Previous topic - Next topic

potul

Hi All,

There is a project I have in mind since a long time ago, and this week I've started to work on the design. The idea is to have a sequencer similar to the seek-trem or seek-wah (or Vanishing point), but use a PIC for the digital part of the circuit. This would allow me to add some features:

-More steps. The idea is not to have individual pots per step, but do that via software. One single knob do adjust level and a couple of buttons to move from one step to the other. It will require some type of display, though (probably an LCD).
-Store presets
-Tap tempo

For the digital part (the sequencer itself), I'm planning to take some ideas from electric druid's tap tempo LFO and modify it to my needs as a sequencer. So the output will be PWM based. This part I have it more or less clear how I want it to be.

Where I do have my doubts is in the analog part, and the interface between them. I want to have both tremolo and wah, so I need an as simple as possible VCF and VCA. I was thinking on using the VCF/VCA part of the Gristleizer, which looks quite simple and does both things, but the FET as  variable resistor scares me a little. I need to drive it with negative bias, so I would need to figure it out how to do that, as the PWM signal from the PIC will be positive (and I would prefer not to have dual polarity supply). And, usually FETs are quite picky, and complex to setup properly.

What do you think? Would it be better to forget about FETs and try a VACTROL based design instead? If yes, any proposal of circuit for it?
By the way, If I use vactrols (or DIY optocouplers), can I get rid of the lowpass filter after PWM, or should I keep it? (I'm not sure if the slow response of the LDR/LED will be enough to filter out the PWM frequency)

Regards,

Potul




JKowalski

How about an OTA? You still have to raise the filtered PWM output about a diode drop above ground for the OTA, but otherwise it's pretty straightforward. What I would do is put the PWM into an inverter to get a 0-9V PWM, attenuate it a tad, then filter it.

If this was my project, I would give it:

Adjustable number of steps
Same one-knob sequence level control with buttons
Memory Preset system
Tap tempo
Adjustable averaging (to smooth out the sequencer)

3080


Processaurus

A PWM'd resistor would be the best way of controlling a wide variety of existing analog circuits.  You could drive a 4053 SPDT analog switch right from the processor and be done, as well as having two others if you needed them in the same package.  There would be no matching (FET's), variation (vactrols), or noise (OTA's).  The only hitch is it would need to be at least 40kHz, to be able to filter out the stairstep artifacts from the switching.

Slewing between steps would be a great feature, and much easier with a digital implementation.

JKowalski

Quote from: Processaurus on February 20, 2010, 06:28:55 PM
A PWM'd resistor would be the best way of controlling a wide variety of existing analog circuits.  You could drive a 4053 SPDT analog switch right from the processor and be done, as well as having two others if you needed them in the same package.  There would be no matching (FET's), variation (vactrols), or noise (OTA's).  The only hitch is it would need to be at least 40kHz, to be able to filter out the stairstep artifacts from the switching.

Slewing between steps would be a great feature, and much easier with a digital implementation.

Thats a good choice actually, you won't necessarily need the 10 bit resolution like the TAPLFO has so you can run the PWM at a higher frequency.

Processaurus

Quote from: JKowalski on February 20, 2010, 09:13:52 PM
Quote from: Processaurus on February 20, 2010, 06:28:55 PM
A PWM'd resistor would be the best way of controlling a wide variety of existing analog circuits.  You could drive a 4053 SPDT analog switch right from the processor and be done, as well as having two others if you needed them in the same package.  There would be no matching (FET's), variation (vactrols), or noise (OTA's).  The only hitch is it would need to be at least 40kHz, to be able to filter out the stairstep artifacts from the switching.

Slewing between steps would be a great feature, and much easier with a digital implementation.

Thats a good choice actually, you won't necessarily need the 10 bit resolution like the TAPLFO has so you can run the PWM at a higher frequency.

Totally! Plus you can make a virtual pot out of it, as well as fan out the PWM signal to a bunch of stages, to make multiple variable resistances easily and cheaply (like for making a phaser with a bunch of stages).

RonaldB

I had this type off sequencer done in the Arduino platform.
I had one pot that controlled the depth off each step. With a button I could scroll through all the steps and adjust there depth.

One feature that will be great would be: A Trigger or Sync. So ass you play a chord or note the sequencer will go back to the first step.

good luck on this one,
Ronald

potul

Quote from: Processaurus on February 20, 2010, 06:28:55 PM
A PWM'd resistor would be the best way of controlling a wide variety of existing analog circuits.  You could drive a 4053 SPDT analog switch right from the processor and be done, as well as having two others if you needed them in the same package.  There would be no matching (FET's), variation (vactrols), or noise (OTA's).  The only hitch is it would need to be at least 40kHz, to be able to filter out the stairstep artifacts from the switching.

Slewing between steps would be a great feature, and much easier with a digital implementation.

Fist of all, thanks for all the good ideas and sorry for the delay in answering,... I was crossing the Atlantic this weekend, back to Europe...
PWM's resistor was my first choice, and what I had in mind since the beginning. (But then I saw the Gristleizer and at a first glance I thought it would be a simple circuit.). I have a couple of 4066 lying around, so I will give it a try.

I've never used OTA's so I prefer not to go into it right now. I understand from all your messages, that FET is usually a bad idea :P, so I will focus on PWM resistor or Vactrols. 40khz PWM should be feasible if I use only 8 bits resolution (which I think is more than enough). In addition, I might be able to use the unused switches to control other things (bypass of maybe switching effects).  Slewing between steps was also something I had in mind. This combined with a big amount of steps would allow virtually any kind of LFO shape (kind of "interpolated" though).
I agree with all of you regarding the interface, the idea is to have a single pot to configure the level of the steps, and then a couple of buttons to change from one to the other. I might add another pot maybe to control manually the speed and/or the overall depth. I will decide while programming :)

I'll first setup the PIC sequencer, and once I have the PWM output working I will try to breadboard different options and see which one works best.

Thanks for the suggestions, I will keep you updated on the progress of the project.

Regards,

Potul

potul

Quote from: RonaldB on February 22, 2010, 01:49:00 AM
One feature that will be great would be: A Trigger or Sync. So ass you play a chord or note the sequencer will go back to the first step.

good luck on this one,
Ronald

do you mean a kind of envelope detector? So that at each attack the sequencer resets? I will study it... it could be feasible.


RonaldB

Yes something like that. Electric Druid had that feature on his VCLFO to, look it up.


ElectricDruid

I'm a bit doubtful about using the PWM to drive a CMOS switch to produce a variable resistor. You'd have to look into it, but it was my understanding that you need the PWM frequency up around 50-100KHz to get decent audio quality. Still, you'd get 7 or 8 bits of resolution on the PIC, so maybe it'd work.

As to the actual question about VCA/VCFs, vactrols would make your life easy, since they remove the need to filter the PWM to get a smoothed control voltage. If you were to filter the PWM, I'd recommend the LM13700 transconductance op-amp for a VCF. I've built various great wahs with it. The first one was based on the Maplin Autowaa project from waybackwhen. You could use another chip the same for a dual VCA, and have tremolo or stereo panning too.
If you're looking for vactrol filters, you could do worse than dig through a bit of synth history and find the 'resonator' section from the Korg PS series synths. This was basically three vactrol-based bandpass filters in parallel. One filter would do for your application.

The whole "PIC-based sequencer-driven effects" thing sounds like a really great idea. Good luck with it.

Hope this helps,
Regards,
Tom

potul

Thanks for the feedback. I have this project sleeping by now until I finish a couple of analog things, but I will go back to it as soon as I have free time.
I think that for a sequencer, 7 bits is more than enough, as I don't need a smooth transition between steps, so at a first glance it looks like doable even with cmos switches. As I have some of them lying aroung, and the programming (the though part) will be the same anyway, I will give them a try in the breadboard. If it doesn't sound good, I'll try vactrols.

Thanks for the inputs

Potul




G. Hoffman

Quote from: ElectricDruid on April 12, 2010, 01:48:00 PM
I'm a bit doubtful about using the PWM to drive a CMOS switch to produce a variable resistor. You'd have to look into it, but it was my understanding that you need the PWM frequency up around 50-100KHz to get decent audio quality. Still, you'd get 7 or 8 bits of resolution on the PIC, so maybe it'd work.

As to the actual question about VCA/VCFs, vactrols would make your life easy, since they remove the need to filter the PWM to get a smoothed control voltage. If you were to filter the PWM, I'd recommend the LM13700 transconductance op-amp for a VCF. I've built various great wahs with it. The first one was based on the Maplin Autowaa project from waybackwhen. You could use another chip the same for a dual VCA, and have tremolo or stereo panning too.
If you're looking for vactrol filters, you could do worse than dig through a bit of synth history and find the 'resonator' section from the Korg PS series synths. This was basically three vactrol-based bandpass filters in parallel. One filter would do for your application.

The whole "PIC-based sequencer-driven effects" thing sounds like a really great idea. Good luck with it.

Hope this helps,
Regards,
Tom


I'm doing it with a TapLFO's clock output to drive a 4017.  It is a simple step thing - it's not going to give you anything but a square wave, nothing subtle - but that's fine for my purposes.  All I'm getting from the TapLFO is the tap tempo, really, but that's what I wanted it for, so....


Gabriel

ElectricDruid

Just coming back here to say that I've changed my mind. If you reduce the PWM resolution to 8-bits like someone suggested earlier, you can get the PWM frequency up to 78KHz or so, which is going to be enough I'd have thought. The problem might be interfacing between the 0-5V output of the PIC and the 0-9V 4066 CMOS. Anyway, it's worth a shot, which is not what I said earlier.

potul

wow... it took you 2 year to change your mind .... :D

To be honest I never finished this project.... Well, in fact, I have multiple projects laying in the bench unfinished. Too many things in my plate, and I've decided lately to dedicate more time to guitar playing and less to electronics. :)

Did you try this approach yourself in any project?

ElectricDruid

Hey, I'm never one to rush to judgement, but if I discover I'm wrong, I'd like to think I'll admit it. Even if it takes a while!

And yeah, I've played with a PWM phaser design using the PIC as the PWM LFO. Not exactly an original idea, but it's still a good 'un. The 4066 actually seems to switch using the raw +5V PWM signal, but I'm still not sure that I might not be better adding some interface between the two. I suspect it might switch on *more* or give me a sharper edge. The "PWM" gets a bit blurred currently. Definitely a work in progress rather than one to shout about.

T.