Micro Controlled Effects Switcher

Started by shawsofhell, October 10, 2005, 06:03:55 AM

Previous topic - Next topic

shawsofhell

I am designing a switcher to allow me to assign 8 pedals to different patches. I am using an AVR micro and have already done the programing but am having some problems designing the hardware components. The micro I am using has 15 I/O pins and some of the pins can be configured for serial out and other options.

1) Is there a CMOS 16-to-4 line encoder available the most I can find is an 8-to-3? (The encoder is for cutting down on the number of inputs required for the switching mechanism)

2) Does anyone know if an LCD can be attached via the UART pin? I have already attached an IC to the micro which allows me to comunicate via the serial port on my computer. (I want to attach a display to allow me to see which patch set and patch I am currently using without having to use another micro to control the LCDs)

3) What sort of circuit will I need to put on the outputs to drive 5V (or 12V) relays? (A link to a cercuit would be great!!!)

4) I plan on mounting all my pedals in the same box will there be any interference between them???

I plan on posting all my notes and diagrams that I come up with as well as my full code so that others may be able to repeat this project if they want to!!

SaBer

Quote from: shawsofhell on October 10, 2005, 06:03:55 AM
I am designing a switcher to allow me to assign 8 pedals to different patches. I am using an AVR micro and have already done the programing but am having some problems designing the hardware components. The micro I am using has 15 I/O pins and some of the pins can be configured for serial out and other options.

You might want to check out this:
http://www.geofex.com/Article_Folders/ASMOP/ASMOP.htm

Quote1) Is there a CMOS 16-to-4 line encoder available the most I can find is an 8-to-3? (The encoder is for cutting down on the number of inputs required for the switching mechanism)

Someone once had the idea to make a ladder-type voltage divider with many taps connected to switches, and use an ADC to determine witch switch was pressed.

Quote3) What sort of circuit will I need to put on the outputs to drive 5V (or 12V) relays? (A link to a cercuit would be great!!!)

http://www.geofex.com/Article_Folders/ASMOP/asmop1b.gif

Quote4) I plan on mounting all my pedals in the same box will there be any interference between them???

Ground loops, and too little space would be my two biggest concerns.

QuoteI plan on posting all my notes and diagrams that I come up with as well as my full code so that others may be able to repeat this project if they want to!!

That's nice!
There are 10 kinds of people in this world. Those who understand binary and those who don't.

niftydog

QuoteIs there a CMOS 16-to-4 line encoder available the most I can find is an 8-to-3?

You can gang some of these devices together to make more complex decoders, what chips have you found so far?

QuoteDoes anyone know if an LCD can be attached via the UART pin?

Yes it can, provided your LCD can be set up for serial operation and the micro can reproduce the required data stream. Some LCD panels can accept conventional serial comms like RS232 and do their own decoding on board.

QuoteWhat sort of circuit will I need to put on the outputs to drive 5V (or 12V) relays?

Darlington driver ICs are my favorite. R.G. has some circuits on relay driving, check out geofex.com.

QuoteI plan on mounting all my pedals in the same box will there be any interference between them???

Always a possiblity, but only one way to find out!

Good luck, really interested to see your results, I'm working on a similar thing but it has become a monster!
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

R.G.

If I may make some suggestions...

Quote1) Is there a CMOS 16-to-4 line encoder available the most I can find is an 8-to-3? (The encoder is for cutting down on the number of inputs required for the switching mechanism)
Wouldn't it be simpler to use CMOS PISO (parallel in, serial out) shift resisters to latch the states and then shift all the stuff in? That's a maximum of three I/O pins for any amount of data. PISOs are cheap, much cheaper than encoders.

To answer your original question, yes they exist, but they're so rare that seldom used that most distributors have never heard of them. A good thing to do is to visit either the Fairchild or TI data sites and look up the logic functions you want in their parametric search sections. Basically, if Fairchild or TI doesn't make a CMOS device, you can't get it.

As a side note: the programming of a controller to do simple functions is the easiest, most trivial part of a design like this. It's the interfacing to the rest of the world where the work is. Put 90% of your effort into designing the stuff around the controller. The controller programming is trivial, as the controller will sit still and do what you want. It's like training a Golden Retriever and a wolf hybrid to do dog tricks. Put 90% of your effort into the wolf hybrid. The Golden Retriever has a thousand generations of being bred for obedience. The wolf hybrid still does what it wants.
Quote2) Does anyone know if an LCD can be attached via the UART pin? I have already attached an IC to the micro which allows me to comunicate via the serial port on my computer. (I want to attach a display to allow me to see which patch set and patch I am currently using without having to use another micro to control the LCDs)
Yes, they make those. However, you can interface to a Hitachi 44780-controlled  LCD (which is most of them) with something like four pins. The serial LCDs have another ucontroller to do serial to parallel and then feed the LCD. With the pins saved on the encoder/PISO, you can run the LCD directly.

Quote3) What sort of circuit will I need to put on the outputs to drive 5V (or 12V) relays? (A link to a cercuit would be great!!!)
There exist by-seven and by-eight darlington relay drivers in a single dip, but I've always looked at the relay current, and the output current from the micro (20ma for a PIC, don't know about an AVR) and if the ratio is less than 100, used a single 2N3904. By the way, use a slow-down cap on the relay driver so the voltage across the  relay coil doesn't move too fast or it will induce clicks in the audio path by capacitive coupling.

Quote4) I plan on mounting all my pedals in the same box will there be any interference between them???
Yes, possibly. It all depends on your layout and power wiring. High gain, high impedance circuits in close proximity are made for cross interference. Like the song says, "you gotta know when to hold 'em, know when to fold 'em, know when to walk away, know when to run..."

Go read everything at GEO on ASMOP, relays, latching relays, and remote footswitching. It will save you quite some time. The stuff on the larger steel studs may help you with packaging, too.
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.

shawsofhell

Thanks for so many replies already guys!!! You've solved the relay driver design for me:
http://www.geofex.com/Article_Folders/rmtswtch/rmtsw3.gif

I'm still not sure what to do with this switching system. I could add some small logic before the chip to give me and extra output bit. I think I can do it with 3 ORs and 3 and gates. I might try some of the logic out this coming weekend to try and get that right before I move onto other parts of the project.

I'll probably mount the pedals in a box that is the equivalant of about 3 to 4 rack units with should give me enough space between them.

Would you recoment using a toroidal transformer for this as they are supposed to have less interference?

A 6.5A output should be enough to drive the relays, pedals, micro and lcd?

Thanks again guys!!


R.G.

You can expand the digital I/O of the PIC range almost infinitely by using the SIPO and PISO shift registers I mentioned. The 74HCT595 is a really good one, check the Fairchild and TI sites for the others. The SIPOs let you shift in a serial string, then put it out on the output pins by asserting a 'transfer' signal. The PISO devices let you latch eight inputs and then shift them out to the uP. They are both infinitely stackable, so you can do, say, 64 inputs with eight of the PISO chips stacked end to end. Likewise, 64 outputs with eight SIPOs. You can use the same data and clock pins on the PIC for both strings, and two more pins to select the chips, so the 64 (or 96, or 128, or...) ins and outs can be done with four pins. You can use the same data and clock pins to shift data into an LCD, you need another select line and a command line, total of six pins for as-many-as-you-like inputs, outputs, and an LCD. I suspect the AVR could do a similar trick.
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.

shawsofhell

Just an update of where I'm at....

I ended up using just one 7 digit led display that will show the program number I am currently using and this is driven by a CMOS chip that allows me to use only three line to control it. ie if I put  "010" onto the output pins it the CMOS outputs drive the segments required to light up a two on the display.

I have designed a switching system which gives me up to 11 switches(could give up to 15 with some more cmos gates but 11 is enough) and use 4 lines to tell the Micro which button got pressed. This works alright for me cause I'm not too good with serial programming like was suggested above.

The display and switching boards are mounted in a sloped case that I picked up in the bargain bin at my local store and is perfect for this application. The 3 display inputs and 4 switching outputs plus 1 wire for +5V and 1 for ground are wired to a 9 pin serial plug so i can use a standard serial cable to connect this to the relay driver box and power supply.

I have uni exams for the next 2 or so weeks so I won't post much for a while but after that I will put the PCBs I designed and some notes plus pictures on the web.