ASMOP - A Simple Matter of Programming

Copyright 2001 R.G. Keen. All rights reserved. No permission for local copies or presentation through any web page except http://www.geofex.com.


There are some things that are really, really complicated to do with analog circuits that just fall into place with digital circuits. I ran into this truism when pursuing my effects morpher - a multi channel effects box that fades between multiple channels of effects loops at a rate that is adjustable, with selectable transition times, rates, manual and auto transitions, and much more. It's easy to fade an analog signal up and down; even the simplest tremolos do this. But making the speed of the transition and the dwell time on a channel adjustable gets hairy in analog. Putting indicator LEDs in for each channel adds some more analog mess. Having it be either auto or manual, sequential or random, and a few more options puts it in the analog synth realm - acres of circuit board and patch panels.

Enter the dragon...er, I mean digital assistant.

Digital microcontrollers are available that (a) cheap; some cost as little as US$1.50 each, a really capable one is US$3.00 (b) are programmable at home with minimal equipment (c) have analog voltage output capability, either through pulse width modulation or D-A converters (d) have analog input capability either programmable or built right in (e) have nonvolatile memories on chip to remember settings (f) are capable of the complicated switching that is their birthright (g) are FAST.

The most natural choice in this realm is the Microchips Technology Inc. PIC series. These are available in 8 pin to 40 pin packages with various mixes of internal features. At this time the best choices for effects controllers are probably the 16F872 and 16F627. These cost US$2.00 to US$4.00 in ones (!) and are flash programmable - and re-programmable. That's right. Program it, try it. If it doesn't work, wipe it and try again.

I have this personal problem; when I find a technology, my head fairly dances with applications. This article is a mere introduction, just the things that I've come up with so far.

So why "a simple matter of programming"? Those of you who work in the programming trades will recognize it. This is the computer equivalent of what Bach wryly commented upon seeing a new, very fancy organ he had been hired to test out. "What an amazing instrument! All you have to do is press the right keys at the right times and the music plays itself!". The hardware design of these things is very, very easy. The programming may be a little challenging. I'm still learning PIC programming, so the catch to this series is that there is no programming - yet. There is enough here that those of you who are already good at microcontrollers will not have much difficulty in making this stuff work. When you get it working, tell me. When I get it working, I'll tell you.

ASMOP1: A programmable footswitch and patching controller system.

ASMOP1a: A remote footswitch reader/sender with LED annunciation. Here's a prototype PCB layout for ASMOP1.
ASMOP1b: An 8-loop relay based true bypass effects bypasser. Fed by ASMOP1a.
ASMOP1c: A keypad/LCD matrix programmer for a 7x7 any-order remotely selectable effects switcher; fed by ASMOP1a
ASMOP1d: A the switch matrix for the 7x7 any-to-any programmable patch switcher. The Matrix Controller and the Matrix.

ASMOP2: A PWM tremolo using an LFO completely contained in a PIC. Reads Speed and Depth controls and Sine, Triangle, Square, Random, Manual switches to produce an LFO output that is Pulse Width Modulated. 

ASMOP2a: The PWM output drives a CD4066 switch that directly switches a 100 ohm resistor on and off. The resistor looks like a resistor that is larger than the resistor. The effective value varies from 100 ohms (switch on all the time) up to infinity (switch off all the time). The resistor is the lower leg of a resistor divider that does all the signal changing. The PWM output can be converted to an analog signal by an R-C lowpass filter, or used as is for PWM controlled sweep effects.
ASMOP3: A PWM controlled phaser. Uses the same LFO as the tremolo, but switches four CD4066 sections to duty cycle vary the resistor in an standard analog phaser.

Just to show you what can be done, I did the PCB layout for the switch matrix. This is a 9.5" by 3.5" board that does the whole switching for the any-to-any switcher. This looks horrendously daunting if you're trying to make 2" by 3" PCB's, but if you look closely it's pretty simple. It's single sided - that's why there are all those jumper wires; a pain, but not a stopper. The whole switching setup is just one section repeated many times. The microcontroller is that single lonesome 18 pin IC over there in the lower corner. It does all the heavy work. The other ASMOP boards are much simpler than this one, as you'll see.

Still to come, as I have time to draw them up.

I'll put more here as I learn and design. Sharpen up your programming pencils.

R.G.