Programmable Arduino based digital effect/amp switcher

Started by bancika, August 29, 2011, 05:40:44 AM

Previous topic - Next topic

bancika

I'm in the process of designing a DIY friendly variation of Petrucci's fancy switching system. The basic idea is to have a separate controller that would contain all the brains of the device and all the switches and switching units would be mounted below the pedalboard or in rack where the effects are. It would have 4 presets and 7 channels (these numbers can be played with to a degree). Here's how it would work: you have a switch for each "channel" (effect, preamp, amp, whatever) on the controller. When you press the switch that channel toggles it state and LED shows if it's on or off. After you're happy with your preset one click on the separate save button saves that preset to the internal permanent memory. Each preset has its own footswitch. When you press one of them, the corresponding preset is loaded, LED indicates which preset is loaded and each channel LED is refreshed with the new state.

It's similar to this fancy switcher Petrucci uses, but without LED and without that many switches.
http://www.youtube.com/watch?v=07aR75NWLyA

Here's the preliminary schematic. It uses arduino boards that make the build much easier http://diy-fever.com/temp/arduino_switcher_v2.pdf

I'll try to build the controller over the next weekend to be able to test it and add relay based switching units later.

Cheers,
Bane

The new version of DIY Layout Creator is out, check it out here


head_spaz

Awesome!
Can hardly wait.
Sounds very much like Carvin's X-Amp matrix... which is VERY smart... and useful.
Will you eventually provide us with your source code?
And can the arduino board you're using be programmed directly... or does it need it's own programmer and special software?

BTW... the youtube link is busticated.
Deception does not exist in real life, it is only a figment of perception.

bancika

I updated the link. And yes, I'll post everything needed to build the thing. I just need to verify that the code is working, I have it written but untested.
Arduino is programmed very easily. There's an app for developers that uses C language. After you're done, just plug it in the USB and press one button to upload.
The new version of DIY Layout Creator is out, check it out here


head_spaz

Deception does not exist in real life, it is only a figment of perception.

petemoore

  I have Arduino Uno, have made phaser LFO and other little jobbies with it, mostly flashing or blinking LED's but some stepper motor stuff too.
   The 'idea' I had was to double-duino...ie when the UNO starts making matters excessively complicated or impossible, just link another microcontroller for...
   Whatever it is that goes along with...such as have a knob-turner or virtual pot controller linked to the 'master' controller. This way might be more expensive in terms of controller hardware, but should ease the software writing jobs as well as make easier multi-function-functions..for performing more complicated tasks [say...two or more parameters switched or adjusted simultaneously].
 
Convention creates following, following creates convention.

harmonic

Looking forward to seeing how this turns out. I have my own ideas on this and had intended to start getting into micros and programming as my 'next step' but was waiting for cash coming in. Love the possibilities!

Go for it!

cpm

arduino boards are expensive to fit as a final build. Actually, you dont need all the stuff on them.
If you're dead set on the arduino platform, just burn the code on the chip and mount as standalone on your pcb, there are schemes on their site, and you'll only need a 78L05, a crystal osc, and a couple caps and resistors...

The downside whatever board you use, is the chip having a startup time, >5 secs. This is because it runs the bootloader before going into user code. For a final build this can be annoying.

The atmegaxxx chip is a powerful uC, but if you are juicing all the powers from the chip, the arduino stuff will hinder performance as its ocuppying some of its resources (counters, pwm, i/o pins, etc), at that point you'd rather hardcode directly without the bootloader, and again, at that point there are usually other chips much cheaper and readily available. You could program a simple switcher using a <1$ PIC and about 40 instructions...

anyway, that is just my experience on this road so far
as you stated, for a "diy friendly" project, that is a great stand... and will help to introduce people to microcontrollers in a richer way than just blinking an LED.


bancika

Tnx. I'm aware of that option, but I have no experience with controllers and assume there are many DIYers like me. There are duemillenove boards for 20$ something from honk kong (I got mine and it's fine so far) but also there are those mini and nano boards that have everything you need for less than 15$. I think that's fair. Just to get a programmer I'd have to give more money than that and it takes more time/effort to get it running. This way you just plug it in USB and upload the code, love it :)
If I was to build more than 10 of these it would probably be worth investigating building my own arduinos, it would pay off :)

Cheers
The new version of DIY Layout Creator is out, check it out here


cpm

Quote from: bancika on September 04, 2011, 05:39:51 PM
Tnx. I'm aware of that option, but I have no experience with controllers and assume there are many DIYers like me. There are duemillenove boards for 20$ something from honk kong (I got mine and it's fine so far) but also there are those mini and nano boards that have everything you need for less than 15$. I think that's fair. Just to get a programmer I'd have to give more money than that and it takes more time/effort to get it running. This way you just plug it in USB and upload the code, love it :)
If I was to build more than 10 of these it would probably be worth investigating building my own arduinos, it would pay off :)

Cheers

you can unplug the atmega chip and use as standalone without the board, once programmed
if using a clean chip (freshly bought), you can burn the bootloader connecting a cable to the ICSP socket and then have an aruido-ready chip to upload programs. There are instruction on their website, i made mine with an old printer cable, and the upload is done from the arduino software...
This way it will cost you 20$ for the board once, and from then on only the chips you use...

bancika

#9
what is ICSP socket  :icon_redface:

edit: I figured it out :) once I burn the bootloader on a blank controller, what do I need to get it running on its own?

tnx
The new version of DIY Layout Creator is out, check it out here


iccaros

Quote from: bancika on September 04, 2011, 06:09:15 PM
what is ICSP socket  :icon_redface:

edit: I figured it out :) once I burn the bootloader on a blank controller, what do I need to get it running on its own?

tnx

power and oscillator (depending on the chip, it may have a built in time source.)
The rest is for programming

In this case an And gate and simple stable multi-vibrator(to remove switch bounce)  would be all you are using the processor for. Its a wash in cost, but harder to trouble shoot. But don't get me wrong, there are many ways to skin this cat, and in the end we a skinned cat is always a good thing :)

boot up time will be something to deal with, a PIC would also be a good substitute, as you can hard program one. Plus the arduino uses a boot loader that translates what you "programmed" into it into machine code on the fly, so it can be slow, but not in this application. Its a good development environment, but you need nothing form the development environment once you program the chip. the Amtel

The datasheet http://atmel.com/dyn/resources/prod_documents/doc7799.pdf
shows you need an external crystal of 8 - 16 mhz ..
So you need power and a Crystal Oscillator, then all of your connections.


bancika

thanks for the info. Can someone confirm that I got it right.
I can buy a blank at168, insert it into my duemillenove and burn the bootloader with parallel programmer plugged into ICSP. After that it should work the same as the chip I got with the duemillenove. To run it on its own, it's sufficient to give it regulated +5V and 16mhz resonator and that's ready to go.
I drew a layout, could somebody take a look, should be simple to verify if I got it right?

http://diy-fever.com/temp/arduino_bb.pdf

Thanks a million,
Bane
The new version of DIY Layout Creator is out, check it out here


head_spaz

At the very bottom... I think your polarity signs are reversed. (+ and -)
Otherwise... it looks good.

This is the kind of project I've dreamed about... but never had a clue as to how to go about doing it.
I can weld, and I can grind to make it pretty, but programming beyond my skill set!
So if you need any welding done... let me know.
Deception does not exist in real life, it is only a figment of perception.

harmonic

Yeah, looked like the polarity was the wrong way round to me too. No other insight to offer though: sorry! :)

cpm

Quote from: bancika on September 05, 2011, 05:57:07 AM
http://diy-fever.com/temp/arduino_bb.pdf
Thanks a million,
Bane

mostly that, plus the 16Mhz crystal+caps at pins 9/10
Although the atmega chip could run on an internal oscillator, the arduino stuff requires the external clock at 16Mhz to work properly

if you place hookup pins on your "barebones board", for pins 2/3 (rx/tx), you can bridge them from the arduino board (without the chip) and upload your program directly on your project board. This is useful because you will have the IO pins connected to you stuff, and so there is no need to unplu/plug the chip to upload the program for testing and correction of bugs. You will need to manually reset the chip when you start the uploading from the computer, sou you can brige pin1 too for use the reset button, or just touch that pin momentarily to gnd. IMPORTANT: Power will be provided from your bb-board, but still you'll have to connect gnd from both boards to get the same gnd reference for this bridging to work

The ICSP stuff is only needed to initialize a fresh atmega chip. Once it has the bootloader burned this way, you can use with the standard software through the usb.
One way is like i said, directly from the parallel port.
Another way is to use the arduino itself as an intermediate programmer. There is an example program in the IDE to do this, so load this program into arduino board No1, and hook its ICSPIN to arduino board No2 (with the fresh chip). Board No2 may be a "barebones" board like yours, with the correct pins connected (something like this http://www.kerrywong.com/blog/wp-content/uploads/2010/04/atmega328ISPboard_3.jpg)


bancika

That layout includes the oscillator but I didn't draw it. Traces are there.
yes, I planned to use arduino board to burn the bootloader and upload the sketch and then move it to the barebones board permanently.
The new version of DIY Layout Creator is out, check it out here


bancika

I updated the drawing. Polarity was wrong and oscillator middle pin was connected to 5V instead of GND.
It should be ok now. When you say 16mhz+caps, do you mean I need additional caps there? I think I read somewhere that oscillators have them internally, but not sure.

http://diy-fever.com/temp/arduino_bb.pdf

head_spaz, I'll post the code as soon as it's tested, so no worries about programming nightmares :)

Btw, I gave the chassis drawings to a local metal shop and they will probably make it this week. Also, I sent pedalboard plans to another shop that works with aluminum to see if they can make it. Otherwise I'll use wood. It's much cleaner to install the switching units under the pedalboard and just use jumpers from pedals to switchers.

Cheers and thanks all for help.
The new version of DIY Layout Creator is out, check it out here


head_spaz

Thanks Bane.
Does the arduino require some sort of C-compiler for the code?
Sorry, I just don't know schitt about programming. I've been trying to get started with PIC platform... but the documentation is like an endless loop of diversion. Might as well be written in bocci.
Deception does not exist in real life, it is only a figment of perception.

bancika

that's the beauty of arduino. It's very simple to program. The language is C and they have their own development app. When you're done coding just connect the board to USB and hit upload button. That's all :)
The new version of DIY Layout Creator is out, check it out here


harmonic

Not necessarily of any use to you, Bane, as you're doing the barebones thing as a pcb, but here's a quick kit to do the same thing:
http://www.hobbytronics.co.uk/kits/breadboarduino