Help with using logic (4066, 4013, etc) to switch Modes or Presets

Started by loss1234, November 14, 2009, 11:02:53 AM

Previous topic - Next topic

loss1234

I am trying to find old schematics to learn from, or articles, that explain how to use pushbuttons, counters, flip flops, and switches, to
allow a handful of pots and a few switches to SWITCH through different modes or presets on a stompbox.

So lets say you want to have three different filter choices, (lp/hp or BP) and you only want to have three knobs on the box.

(gain, Q and cutoff)

I would like to be able (in this hypothetical situation) to have a push button that you push ONCE for LP, again to use BP and again to use HP.

the knobs would do the same thing in each mode.

Eventually, I would love to go beyond this and maybe have more modes ,etc


BUT I have no idea how to start

Any advice or links, articles, etc or hints on OLD synths or boxes that use these type of setup would be much appreciated!

thanks

R.G.

You could read geofex. The articles on programmable switching setups there use a lot of CMOS logic for selection and are good illlustrations of how to do it.

In particular, the radio-button selector made from a 74C373 chip lets you select one and only one of up to eight choices with a single switch press.

Beyond that, if you are interested in this, you really need to not try to glean your information from postings on forums. The better way to learn this is with "The CMOS Cookbook" by Don Lancaster. It's practically a logic education in a single book, both for formal learning of digital logic and the practical aspects.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

loss1234

thanks

i Have read the article you mention and also own all of lancasters logic books as well as the Cmos handbook and quite a few other digital logic books but I was really trying to find information, inspiration, etc or even old schemeatics of HOW people did this practically in boxes or in synths.

(without a uprocessor)

it is one thing to understand the switch chips (which i do) but quite another to make the leap to designing a multi mode, soft button system that changes all the paramters you could ever want with just LEDS to indicate which position you are in.

I really think that Boss acoustic simulator schematic is in the ballpark, but starting at it, i get confused as to how the switch is throwing the logics on A and B of the 4052 into the right modes.

thanks so much!

R.G.

Sorry if I shot too low. I couldn't tell what your level of experience with logic is.

There's a quasi-rule in designing slow logic. If it takes more than three discrete logic chips, a microcontroller is probably easier, faster, and cheaper.

But putting controllers aside, you may be overthinking it. I would partition the problem like this: first, be very clear what controls you want to change the settings of, and are these settings discrete, or continuous? For instance, do you want two or three (or eight!) tone settings or must you have a large number of steps approaching analog control of tone? Do you want to switch effects in/out by bypassing, or will you require switching into all possible orders and all combinations of series/parallel? I'm obviously making things up to illustrate the point. Only once you know exactly what you have to accomplish can you design the logic to do it.

The thing about logic is that all signals are ultimately one of four things: (1) logic high (2) logic low (3) open circuit (4) the sum of many signals.
In your example:
Quote from: loss1234 on November 14, 2009, 11:02:53 AM
So lets say you want to have three different filter choices, (lp/hp or BP) and you only want to have three knobs on the box.
(gain, Q and cutoff)
I would like to be able (in this hypothetical situation) to have a push button that you push ONCE for LP, again to use BP and again to use HP.
the knobs would do the same thing in each mode.
I apologize again if I'm telling you things you already know, but here's my take on that.
First, you have to have analog circuits that do those functions. This can be three separate filters, each with a gain,Q, and cutoff knob, but with all those knobs being on a triple-ganged pot, so that the knobs do the same thing in the analog region. Or you can have a single filter like the state variable filter, where those functions are all inherent in the same filter, so you only need one-gang knobs.

It's only after you have some idea what analog circuits do what you need that you can hop over into the digital world and introduce the logic. For this setup, I would use a one-of-three or one-of-four CMOS analog selector and either select the output of one of the three filters, or the right one of the outputs of the state variable.

Finally, once I had made it possible to do what I needed in the analog sense, I'd go design the logic to turn those selector switches on and off. That's a completely different problem, because the filters don't know they're being selected by logic, the selector switches don't care what tells them to switch, and they can only respond to "pick #2" or "pick #1" orders in the form of binary logic levels. How you generate those binary logic levels to control the selector switches is up to you.

You could make it a one-of-three like the selector at GEO. You could make it a rotary switch: press once to go to the next position in the order  1-2-3-1-2-3... and so on. This last is easy enough to do with a counter chip with decoded outputs. The CD4017 and CD4022 do this as their natural function, given that you manipulate the counting chain by tying the N+1 output to the reset line where you only want an N state counter. You could make it completely random with a pseudorandom generator (GEO again) or one-for-one with the input switches, allowing multliple outputs active at a time.

As you say,
Quoteit is one thing to understand the switch chips (which i do) but quite another to make the leap to designing a multi mode, soft button system that changes all the paramters you could ever want with just LEDS to indicate which position you are in.
And you are correct. The first thing you have to be able to do is to write down, in excruciating detail *exactly* what you want each mode, each soft button, each change, each LED to do under all conditions, including at power up when everything may come up in a random state and when the user presses the buttons in some unforseen and possibly malicious way. It is a leap.

The leap is one of design. It's possible to design even discrete logic setups to produce completely arbitrary outputs, and even make that dependent on the previous history of conditions. Getting the logic chips to produce the right patterns to the switches, selectors, and other controls is the easy part. Defining exactly what you want the thing to do under all possible button-pushes is not easy. The industry calls this system design, the process of defining how you want something to act, separated entirely from the nuts and bolts of how that actually happens. And you're right - understanding the switch chips does not help, other than if you're aware of what exists in a single chip, you will be able to see how to do what you want more easily. Writing down exactly what a switching system does under all possible conditions of inputs is pretty close to programming.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.