Picture of Lo-fi Arduino Guitar Pedal
Bit crushing, rate reducing, weird noises: DIY 10-bit effects/guitar pedal with an Arduino for lo-fi DSP.

Check out the demo video on Vimeo.
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials


  • Arduino (Diecimila, or with auto-reset)
  • Soldering iron
  • Hot glue gun
  • Wire cutters
  • Drill press or dremel


  • Enclosure
  • Solder
  • Hot glue
  • Wire
  • Perf board
  • Audio jacks (I used 1/8") (x2)
  • Interface inputs, e.g.: 3 potentiometers
  • Interface outputs, e.g.: 3 LEDs and 3 150 ohm resistors
  • Resistors: 1 k, 10 k, 1.2 k (x2), 1.5 k, 390 k
  • Capacitors: 2.2 uF (x2)

Double the number of resistors and capacitors for stereo wiring.

Step 2: Preparing the Enclosure

Picture of Preparing the Enclosure
I used a "fast ethernet media converter" for my enclosure. It's just a box that happens to fit the Arduino, some interface elements, and two audio jacks. It's pretty sturdy metal, which is important for a pedal. As an added bonus: it has a hinge on the back, which makes it easy to open and close.

The only modifications I had to make to this enclosure were some holes for the three pots (using a drill press) and cutting out some plastic for the USB connector.

Step 3: Connecting the Components

Picture of Connecting the Components
Once the enclosure is prepared:

  • Situate the Arduino
  • Install any of your interface components, like pots or LEDs
  • Install your input and output jacks

Remember that the LEDs need resistors between them and the pins on the Arduino. I used 150 Ohm resistors.

We'll be modifying the analog reference value, so if you want to use any pots you have to connect them to the AREF pin instead of the usual 5V pin.

For the 1/8" connectors (or anything that isn't on the same panel of the enclosure as the Arduino) be sure to use flexible wires. Otherwise it will be hard to close the case and the joints might break or other connections might come loose.
1-40 of 94Next »
nimmis1 year ago
@CyrilHaumont, could not get reply working, so here are the answer:

To make it work on newer IDE (>= 1.0) you need to replace all "Wprogram.h" and "Wconstants.h" with "Arduino.h"
I'm doing a new version of your guitar pedal. But i have just one problem, I can't find any Wprogram.h or Wconstants.h...
And i read all comments (randolfo's too), it seems nobody has this kind of problem ?
can it be from my version of arduino ide ?
I am trying to use your output, to modify Randolfo's design to make a effects processor for a microphone rather than an input. I am looking at your schematic and can't quite understand the notations.
If you please:
1. what does 256 x mean ( as opposed to r) ?
2. I tried to figure it out from your photo but some wires are overlapping. Looking at the photo kind of confused me, because the part that says it should be a 1K looks like a 12k in the photo.

I am only trying to work with your output.
The folder I downloaded is named "Arduino_Guitar_Pedal" including five files. There is not any GlitchPedal file. May you send me the link to the Glitchpedal code? I am doing something wrong..
Hi there,
I am about to start building this specific project but I would like to know how I am going to upload the code to my Arduino and make it run. Where can I find the GlitchPedal code and do I have to load more code (libraries) to run it? I am noobie as you understood.. Thanks a lot!!
kylemcdonald (author)  arduinolover2 years ago
there are no other libraries to run, just the GlitchPedal code. but i recommend you follow this new tutorial by randy
could someone tell me why the compiler tells me that analogWrite is not defined within scope?
I'm a total arduino/electronics noob, but I think that some of the function libraries got migrated to a new location in some core revision to the arduino libraries.

Basically, in dsp.cpp, replace

#include "WProgram.h"



And then make the same swap in timers.cpp with

#include "WConstants.h"

The code at least compiled for me. Of course I am still having problems with the actual build. All I'm getting is a very faint square wave buzz that modulates with knobc.

Why did I think this was going to be simple?
hey man! this looks truly awesome. any chance of a video or mp3? also, how would keyboards/synthesizers/drum machines work through this? sweet project!
kylemcdonald (author)  DJsoundestroyer3 years ago
check out the video on vimeo
nexekho3 years ago
I got the asynchronous analog read you discussed working, though not using interrupts but a standard loop. Vastly increases my sample rate. Ported the chorus/flanger to it.
nexekho3 years ago
Wrote a chorus!
Pot 1 is chorus speed. Define LINEARITY for experimental sine wave LFO using pot 2 to blend between linear or sine (it has problems) and pin 13 which has a LED on most devices will display the rate visually.
Works really nicely on low values, with a subtle flange on high values. Can also do many silly noises with the chorus set really fast.
nexekho nexekho3 years ago
Site note: buffers take up quite a bit of memory, might need to go mono for a Mega 168.
nexekho nexekho3 years ago
Sounds MUCH BETTER in mono due to higher sample rate.
nexekho nexekho3 years ago
Added a depth control that changes how far it sweeps. Very useful for getting good flange effects.
LukaR4 years ago
Is there a way to add an on/off switch to the circuit (like the one on the picture), making a stomp box out of this?
nexekho LukaR3 years ago
You can make a bypass with a SPDT which will select either the Arduino output or the guitar input, but it will likely "suck tone" and as such you will need a DPDT to isolate the Arduino input as well.
Yes it would be possible, in you can see a wiring diagram for these switches. It would have to be a DPDT or 3PDT.
Hope this helps:
kylemcdonald (author)  LukaR4 years ago
I don't usually make guitar pedals so I'm not familiar with the way that switch is wired. If it actually toggles between two sources, you just need to wire the "clean" input directly to one side of the switch, and the distorted output to the other.

On the other hand, if it is a momentary switch you'll need to wire it to an interrupt pin on the Arduino and modify the code to watch for that interrupt, not applying any effects when the toggle is on.

I'm sure there are also plenty of schematics out there for making toggle boxes with these switches, in which case you would just wire your clean signal to one input and the distorted signal to the other.
nexekho3 years ago
Hey, I just built one of these on perfboard, made a mistake on the inputs (biasing with A7 rather than 5V, will correct in the morning) and while almost everything works (the dials work, etc.) I can't get a sound wave out. If I just take a standard flashing light example script and tell it to whack a PWM to pin 3, it outputs a very loud square wave. Using your code, nothing is output. This is my first Arduino project. I'm using a Nano but it's a Mega328P Nano which should work right?
nexekho nexekho3 years ago
I've fixed it now. It was an issue with the timer registers. Thanks for the design.

I've attached some photos of my custom build.  Small size was a priority here so I built the output filters under the Arduino itself which was a fun challenge.
kylemcdonald (author)  nexekho3 years ago
wow! awesome, and congratulations on your first arduino project. glad everything worked out. your design is super compact, it looks great :)
Made some code changes and got it as good as it'll ever be in terms of sound cleanliness. Using 10-bit in, 16-bit out, and a prescale of 8.
(note: I'm using a POD as a preamp and distortion, the Arduino is just clean passthrough at the moment and then a Valvecaster post-amp before going into my PC's line in)
I'm finding that using a tone dial to roll off the highs makes a far cleaner sound.
nexekho nexekho3 years ago
(also note: I'm not being silly, I'm trying to output a 100Hz triangle wave using your code instead of passthroughing the input ;])
nexekho nexekho3 years ago
Also, the schematic describes a high-pass-filter for the output. Is that right? It feels like it should be low pass.
Or23 years ago
I'm new the the arduino scene, is Diecimila the same as Duemilanove ?
zoltzerino3 years ago
How crucial is the ratio between resistors R and 256R, the guy in the shop couldn't tell the difference between orange and brown so I have R = 1.5k and 256R = 190k...

Could I use my 190k and two 330R in series (R=660, 256R should equal (ish) 170R (but would be 190R)? Or is that not a close enough match?

I've checked all of my wiring and joints, guitar was on, amp was on, audio leads functional, used a chorus pedal to boost the input (you used a tuner).

Thanks in advance :-)
kylemcdonald (author)  zoltzerino3 years ago
using the two 190k resistors in series against the 1.5k gives a ratio of 253 which is totally acceptable. the resistor manufacturing tolerance will probably be the bigger error. good luck!
yesiam4 years ago
This looks great! I was wondering if this can be used with a synth or laptop audio. And if not, if it can be modified to do so..
kylemcdonald (author)  yesiam4 years ago
anything you can plug into a guitar pedal should work fine. and definitely laptop output, i primarily used my laptop for testing this while i developed it.
j03tv4 years ago
(removed by author or community request)
kylemcdonald (author)  DELETED_cdousley4 years ago
No, they're just giving you a value between 0 and 5V.
missingmax4 years ago
I see you used ceramic and electrolytic caps. Which one works better? 
Also, what would be the polarity if you used the electrolytics in your schematic?
kylemcdonald (author)  missingmax4 years ago
I didn't evaluate ceramic vs electrolytic for their "sound" really, so I can't say which one is "better". You'll have to try both out and let me know if you hear a difference!

I vaguely remember, on the outputs, the electrolytic caps facing the output. But again, you should try it both ways -- this was two years ago now and I have been writing a lot more code that making circuits since then :)
 Any chance you could post a picture with the other side of the perfboard circuit for the DAC? I'd like to have a go at this project but am having a little trouble with this stage.

Someone should make an audio input/output sheild for the Duemilanove with all the DAC on board for projects like this!
kylemcdonald (author)  loneguitarist4 years ago
Sorry, I don't have this pedal any more, I made it for a friend!

If I remember correctly, the perf board wasn't connected on the back and everything was manually soldered. So hopefully the diagrams/schematics on this page will explain anything missing from the pictures. The pictures were meant more as a layout guide for fitting the components in a smaller space.
jsd784 years ago
I was wondering what kind of preamp is necessary. I don't own a tuner that acts as a preamp (more like a filter). Is it possible to build a preamp that's not too difficult?
kylemcdonald (author)  jsd784 years ago
A preamp can be as simple as an opamp. But there are a ton of DIY guitar preamp designs, here's one of the first links that popped up on Google.
1-40 of 94Next »