Arduino Guitar Pedal by randofo
Featured
main1.jpg
main2.jpg


The Arduino Guitar Pedal is a digital multi-effect pedal based upon the Lo-Fi Arduino Guitar Pedal originally posted by Kyle McDonald. I made a few modifications to his original design. The most noticeable changes are the built-in preamp, and the active mixer stage which lets you combine the clean signal with the effects signal. I also added a sturdier case, foot switch, and rotary switch to have 6 discreet steps between the different effects.

The cool thing about this pedal is that it can be endlessly customized. If you don't like one of the effects, simply program another one. In this way, this pedal's potential is largely dependent upon your skills and imagination as a programmer.
 
Remove these adsRemove these ads by Signing Up

Step 1: Go get stuff

1A.jpg
You will need:

(x1) Arduino Uno REV 3 (Radioshack #276-128)
(x1) Make MakerShield Prototyping Kit (Radioshack #276-138)
(x3) 100K-Ohm Linear-Taper Potentiometer (Radioshack #271-092)
(x1) 2-Pole, 6-Position Rotary Switch (Radioshack #275-1386)
(x4) Hexagonal Control Knob with Aluminum Insert (Radioshack #274-415)
(x1) TL082/TL082CP Wide Dual JFET Input Op Amp (8-Pin DIP) (Radioshack #276-1715)
(x2) 1/4" Stereo Panel-Mount Audio Jack (Radioshack #274-312)
(x4) 1uF 63v capacitor (Radioshack #55047191)
(x2) 47uF 16v capacitor (Radioshack #55047280)
(x1) 100pF 50V 10% Hi-Q Ceramic Disc Capacitor (Radioshack #272-123)
(x1) 0.082µf 100V Mylar Capacitor (Radioshack #55046837)
(x1) 5pf 50V Ceramic Disc Capacitor (Radioshack #55047529)
(x6) 10K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1335)
(x2) 1M Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1356)
(x1) 390K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #55049555)
(x1) 1.5K Ohm 1/4W 5% Carbon Film Resistor (Radioshack #271-1120)
(x1) 510K Ohm 1/4W 5% Carbon Film Resistor (Radioshack #55049227)
(x1) 330K Ohm 1/4W 5% Carbon Film Resistor (Radioshack #44049468)
(x1) 4.7K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1330)
(x1) 12K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #55049436)
(x1) 1.2K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #55049409)
(x1) 1K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1321)
(x2) 100K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1347)
(x1) 22K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1339)
(x1) 33K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #55048044)
(x1) 47K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #271-1342)
(x1) 68K Ohm 1/4-Watt Carbon Film Resistor (Radioshack #55049451)
(x1) Heavy-Duty 9V Snap Connectors (Radioshack #270-324)
(x1) 90-Ft. UL-Recognized Hookup Wire (Radioshack #278-1221)
(x1) Enercell® Alkaline 9 Volt Battery (Radioshack #25-853)
(x1) Box 'BB' Size Orange Powder Coat (Small Bear #0301G)
(x1) DPDT Stomp switch (Small Bear #0203)
(x1) 1/8" x 6" x 6" rubber mat
(x1) 1/8" x 12" x 12" cork mat
1-40 of 136Next »
BenBurge says: May 17, 2013. 3:01 PM
What exactly do each knobs/rotary switch do? You do an awesome job coving the build part of the project, but i'd really love to see the final product!
jreeg says: May 15, 2013. 2:39 PM
I'm going to be putting this together in a few days when the parts come in the mail, and I noticed that the templates for all the drilling on the project box and for cutting out the brackets aren't actually attached to their steps. Just something I thought you might want to know. Thanks!
Richard Zusak says: May 11, 2013. 7:28 AM
I hear the clean sound, but none of the fx effects. Even I try to make the program with only one effect without array, but doesnt seem to work. Also I tried to change the resistors and capacitors and others things as said in the comments below but nothing. Any idea of what can it be? Thanks for reading.
randofo (author) says: May 11, 2013. 7:10 PM
Which effect are you trying?
BenBurge says: May 10, 2013. 1:59 PM
Would this work with the Arduino Nano?
I'm thinking of building on internally!
Richard Zusak says: May 9, 2013. 4:59 PM
Is it necessary a preamp for this project? I actually have the same issue as everyone here about the clean sound, Does any one have found a solution?
randofo (author) says: May 10, 2013. 9:37 AM
The TL082 is the preamp. Everyone is having different problems. Can you be more specific. Are you hearing or not hearing clean sound?
ianfantry says: Apr 30, 2013. 2:48 PM
Does anyone know if this works with the Rev 2 board? I've constructed the circuit, but I am having trouble generating the effects. I am getting a clean signal to my amp so I know the preamp stage is working. Anyone else having this issue with a Rev 2?
bolongo1992 says: Apr 2, 2013. 7:59 PM
I've been following this tutorial and I've some issues with the code, I already changed the "WProgram.h" and "WConstants.h" with "Arduino.h" but I still get some errors:

dsp.cpp: In function 'void output(int, short int)':
dsp.cpp:23: error: 'OCR2B' was not declared in this scope
dsp.cpp:24: error: 'OCR2A' was not declared in this scope

I'm using Arduino 1.0.3 and my board is an Arduino Leonardo
Basementjacks says: Apr 6, 2013. 4:16 AM
use version 20
contactscolored says: Apr 4, 2013. 10:44 PM
Probably a lot easier thatn all the other ones....
DavezDesignz says: Mar 28, 2013. 6:00 PM
can a single pole rotary switch be used for this?
rogerglewis says: Mar 24, 2013. 1:23 PM
Brilliant. Thank you so much, I am building a pickup replacer pedal at the moment I'll post the results when done.
keltroth says: Feb 27, 2013. 2:47 AM
Small Bear links are broken
Box : http://www.smallbearelec.com/servlet/Detail?no=718
Stomp switch : http://www.smallbearelec.com/servlet/Detail?no=23

Very nice Instructs !!

Thank you !
Basementjacks says: Feb 13, 2013. 6:00 AM
i got the code to work....
//set initial values
j = 50;
value50 = 50;
value300 = 300;
value10000 = 1000;


the value indicated was not set correctly, it should be value100000=100000
Basementjacks says: Feb 13, 2013. 6:01 AM
blehhh you know what i mean haha

value10000=10000
Basementjacks says: Feb 11, 2013. 7:42 AM
hi im trying to get the code to run but all that keeps coming up is errors saying that a function is void or something is not declared. i am new to programming and am a little confused. also i tried to look at Kyle's code but the link has been deleted. also is there not just one file for all of the code? what i downloaded is your zip file of everything but there is dsp.cpp and dsp.h, this goes for the timers as well.
please help!
thanks!
randofo (author) says: Feb 11, 2013. 11:02 AM
I see. Kyle's hosting service deleted the files and he is now referring people here. I will see about tracking down and re-uploading his original code when I get a chance. I am not sure why you are getting errors. Are you using Arduino 1? Perhaps try using one of the legacy versions of the IDE. Arduino 1 often crashes and does silly things.
Basementjacks says: Feb 12, 2013. 5:47 AM
i am using version 1.0.3 does that make a difference? thanks a mil for the help its for a college project
randofo (author) says: Feb 12, 2013. 9:19 AM
It might. Try going back a few versions and see if that helps. You can have both installed at once.
Basementjacks says: Feb 12, 2013. 12:34 PM
i have downloaded version 20 and i still keep getting errors for basically the whole thing of code
KozyWhiskey says: Jan 31, 2013. 9:07 PM
I am impressed. I am going to try something similar with an old guitar I have lying around, but put the effects in the body of the guitar. Your pedal looks pro.
JensonBut says: Jan 25, 2013. 11:36 PM
I am fairly new to Instructables so I will have to take a look at putting it together. I definitely want to get a video up. I'll let you know when I get either up. (I tried replying but the captcha thing seems messed up)
BonzaiRob says: Oct 29, 2012. 4:58 PM
Hi there, I've been putting this together and I've encountered some problems.
At first I couldn't get anything but buzz - I think flipping the capacitor you mentioned solved that one. Or I had a bad connection somewhere.
Luckily I ordered parts by the list, not the schematic, so I got the right capacitor for C2. I've also bypassed R3 and R4 (although i couldn't hear a difference).

I'm currently having the same issue as many others, in that I only hear clean audio out, with everything put together as in the schematics (so, through the arduino, as far as I can tell). Does this mean the problem lies in the arduino? I've hardcoded it to just use the bitcrush mode, but that has raised problems of its own.

I'm getting all sorts of buzzes, particularly when I disconnect the Arduino from the USB sketch connection. I'm powering the breadboard via a 9v transformer (600mA) but it doesn't seem to change a lot.
I recorded what happens.
First part: USB-connected Arduino and transformer-powered breadboard.
Second: Switched off the transformer.
Third: Changed to battery-power.
Fourth: Back to transformer. The buzz starts when I disconnect the Arduino from the USB connection. It's hard to tell, could this be the bitcrusher? Curse my infatuation with lo-fi!
Fifth: No USB, battery-power. Other than the slight wobble to the buzz, no real difference.

Have I got a short somewhere? I had to lay the breadboard out a little differently but I can get a picture/diagram of it.
Thanks for any help, looking forward to your response.
randofo (author) says: Oct 30, 2012. 9:52 AM
You should try downloading the code from Kyle's project that I link off to. All the pins should be the same. See if you can get his blank example to work with the bitcrush mode (ignoring the mode selection switch).

One thing I have not considered yet is that I developed this on the older versions of the Arduino software (not Arduino 1). Perhaps this has something to do with it? I know some libraries have become broken with this software. Maybe try running one of the older Arduino programmers. Those are quick to download and don't typically require any installment (on Mac at least)
BonzaiRob says: Oct 30, 2012. 2:09 PM
Ah yeah, I didn't mention but the code didn't work on version 1, I downloaded the last less-than-1 version to even get it to compile. What version are you running?

Thanks for the reply, i'll try Kyle's code.
randofo (author) says: Oct 30, 2012. 7:37 PM
Version 20
BonzaiRob says: Jan 12, 2013. 4:08 PM
I had to take a break from working on this but I thought I should post my findings, meagre as they are.
I'm not sure if it's my breadboard, or perhaps my cables, but I've carefully been through all of my connections several times and I'm sure I have wired it correctly to the spec (including the changes you mentioned); the whole "pedal" only works intermittently. I've only had it actually working around three times. (And still only clean audio!)
On the times when it has worked, it's suddenly started working for no apparent reason after being switched on for a while. I'm loathe to solder to fully test, but the time contingent suggests capacitor charging or something similar?
I'd be really interested to see if you can build another one and recreate it, possibly documenting each step as you do it. Would that be possible? The schematics and instructions posted don't seem to be quite enough for most of us to follow and end up with a working pedal, so knowing and following exactly what you have done would help greatly! Thank you, anyway!
jmcdaniel7 says: Nov 11, 2012. 2:18 PM
Pardon the dumb question but how "clean" will the audio be after the ADC? I seem to be getting a bit of distortion on my output. Assuming optimized code, is this expected? I probed the audio @ A0 and it sounded nice and clean. I've experimented with tone() and even ported some sin/square wave code and the PWM output sounds clean. So, I'm pretty sure my "problem" is just the ADC and perhaps this is normal. Or, I have a software issue. For what it's worth, I'm getting 10 bit values of around 500 for silence and +/- (0 to 100) from that when I hit the guitar.

thx! (awesome tutorial by the way)
randofo (author) says: Nov 11, 2012. 2:51 PM
The ADC is the bottleneck of this equation. You may be able to get better results using timer interrupts, but I built this before I knew how to do that.

It should not sound remarkably good. Theoretically it is 10-bit... but... this is limited by the sampling rate on the input. You can perhaps try different output techniques. This is a good project to see other (better) ways to process audio output with the Arduino.

It should sound a bit static-y and perhaps pop every now and again. Think under-sampled audio.

This is why I have two pots to mix the Arduino signal and the clean signal together before going to the op amp output. This allows you to balance the two together and fudge the output a little bit. Of course, if you are really distorting the guitar signal with your code, no amount of mixing will help that.

I'm glad you got this part working since this is the part most people seem to be stuck on. I was beginning to suspect something was very wrong with my instructions somewhere.

Please post a picture of it when you are done, and let me know if you get stuck anywhere else. If you make any improvements, also please let me know.
jmcdaniel7 says: Nov 11, 2012. 4:16 PM
Thanks. As it stands right now, I am using interrupts and that really helped to reduce distortion.

Here are few pics. The wiring was cleaner but I had to dismantle it for troubleshooting. I decided to ditch the battery and add a power adapter, + a diode for reverse polarity detection. That was an afterthought. I also threw in an LED and a slick little stomp switch PCB I got from smallbear. The LED shows bypass on/off. Poking the USB out the side was key. I have a super-high tech wooden dowel wedged in between the arduino and the stomp switch to keep things steady for USB cable insertion/removal.


Not shown is a picture of the horrible mess I made trying to solder bridge stuff. I've never done that before and although I got better along the way, my work is still embarrassing. A PCB would probably saved me some time here and there.


All in all, this was a great project and I learned a lot.
jmcdaniel7 says: Nov 11, 2012. 4:20 PM
pics
DSC02549.JPGDSC02548.JPGDSC02547.JPG
andymelichar says: Oct 18, 2012. 8:23 PM
There have been several comments made here about switching out some of the parts and some fixes to this project... have those new parts/fixes been incorporated to the instructions, or do I need to sort them out from the comments? I really *really* want to make this, but am nervous due to the number of people who say they have been unsuccessful.
randofo (author) says: Oct 20, 2012. 8:19 PM
The list of things that need changing:

There are three things that probably need changing in the schematic. Capacitor C2 should be 100pF and not nF (it may not work with 100nF). Resistors R3 and R4 should be cut and those pins wired directly to the junction of the 10K voltage divider (4.5V) (it will work with these values - just sound noisy). Another silly mistake just spotted... flip C7 around to reverse the polarity. The positive pin should be pointing towards the Arduino (that said - mine is wired backwards as drawn in the schematic and still works).

Nonetheless, this is a bit of a tricky build and may take some fussing about to get it to work.
jom1991 says: Oct 8, 2012. 2:37 PM
Hola a todos, He conseguido hacerlo funcionar, el problema esta en el archivo "dsp.cpp". Cambiarlo por este y funcionara.


***************
* dsp.cpp *
***************
#include "dsp.h"
#include "timers.h"
#include "WProgram.h"

void setupIO() {
// prepare left
waveformGenerationMode(3, phaseCorrect);
timerPrescale(3, 1);
analogWrite(3, 0);

// prepare right
waveformGenerationMode(5, phaseCorrect);
timerPrescale(5, 1);
// analogWrite(5, 0);
// analogWrite(6, 0);

// faster input
analogReference(INTERNAL);
analogPrescale(analogPrescale32);

}
void output(int channel, short value) {
if(channel == left) {
analogWrite(3,value >> 2);
analogWrite(11, (value & B11) << 6);
} else if(channel == right) {
analogWrite(5 , value >> 2);
analogWrite(6 , (value & B11) << 6);
}
}
kboj3435 says: Sep 16, 2012. 12:49 PM
How would you go about adding a reverb effect?
Geoplegatill1991 says: Sep 15, 2012. 5:27 PM
Wow how long does it take you to build the entire pedal?
bettencb says: Sep 12, 2012. 6:38 PM
my pot connected to pin 7 and pin 2 on the 1uf cap is acting as a volume knob? is it supposed to do that?
randofo (author) says: Sep 13, 2012. 8:11 AM
Yes. It is the volume knob for the clean signal. The other pot connected to Pin 2 should be the volume knob for the fx signal. It is basically a mixer.
bettencb says: Sep 13, 2012. 8:36 PM
why does the sound completely cut out when the pot connected to pin 7 and 2 is turned down but the other doesn't?
1-40 of 136Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!