3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Lo-fi Arduino Guitar Pedal

Step 4Normalize the Input and Output

Normalize the Input and Output
«
  • 2721186578_d4033b2390.jpg
  • schematic.gif
  • schematic.jpg
  • 2720361283_71272a0713.jpg

Input


This is the only real "trick" when it comes to the hardware for this system. Audio happens as an AC signal from -1 V to +1 V, but the analog inputs on the Arduino run from 0 V (Ground) to some positive voltage called the analog reference (5 V by default). You can specify this positive voltage in code or with an external reference.

Since -1 V to +1 V is a 2 V range, we'll choose something smaller than 2 V for our analog reference value. It turns out 1.1 V is specified as a built in internal reference, which works out nicely.

From here we have to normalize the -1 V to +1 V as 0 V to 1.1 V. I did this using a resistor in series followed by a voltage divider circuit. A guitar cannot directly drive this circuit, it needs a preamp (like another pedal) to drive it. I'm sure you could add a transistor or op-amp preamp to the perf board so you could plug into the pedal directly.

Output


For the output, we're going to be using PWM. With some low level hacks in software, you can get an 8-bit PWM running at 62kHz = 16 MHz / 28

There are some other methods for audio output on the Arduino. A good overview can be found at uC hobby. I got some great results from an R2R DAC, but considering it needs around 40 resistors for 10-bit stereo output, I decided against it. Instead I went with the weighted pins technique, which is kind of like a cross between standard PWM and a resistor ladder.

Building the Circuit


I built two of each circuit on one perf board. I had a ground strip down the center that helped for arranging things as neatly as possible. The first time I built the circuit, it was too tall and didn't fit in the enclosure, so I had to build it again.

When you have capacitors in series like this, they will cut off some of your low frequencies. WIth a 2.2 uF capacitor, it's low enough so it doesn't really affect sounds in our hearing range. The larger the value, the better; but capacitors tend to get physically larger as their value increases.
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Apr 26, 2010. 6:58 AMmissingmax says:
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?
Apr 20, 2010. 4:21 PMloneguitarist says:
 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!
Mar 11, 2010. 10:53 AMlarsby says:
Hi there,

love your work, I have one question about this though, the r1 on the in-part, what is it good for, why do you need it?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
111
Followers
6
Author:kylemcdonald