Step 7: Wire the Rotary Switch

Attach a 6" black wire to one of the inner pins.

Next, attach 6" red wires to the 3 outer pins both to the immediate left and right of the black inner pin.

To be sure you did this right, you may consider testing the connections with a multimeter.
<p>I compiled and uploaded the code without a problem. Changed WConstants.h and WProgram.h to Arduino.h, then no problem.<br>I get the guitar signal through it with different power/jack-setups, but no effects..<br>What can be causing this? Please help<br><br></p>
<p>Sorry do not quite understand that part of connect the stereo jacks, please you can explain how connects this, Which is the input and output? Thanks</p>
<p>Disculpen no entiendo bien la parte de conectar los jacks, me pueden explicar a donde va cada conexion por favor, gracias</p>
<p>I am using arduino uno. You could explain me, how use the code? That give me many errors about a main class. And others about to incluide files. Thanks</p>
<p>Could someone can give me working code. Im using arduino uno</p>
<p>Could this pedal be used as a delay pedal or a distortion pedal?</p>
<p>did you watch the video?</p>
I've been following this tutorial and I've some issues with the code, I already changed the &quot;WProgram.h&quot; and &quot;WConstants.h&quot; with &quot;Arduino.h&quot; but I still get some errors:<br> <br> dsp.cpp: In function 'void output(int, short int)':<br> dsp.cpp:23: error: 'OCR2B' was not declared in this scope<br> dsp.cpp:24: error: 'OCR2A' was not declared in this scope<br> <br> I'm using Arduino 1.0.3 and my board is an Arduino Leonardo
<p>did you ever find a solution for these errors? I am getting the same errors. tried uploading code with new Arduino software and Android 0021</p>
<p>Hello I am using an Arduino Leonardo as well. First, in new IDE's (mine is 1.5.6 r2) we need to change &quot;WProgram.h&quot; and &quot;WConstants.h&quot; with &quot;Arduino.h&quot; as you said. I realized that if you select that the board is an Arduino one, the code works perfect but when we change the board for an Arduino Leonardo I have the next error</p><p>timers.cpp: In function &lsquo;void waveformGenerationMode(int, int)&rsquo;:</p><p>timers.cpp:29: error: &lsquo;TCCR2B&rsquo; was not declared in this scope</p><p>timers.cpp:30: error: &lsquo;TCCR2A&rsquo; was not declared in this scope</p><p>Basically your error are mine are the same, the meaning of the error is that the variables are not defined in the header. Then I saw that there is something extrange. The variable is defined as OCR2A in the file timers.h but it is used as TCCR2A in the timers.cpp, somehow Arduino one manages to get this change but the Leonardo dont. </p><p>For fixing it, do yo have declared the OCR2A and OCR2B variables in the time.h file? </p><p>I dont understand the difference between #define pwm11 OCR2A and int OCR2A = 11; the 2nd one makes more sense for me, even the sintaxis of #define in the time.h file seems to be different to the standard one. <a href="http://arduino.cc/en/Reference/Define" rel="nofollow">http://arduino.cc/en/Reference/Define</a></p><p>Does someone over here knows what is the difference betwen Arduino one and leonardo in terms of libreries?</p>
<p>I got the the code running for a Leonardo, the problem was that OCR2A, OCR2B, TCCR2A and TCCR2B references to the timer 2, The arduino Leonardo does not have that timer, then we need to change the timer 2 for one that Leonardo really has. Leonardo has 0, 1, 3, 4 ones (but not 2, weird). Moreover the other timers are not linked to the same pins in Leonardo and in UNO.</p><p>It is necesary to reorganize them.</p><p>Open the file </p><p>/arduino-1.5.6-r2/hardware/arduino/avr/variants/leonardo/pins_arduino.h, </p><p>Mine is linked as following</p><p>TIMER0B,/* 3 */ TIMER3A,/* 5 */ TIMER4D,/* 6 */ TIMER1A,/* 9 */</p><p>TIMER1B,/* 10 */ TIMER0A,/* 11 */ TIMER4A,/* 13 */</p><p>The definitions on the file timers.h must be </p><p>#define pwm3 OCR0B</p><p>#define pwm5 OCR3A</p><p>#define pwm6 OCR4D</p><p>#define pwm9 OCR1A</p><p>#define pwm10 OCR1B</p><p>#define pwm11 OCR0A</p><p> ********and timers.cpp must content the following code: (et voil&agrave;)</p><p>#include &quot;timers.h&quot;</p><p>#include &quot;Arduino.h&quot;</p><p>int getTimer(int pin) {</p><p> switch(pin) {</p><p> case 5: case 6: return 0;</p><p> case 9: case 10: return 1;</p><p> }</p><p> return 2; // 3, 11</p><p>}</p><p>int getChannel(int pin) {</p><p> switch(pin) {</p><p> case 6: case 10: case 11: return 0;</p><p> }</p><p> return 1; // 3, 9, 5</p><p>}</p><p>// - - -- timer settings</p><p>void waveformGenerationMode(int pin, int type) {</p><p> int timer = getTimer(pin);</p><p> int wgm = type == phaseCorrect ? B001 : B011;</p><p> if(timer == 0) {</p><p> TCCR3A &amp;= ~(B1 &lt;&lt; 3); // clear WGM02</p><p> TCCR0A &amp;= ~B11; // clear WGM01 and WGM00</p><p> TCCR0A |= wgm; // set WGM01 and WGM00</p><p> } else if(timer == 2) {</p><p> TCCR0B &amp;= ~(B1 &lt;&lt; 3); // clear WGM23</p><p> TCCR0A &amp;= ~B11; // clear WGM21 and WGM20</p><p> TCCR0A |= wgm; // set WGM21 and WGM20</p><p> } </p><p>}</p><p>void waveformGenerationMode(int pin, int type, int bits) {</p><p> int timer = getTimer(pin);</p><p> if(timer == 1) {</p><p> TCCR1B &amp;= ~(B11 &lt;&lt; 3); // clear WGM13 and WGM12</p><p> TCCR1A &amp;= ~B11; // clear WGM11 and WGM10</p><p> TCCR1B |= (type &lt;&lt; 3); // set WGM12</p><p> TCCR1A |= (bits - 7);</p><p> }</p><p>}</p><p>void timerPrescale(int pin, int prescale) {</p><p> int timer = getTimer(pin);</p><p> if(timer == 0) {</p><p> TCCR3A &amp;= ~B111; // clear CS02 CS01 CS00</p><p> TCCR3A |= getPrescale01(prescale);</p><p> } else if(timer == 1) {</p><p> TCCR1B &amp;= ~B111; // clear CS12 CS11 CS10</p><p> TCCR1B |= getPrescale01(prescale);</p><p> } else if(timer == 2) {</p><p> TCCR0B &amp;= ~B111; // clear CS22 CS21 CS20</p><p> TCCR0B |= getPrescale2(prescale);</p><p> }</p><p>}</p><p>int getPrescale01(int prescale) {</p><p> switch(prescale) {</p><p> case 1: return B001;</p><p> case 8: return B010;</p><p> case 64: return B011;</p><p> case 256: return B100;</p><p> case 1024: return B101;</p><p> default: return B000;</p><p> }</p><p>}</p><p>int getPrescale2(int prescale) {</p><p> switch(prescale) {</p><p> case 1: return B001;</p><p> case 8: return B010;</p><p> case 32: return B011;</p><p> case 64: return B100;</p><p> case 128: return B101;</p><p> case 256: return B110;</p><p> case 1024: return B111;</p><p> default: return B000;</p><p> }</p><p>}</p><p>// - - -- analog prescaling</p><p>void analogPrescale(int divisionFactor) {</p><p> ADCSRA &amp;= ~B111; // clear analog prescale</p><p> ADCSRA |= divisionFactor;</p><p>}</p>
<p>i have the same problem but start's with analogWrite not declared in scoop</p>
use version 20
<p>I have a couple of questions. First would it be possible to add a selector switch to switch the pedal to different effects functions? Then, if this is added, would it then be possible to add an LCD screen to display which function is currently selected? Does anyone who has made this have a video anywhere of them using it that is a little bit more detailed than the one at the top of the post (I am not criticising the video. I understand it is an advert rather than a demonstration)</p><p>I'm looking forward to making it though. </p>
<p>Hi all, I attempted this this week. Some important things:</p><p>1. It will only work if you compile with an older version of the Arduino software. I used version 0021 found here: <a href="http://arduino.cc/en/Main/OldSoftwareReleases" rel="nofollow">http://arduino.cc/en/Main/OldSoftwareReleases</a></p><p>2. The schematic uses a capacitor (C2, 100nF if I remember right) not found in the bill of materials at the top of this article, the only reason I had enough is because I ordered two of everything because I'm experienced at being inexperienced. I used the other 82nF in its place and all was well. </p><p>3. The design relies on you using a switched type of 6mm jack. I ordered non-switched ones because I am a fool. I don't like this method of turning it on and off, I would rather the main switch included more poles and throws so I think my solution will be to buy another foot switch for this build. It would be the easiest to plumb in to the case.</p><p>4. The article doesn't state whether or not you need a special spade bit for metal. I've yet to cut the larger holes in my Hammond enclosure but I would suspect it would make short work of spade bits intended for wood (most of the ones for sale seem to be, otherwise they are prohibitively expensive). I would be tempted to print the enclosure on my reprap in future. I had to phone my father regarding this issue, he's going to email me some tips.</p><p>5. Some pots have a low range over the ADC I think this may be corrected in code somehow. I measured the voltages and they seemed to sweep uniformly between 0 and 5V.</p><p>I'll report back when I've got my case made up and the selector wheel installed.</p>
<p>You could use a &quot;stepped&quot; drill bit to get the holes to size, or use consecutively larger drill bits.</p>
mantap om
<p>I'm so excited to discover this series of DIY pedal posts. I need to to thank you for your time for this particularly wonderful read!! I definitely liked every little bit of it and i also have you book-marked to check out new things. I also have a blog (<a href="http://www.guitarpedal.org" rel="nofollow">www.guitarpedal.org</a>), If you have time to check on it, I will be so happy.</p>
<p>it's possible to activate different effects at the same time? instead of using a rotatory switch, i want to use 3 three-state switch connected for example to D4,D5,D6... and eliminate the A3 pin of the rotatory switch</p>
<p>It's two years after the comments below. I still don't see the template anywhere.</p>
<p>Hey,</p><p>Just putting a proto-type together and was wondering where the 1.2k resistor is used? Ordered a few as I saw it on the parts list and only now I realize theres none in the circuit design.</p><p>Anyone have any info on this?</p>
<p>trouble...plzzz help...</p>
<p>trouble...plzzzz help...</p>
<p>trouble...plzzzz help...</p>
<p>trouble...plzzzz help...</p>
<p>trouble...plzzzz help...</p>
<p>Hi , </p><p>Can someone confirm the correctness of the veroboard design ??</p><p>I am a bit confused about some capacitors </p><p>my project is almost finished , so a confirmation of that design would rocket me forwards toward the finish.</p><p>thanks a lot for your help</p>
<p>Do you have another image of the circuit of step 8? It gets blurred when I zoom it</p>
<p>hii,</p><p>would you please tell me what we are exactly connecting to analog 2,3.i couldn't find any knobs(potentiometers) attached anywhere in ckt dia..also the input signal.</p><p>this is my first time to follow instructables project i really love this one.i hope you will help me.reply as soon as possible.</p><p>THANK YOU.</p>
<p>Here's the finished thing. It works but only after I correctly insulated the pots from the casing. See my other comment for the other things I noticed. Mine doesn't have a switched input jack, instead I opted for a 2.1mm power port on the back, the same kind as used by standard effects pedals. I just use a 9V battery with the correct connector. </p><p>Be very careful when pushing the knob on your rotary switch as it can break the switch and they are not fun and games to reassemble. I used a sharp blade to cut down the shaft to the right diameter for it to slide on easily and be secured with the screw.</p><p>Also make sure your input and output are the right way around when testing. That seems like an obvious statement to make but it is a likely error. The schematic isn't the easiest to comprehend, my method was to go through with a felt tip pen and colour in each link as I soldered it down. This is definitely worthwhile as it reduces the chance of error.</p>
<p>can someone make a shopping list for dx.com ?<br>Im not that experianced in electronics that i can figure it out my self</p>
i have been searching for octive pedel coding specifically down or bass octive .also does it matter if i use arduino mini or ,nano ?
<p>You need to check that the pwm pins in nano and mini are enough, moreover finally you must translate the code for linking the correct pins to the timer (look at for my previous coment for Leonardo). However, I am not sure how much memory have the mini and nano. When I run a code for an UNO this appears: Global variables use 2,025 bytes (98%) of dynamic memory, leaving 23 bytes for local variables. Maximum is 2,048 bytes.</p>
hello there i'm currently trying to make this project but whenever i try to verify the code and then upload it to the arduino it gives me errors...Does anyone has the same problems as me or knows what to do?
<p>give us details, Arduino version, board you use, and paste the error.</p>
<p>For those of you having trouble following the corrections needed to make the pedal work, here is a veroboard layout I made. With this you can also create the circuit without the Arduino shield.</p>
<p>Hey , are you sure this layout is 100% correct ? I've been trying for days to make this pedal work and still nothing . I've checked it with the schematic and it seems right, but i'm an amateur and i can't be really sure . Have you managed to build this pedal ?</p>
<p>Sit tight - I will let you know as soon as it is done. I also bought twice as many parts so I can build it with the arduino shield kit board I have.</p>
<p>Can someone please confirm that the veroboard layout made by </p><p><a href="http://www.instructables.com/member/danejo/" rel="nofollow">danejo</a> is ok ?</p>
<p>I will let you know shortly - I have like 5 more components to solder....</p>
<p>I'm not 100% sure where i'm supposed to be wiring the input and output jacks to, unless it doesn't really make a difference. I have them on either side of the pushbutton but it doesn't appear to make a difference which side i connect them too.</p><p>I'm also testing mine with an oscilliscope and a function generator, if you could tell me what i'm supposed to be seeing to make sure i did it right that would be awesome!</p>
<p>Have you tried using a Bass guitar instead of a guitar? It just sounds too fuzzy</p>
I really want to make this, but since there are so much revisions that are only mentioned in the comments I don't think I can get it to work. I think it would really help if this instructable would be revised or someone would make a new working instructable. <br> <br>cheers
Can I use a TL072 for this(I have these on hand)
I see no reason why it should not work, but I cannot be 100% certain.
Ok guys, I'm plannig to build this pedal... But, how does it actually sounds? And is it easy to build? Can I use my Arduino Leonardo to build it?
I think the only reason most of your projects aren't working is because you're uploading the code with a later version of arduino. I just spent the afternoon on this and like a lot of others i had clean audio but no output from the atmega. So i downloaded arduino 0020 and uploaded the code with that. No need to rename libraries etc. Just open the code here and that's it. Providing your circuit is ok it'll work. It's very very dirty and very lo-fi. Which is cool by me. Awesome for synth basslines and drums. Stick a clean 808 through it and you've got instant raggacore. <br> <br>Hope this helps. I spent hours going over the circuit, swapping chips, trying different caps and resistors etc. This is all it was though. <br> <br>
Hey there! I am currently working on building this pedal. I have a question about it and I was hoping I could get some feedback or clarity of information. My question is, what do the 3 potentiometers and the rotary switch do. Like what are their functions when the pedal is up an running? If you shed light on this subject that would be very helpful and greatly appreciated! Im looking forward to creating this pedal!
Hi, <br>I have made this with a breadboard and I get no effects running through. I am using the arduino rev 3 and tried using arduino 20 as well. I get clean guitar through and have checked all my wiring and polarity on the breadboard, everything looks good. I am thinking either the arduino is deffective or the code isnt processing right even though I followed all the instruction to the T. I even changed Wprogram.h and Wconstants.h in the code. Is there anything i am missing that should be done to the code specifically for a rev 3 arduino?

About This Instructable


760 favorites


Bio: My name is Randy and I run the Instructables Design Studio. I'm also the author of the books 'Simple Bots,' and '62 Projects to ... More »
More by randofo: Hard Candy Recipe 2-Ingredient Candy Teeth Candy
Add instructable to: