Arduino Vocal Effects Box
by amandaghassaei in Circuits > Arduino
168925 Views, 513 Favorites, 0 Comments
Arduino Vocal Effects Box
![IMG_9977 copy.jpg](/proxy/?url=https://content.instructables.com/FVU/RGI1/H5Y9WAH7/FVURGI1H5Y9WAH7.jpg&filename=IMG_9977 copy.jpg)
![IMG_9975 copy.jpg](/proxy/?url=https://content.instructables.com/FFA/PGUL/H5Y9WAH5/FFAPGULH5Y9WAH5.jpg&filename=IMG_9975 copy.jpg)
![main pic.jpg](/proxy/?url=https://content.instructables.com/FQQ/L2QZ/H78T8PLD/FQQL2QZH78T8PLD.jpg&filename=main pic.jpg)
This Arduino-powered vocal effects box pitch shifts and distorts incoming audio signals to produce a wide variety of vocal effects. This project is my first experiment with real-time digital signal processing using Arduino. It samples an incoming microphone signal at a rate of about 40kHz, manipulates the audio digitally, and then outputs 8 bit audio at 40kHz. To minimize the amount of computation required by the Arduino, I used a technique called granular synthesis to manipulate the incoming audio signal. Essentially, as audio comes into the Arduino it gets cut up and stored as small (millisecond or microsecond sized) samples called "grains." These grains are then individually manipulated and played back; they may be lengthened or shortened, stretched or compressed, played back in reverse, copied several times, or mixed with other grains. You can hear a (somewhat creepy) audio sample from the effects box below:
Granular synthesis creates a unique type of distortion caused by discontinuities between individual grains in the outgoing signal. Sometimes this distortion creates an effect I can only describe as a "ripping" sound, other times it introduces new frequencies into the audio that were not present before. Here is an example by Aphex Twin, the granular synthesis is especially prominent in the bridge at around 3min in. Another example of granular synthesis, this time applied to vocals for pitch shifting and textural effects, is from Paul Lansky. My favorite thing to do with this effects box is to use subtle pitch shifting to achieve an androgynous vocal sound, I got the idea for the project after listening to copious amounts of Fever Ray this past winter, you can hear how she pitch shifts her voice to sound somewhat masculine at times.
PARTS LIST
(1x) Arduino Uno REV 3 Radioshack 276-128
(7x) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(9x) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(1x) 1K Ohm 1/4-Watt Carbon Film Resistor Radioshack 271-1321
(1x) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(1x) 10KOhm Audio Control Potentiometer with SPST Switch Radioshack #271-215 (this will be used to control volume and turn the device on/off)
(5x) 0.25" Knurled Knob Radioshack 274-424
(2x) 9V Alkaline Battery Radioshack #23-866
(2x) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(1x) PC Board with Copper Radioshack #276-147
(1x) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(2x) Male Header Pins Jameco 103393
(3x) 8 pin socket Radioshack 276-1995
(1x) TL082 Wide Dual JFET Input Op Amp Radioshack 276-1715
(3x) 100K Ohm 1/4-Watt Carbon Film Resistor (1 package) Radioshack 271-1347
(1x) 10uF electrolytic capacitor
(1x) 47nF capacitor
(3x) 0.1uf capacitor Radioshack 55047557
(2x) 1M-Ohm Linear Taper Potentiometer Radioshack 271-211
(1x) 1MOhm logarithmic potentiometer
(1x) 2kOhm 1/4-Watt Carbon Film Resistor
(1x) male header pins Jameco 103393
(1x) 10K-Ohm Linear-Taper Potentiometer Radioshack 271-1715
(1x) DPDT Flatted Metal Lever Toggle Switch Radioshack 275-636
(2x) 1/4" stereo jack Radioshack 274-141 or Radioshack 274-312
(2x) 5mm High-Brightness White LED (1 package) Radioshack 276-017
(2x) 100 ohm 1/4W 5% Carbon Film Resistor Radioshack 271-1311
(2x) TS922IN Dual Op Amp Digikey 497-3049-5-ND (one TS924 would also work, but they are not available on digikey at the moment)
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
Download Arduino IDE
Schematic
![audioschematic.jpg](/proxy/?url=https://content.instructables.com/F5U/3U30/H63P41MC/F5U3U30H63P41MC.jpg&filename=audioschematic.jpg)
![microphoneschem.jpg](/proxy/?url=https://content.instructables.com/F1Y/QKUS/H5ED98L9/F1YQKUSH5ED98L9.jpg&filename=microphoneschem.jpg)
![controls schem.jpg](/proxy/?url=https://content.instructables.com/F49/BQUA/H5TVBEDH/F49BQUAH5TVBEDH.jpg&filename=controls schem.jpg)
The first schematic shows the audio out circuit. This project outputs audio through an 8 bit R2R digital to analog converter through Arduino digital pins 0-7. This signal is sent through an amplifier, a low pass filter, and a volume control pot before being sent out to speakers.
The second schematic shows the mic input circuit. The line in the from the mic is sent through an amplifier and a DC offset circuit before being sent into the Arduino via analog input pin A0.
The third schematic shows how all the controls of the effects box are connected to the Arduino. There are two LED indicators in this project: one clipping indicator and one output indicator. Three pots on the device control grain size, pitch, and wet/dry mix and a switch controls the direction of sample playback (forward or reverse).
Header Pins
![IMG_5509 copy.jpg](/proxy/?url=https://content.instructables.com/FTF/RUL0/H337JN8Z/FTFRUL0H337JN8Z.jpg&filename=IMG_5509 copy.jpg)
![IMG_5508 copy.jpg](/proxy/?url=https://content.instructables.com/F29/9I7U/H337JN8Y/F299I7UH337JN8Y.jpg&filename=IMG_5508 copy.jpg)
![IMG_5506 copy.jpg](/proxy/?url=https://content.instructables.com/FC0/D9IL/H347FEBD/FC0D9ILH347FEBD.jpg&filename=IMG_5506 copy.jpg)
![IMG_3852 copy.jpg](/proxy/?url=https://content.instructables.com/F1B/T38R/H27CB465/F1BT38RH27CB465.jpg&filename=IMG_3852 copy.jpg)
DAC: Part 1
![IMG_5511 copy.jpg](/proxy/?url=https://content.instructables.com/FHD/9WAK/H2WEQGEH/FHD9WAKH2WEQGEH.jpg&filename=IMG_5511 copy.jpg)
![IMG_5513 copy.jpg](/proxy/?url=https://content.instructables.com/FZC/A1HC/H337JN96/FZCA1HCH337JN96.jpg&filename=IMG_5513 copy.jpg)
DAC: Part 2
![IMG_5517 copy.jpg](/proxy/?url=https://content.instructables.com/FO8/XVFM/H347FG3X/FO8XVFMH347FG3X.jpg&filename=IMG_5517 copy.jpg)
![IMG_5518 copy.jpg](/proxy/?url=https://content.instructables.com/FM5/ZLFR/H2WET306/FM5ZLFRH2WET306.jpg&filename=IMG_5518 copy.jpg)
![IMG_5505 copy.jpg](/proxy/?url=https://content.instructables.com/FB3/E491/H337JMZ2/FB3E491H337JMZ2.jpg&filename=IMG_5505 copy.jpg)
DAC: Part 3
![IMG_5520 copy.jpg](/proxy/?url=https://content.instructables.com/FAL/P9EO/H337JN9F/FALP9EOH337JN9F.jpg&filename=IMG_5520 copy.jpg)
![IMG_5521 copy.jpg](/proxy/?url=https://content.instructables.com/FBB/KP59/H2WEWLS2/FBBKP59H2WEWLS2.jpg&filename=IMG_5521 copy.jpg)
Test DAC
![sine.jpg](/proxy/?url=https://content.instructables.com/FYY/B8JH/H4AGKE5L/FYYB8JHH4AGKE5L.jpg&filename=sine.jpg)
![audioschematic.jpg](/proxy/?url=https://content.instructables.com/F5U/3U30/H63P41MC/F5U3U30H63P41MC.jpg&filename=audioschematic.jpg)
Some info about the code- basically what I've done here is set up a timer interrupt that increments the variable t at a frequency of 40kHz. Once t reaches 627 it resets back to zero (this happens with a frequency of 40,000/628 = 63Hz). Meanwhile, in the main loop the Arduino sends a value between 0 (00000000 in binary) and 255 (11111111 in binary) to digital pins 0 through 7 (PORTD). It calculates this value with the following equation:
PORTD=byte(127+127*sin(2*t/100));
So as t increments from 0 to 627 the sine function moves through one complete cycle. The value sent to PORTD is a sine wave with frequency 63Hz and amplitude 127, oscillating around 127. The DAC translates this to a voltage between 0 and 5V, where a 0 sent to PORTD equals 0V and a 255 sent to PORTD equals 5V.
8 Pin Socket and Buffer
![IMG_0055 copy.jpg](/proxy/?url=https://content.instructables.com/FID/5JM7/H4AGKUUU/FID5JM7H4AGKUUU.jpg&filename=IMG_0055 copy.jpg)
![IMG_0056 copy.jpg](/proxy/?url=https://content.instructables.com/F6K/0ZRF/H4I7W02F/F6K0ZRFH4I7W02F.jpg&filename=IMG_0056 copy.jpg)
Wire Up Pot
![IMG_0057 copy.jpg](/proxy/?url=https://content.instructables.com/FKG/QUFG/H4AG09SU/FKGQUFGH4AG09SU.jpg&filename=IMG_0057 copy.jpg)
![IMG_0059 copy.jpg](/proxy/?url=https://content.instructables.com/FOB/UT75/H4AG09SV/FOBUT75H4AG09SV.jpg&filename=IMG_0059 copy.jpg)
![IMG_3410 copy.jpg](/proxy/?url=https://content.instructables.com/F67/HU17/H4AGKVL6/F67HU17H4AGKVL6.jpg&filename=IMG_3410 copy.jpg)
Second 8 Pin Socket
![IMG_0061 copy.jpg](/proxy/?url=https://content.instructables.com/FKS/ZWQW/H4I7W02G/FKSZWQWH4I7W02G.jpg&filename=IMG_0061 copy.jpg)
![IMG_0063 copy.jpg](/proxy/?url=https://content.instructables.com/F1U/EWDU/H4AG9H4E/F1UEWDUH4AG9H4E.jpg&filename=IMG_0063 copy.jpg)
Voltage Divider
![IMG_0064 copy.jpg](/proxy/?url=https://content.instructables.com/FHV/4HM9/H4AGM44O/FHV4HM9H4AGM44O.jpg&filename=IMG_0064 copy.jpg)
![IMG_0066 copy.jpg](/proxy/?url=https://content.instructables.com/F8Q/CC52/H4AGKUVT/F8QCC52H4AGKUVT.jpg&filename=IMG_0066 copy.jpg)
![audioschematic.jpg](/proxy/?url=https://content.instructables.com/F5U/3U30/H63P41MC/F5U3U30H63P41MC.jpg&filename=audioschematic.jpg)
If you are planning to send the output out as line level into another effects module or amplifier, then do not add this voltage divider.
RC Low Pass Filter
![IMG_0081 copy.jpg](/proxy/?url=https://content.instructables.com/FDQ/BBPO/H4AGM54W/FDQBBPOH4AGM54W.jpg&filename=IMG_0081 copy.jpg)
![IMG_0083 copy.jpg](/proxy/?url=https://content.instructables.com/FKJ/GW3Z/H4UZYZ7M/FKJGW3ZH4UZYZ7M.jpg&filename=IMG_0083 copy.jpg)
Nyquist's Theroum states that for a sampling rate of x Hz, the highest frequency that can be produced is x/2 Hz. So if you have a sampling rate of 40kHz (standard for most audio), then the maximum frequency you can reproduce is 20kHz (the upper limit of the audible spectrum).
By using a low pass filter on the signal with a cutoff frequency of 20kHz, you can smooth out the "steps" in your waveform while keeping the overall shape of the waveform intact. I used a simple RC flow pass filter to achieve this: a resistor and a capacitor in series to ground. Connect the resistor to the incoming signal and the capacitor to ground, the signal from the junction between these two components will be low pass filtered.
You can calculate the values of the capacitor and resistor you need for a low pass filter according to the following equation:
cutoff frequency = 1/ (2*pi*R*C)
so for a cutoff frequency of 20,000Hz and 1kOhm resistor:
20000=1/(2*3.14*1000*C)
C =~ 8nF
Since 8nF capacitors are hard to come by I rounded up to 0.01uF. This gives a cutoff frequency of about 16kHz. You can mess around with different values and see what you like best, I tend to like heavier filtering bc it removes more unwanted noise.
Solder a 1kOhm resistor to the junction from the voltage divider from the last step (if you did not include the voltage divider, solder straight to pin 7). Solder a 0.01uF capacitor in series with this resistor to ground. Solder a wire from the junction between the capacitor and resistor to pin 5 of the second socket.
More Buffering
![IMG_0085 copy.jpg](/proxy/?url=https://content.instructables.com/FMG/4BAX/H4V01261/FMG4BAXH4V01261.jpg&filename=IMG_0085 copy.jpg)
![IMG_0086 copy.jpg](/proxy/?url=https://content.instructables.com/FDK/3PKK/H4UZI96F/FDK3PKKH4UZI96F.jpg&filename=IMG_0086 copy.jpg)
Solder a wire between the two non-inveting inputs of the op amps (pins 5 and 3 of the second socket). Solder another wire between the two outputs (pins 1 and 7 of the second socket). On the underside of the board solder the inverting inputs to their outputs (fig 2).
DC Offset
![IMG_0087 copy.jpg](/proxy/?url=https://content.instructables.com/FA2/4LD9/H4UZV7PD/FA24LD9H4UZV7PD.jpg&filename=IMG_0087 copy.jpg)
![IMG_0090 copy.jpg](/proxy/?url=https://content.instructables.com/F4C/HRSQ/H4UZETFO/F4CHRSQH4UZETFO.jpg&filename=IMG_0090 copy.jpg)
Solder the - end of a 100uF (or higher) capacitor to the output of the second op amp. The signal coming from the + end of the capacitor will be DC offset to oscillated around 0V.
Audio Jack
![IMG_0091 copy.jpg](/proxy/?url=https://content.instructables.com/F93/MLB9/H4UZR7UF/F93MLB9H4UZR7UF.jpg&filename=IMG_0091 copy.jpg)
![IMG_2023.JPG](/proxy/?url=https://content.instructables.com/FYR/EDJV/H0KL4FHY/FYREDJVH0KL4FHY.jpg&filename=IMG_2023.JPG)
![IMG_2024.JPG](/proxy/?url=https://content.instructables.com/FAC/OUI4/H0KR942R/FACOUI4H0KR942R.jpg&filename=IMG_2024.JPG)
![IMG_5576 copy.jpg](/proxy/?url=https://content.instructables.com/F9G/Y07P/H2WEWNAS/F9GY07PH2WEWNAS.jpg&filename=IMG_5576 copy.jpg)
![IMG_5581 copy.jpg](/proxy/?url=https://content.instructables.com/F6O/QZFG/H2WEJX27/F6OQZFGH2WEJX27.jpg&filename=IMG_5581 copy.jpg)
![IMG_5583 copy.jpg](/proxy/?url=https://content.instructables.com/FC7/CORI/H2WERM32/FC7CORIH2WERM32.jpg&filename=IMG_5583 copy.jpg)
![audioschematic.jpg](/proxy/?url=https://content.instructables.com/F5U/3U30/H63P41MC/F5U3U30H63P41MC.jpg&filename=audioschematic.jpg)
Use hot glue to add some structural support to these connections and prevent short circuits. Solder the green wire to the + end of the 100uF capacitor and solder the black wire to ground.
Microphone Circuit
![microphoneschem.jpg](/proxy/?url=https://content.instructables.com/F1Y/QKUS/H5ED98L9/F1YQKUSH5ED98L9.jpg&filename=microphoneschem.jpg)
![IMG_2376 copy.jpg](/proxy/?url=https://content.instructables.com/F9J/T83Y/H5Y9W70T/F9JT83YH5Y9W70T.jpg&filename=IMG_2376 copy.jpg)
![IMG_2381 copy.jpg](/proxy/?url=https://content.instructables.com/FLF/0AZ7/H5Y9W70V/FLF0AZ7H5Y9W70V.jpg&filename=IMG_2381 copy.jpg)
![IMG_2397 copy.jpg](/proxy/?url=https://content.instructables.com/FHQ/ZH99/H63P42CM/FHQZH99H63P42CM.jpg&filename=IMG_2397 copy.jpg)
Fig 3 shows the same microphone signal after amplification, you can see how the height of the peaks has increased so that the wave oscillates between -2.5 and 2.5 V (amplitude of 2.5V). Fig 4 shows the signal after it has been DC offset; it still has an amplitude of 2.5V, but the center point is 2.5V instead of 0V, so the wave never drops down below 0V. (Note- the slight change in shape between the signals in figure 3 and 4 is dues to changes in my voice between the two pics, it has nothing to do with the circuit). The signal in fig 4 is ready to go to an Arduino analog input pin.
Batteries
![IMG_2309 copy.jpg](/proxy/?url=https://content.instructables.com/F4C/NWE4/H4VQ6KJZ/F4CNWE4H4VQ6KJZ.jpg&filename=IMG_2309 copy.jpg)
![IMG_2310 copy.jpg](/proxy/?url=https://content.instructables.com/FWR/R5JU/H4VQO60S/FWRR5JUH4VQO60S.jpg&filename=IMG_2310 copy.jpg)
![IMG_2311 copy.jpg](/proxy/?url=https://content.instructables.com/FUN/504L/H5405PI1/FUN504LH5405PI1.jpg&filename=IMG_2311 copy.jpg)
![IMG_2312 copy.jpg](/proxy/?url=https://content.instructables.com/FED/SZVQ/H4VQ6KK0/FEDSZVQH4VQ6KK0.jpg&filename=IMG_2312 copy.jpg)
![IMG_2313 copy.jpg](/proxy/?url=https://content.instructables.com/FKR/S34I/H54088YD/FKRS34IH54088YD.jpg&filename=IMG_2313 copy.jpg)
![IMG_2315 copy.jpg](/proxy/?url=https://content.instructables.com/F3Q/R0NF/H54088YE/F3QR0NFH54088YE.jpg&filename=IMG_2315 copy.jpg)
![IMG_2316 copy.jpg](/proxy/?url=https://content.instructables.com/FCK/5QDA/H4VQDOJY/FCK5QDAH4VQDOJY.jpg&filename=IMG_2316 copy.jpg)
Amplifier Socket and Power
![IMG_2322 copy.jpg](/proxy/?url=https://content.instructables.com/FA9/9FZQ/H5405PJH/FA99FZQH5405PJH.jpg&filename=IMG_2322 copy.jpg)
![IMG_2324 copy.jpg](/proxy/?url=https://content.instructables.com/FAW/5J7R/H540890I/FAW5J7RH540890I.jpg&filename=IMG_2324 copy.jpg)
![IMG_2325 copy.jpg](/proxy/?url=https://content.instructables.com/FDJ/DPCK/H4VQDOK4/FDJDPCKH4VQDOK4.jpg&filename=IMG_2325 copy.jpg)
![IMG_2326 copy.jpg](/proxy/?url=https://content.instructables.com/FIJ/97YJ/H4VQDOK5/FIJ97YJH4VQDOK5.jpg&filename=IMG_2326 copy.jpg)
![IMG_2328 copy.jpg](/proxy/?url=https://content.instructables.com/FKM/PKM2/H5405PKK/FKMPKM2H5405PKK.jpg&filename=IMG_2328 copy.jpg)
![IMG_2329 copy.jpg](/proxy/?url=https://content.instructables.com/FBY/98TD/H540890T/FBY98TDH540890T.jpg&filename=IMG_2329 copy.jpg)
![IMG_2327 copy.jpg](/proxy/?url=https://content.instructables.com/F8J/OX3H/H540890S/F8JOX3HH540890S.jpg&filename=IMG_2327 copy.jpg)
![IMG_2334 copy.jpg](/proxy/?url=https://content.instructables.com/FFL/AZYS/H5405PR9/FFLAZYSH5405PR9.jpg&filename=IMG_2334 copy.jpg)
![IMG_2339 copy.jpg](/proxy/?url=https://content.instructables.com/FR7/L1EG/H5408963/FR7L1EGH5408963.jpg&filename=IMG_2339 copy.jpg)
![Screen shot 2012-07-26 at 4.28.10 PM.png](/proxy/?url=https://content.instructables.com/FA2/D6BM/H52FWYPC/FA2D6BMH52FWYPC.png&filename=Screen shot 2012-07-26 at 4.28.10 PM.png)
Microphone Input
![IMG_2275.jpg](/proxy/?url=https://content.instructables.com/F3P/L4VO/H4ZN5G4K/F3PL4VOH4ZN5G4K.jpg&filename=IMG_2275.jpg)
![IMG_2276 copy.jpg](/proxy/?url=https://content.instructables.com/FRJ/OFA8/H4ZN5G4L/FRJOFA8H4ZN5G4L.jpg&filename=IMG_2276 copy.jpg)
![IMG_2278.jpg](/proxy/?url=https://content.instructables.com/FIR/ND7F/H5035LJ4/FIRND7FH5035LJ4.jpg&filename=IMG_2278.jpg)
![IMG_2277.jpg](/proxy/?url=https://content.instructables.com/FHM/77WX/H4VQ6F31/FHM77WXH4VQ6F31.jpg&filename=IMG_2277.jpg)
![IMG_2279 copy.jpg](/proxy/?url=https://content.instructables.com/F0E/Y1PF/H51ASOMN/F0EY1PFH51ASOMN.jpg&filename=IMG_2279 copy.jpg)
![IMG_2280.jpg](/proxy/?url=https://content.instructables.com/FR9/RN9C/H4ZN5G4M/FR9RN9CH4ZN5G4M.jpg&filename=IMG_2280.jpg)
![IMG_2281.jpg](/proxy/?url=https://content.instructables.com/FYD/A5ZV/H4VQNX5S/FYDA5ZVH4VQNX5S.jpg&filename=IMG_2281.jpg)
![IMG_2340 copy.jpg](/proxy/?url=https://content.instructables.com/F6X/P1L1/H4VQKQNQ/F6XP1L1H4VQKQNQ.jpg&filename=IMG_2340 copy.jpg)
Non-inverting Amplifier: Part 1
![IMG_2342 copy.jpg](/proxy/?url=https://content.instructables.com/FGD/MABZ/H4VQ6KKT/FGDMABZH4VQ6KKT.jpg&filename=IMG_2342 copy.jpg)
Non-inverting Amplifier: Part 1
![IMG_2348 copy.jpg](/proxy/?url=https://content.instructables.com/F01/3TPE/H540896L/F013TPEH540896L.jpg&filename=IMG_2348 copy.jpg)
![IMG_2350 copy.jpg](/proxy/?url=https://content.instructables.com/FW7/FLCS/H4VQO6AL/FW7FLCSH4VQO6AL.jpg&filename=IMG_2350 copy.jpg)
![IMG_2349 copy.jpg](/proxy/?url=https://content.instructables.com/FOR/1YQL/H52FWYR3/FOR1YQLH52FWYR3.jpg&filename=IMG_2349 copy.jpg)
Non-inverting Amplifier: Part 2
![IMG_2352 copy.jpg](/proxy/?url=https://content.instructables.com/F7Y/RXNE/H4VQDOLB/F7YRXNEH4VQDOLB.jpg&filename=IMG_2352 copy.jpg)
![IMG_2353 copy.jpg](/proxy/?url=https://content.instructables.com/FWB/5H9P/H4VQKQUU/FWB5H9PH4VQKQUU.jpg&filename=IMG_2353 copy.jpg)
DC Offset: Part 1
![IMG_2356 copy.jpg](/proxy/?url=https://content.instructables.com/FDT/CV1T/H4VQKQUV/FDTCV1TH4VQKQUV.jpg&filename=IMG_2356 copy.jpg)
![IMG_2357 copy.jpg](/proxy/?url=https://content.instructables.com/FKT/35N1/H5035MTI/FKT35N1H5035MTI.jpg&filename=IMG_2357 copy.jpg)
DC Offset: Part 2
![IMG_2358 copy.jpg](/proxy/?url=https://content.instructables.com/FZQ/821R/H54089AO/FZQ821RH54089AO.jpg&filename=IMG_2358 copy.jpg)
![IMG_2359 copy.jpg](/proxy/?url=https://content.instructables.com/FFK/U4D3/H4VQDOMK/FFKU4D3H4VQDOMK.jpg&filename=IMG_2359 copy.jpg)
DC Offset: Part 3
![IMG_2360 copy.jpg](/proxy/?url=https://content.instructables.com/FJO/9OFL/H4VQDOMM/FJO9OFLH4VQDOMM.jpg&filename=IMG_2360 copy.jpg)
![IMG_2361 copy.jpg](/proxy/?url=https://content.instructables.com/F5M/H3CV/H54089HZ/F5MH3CVH54089HZ.jpg&filename=IMG_2361 copy.jpg)
![IMG_2362 copy.jpg](/proxy/?url=https://content.instructables.com/FZD/3BYP/H5405RH3/FZD3BYPH5405RH3.jpg&filename=IMG_2362 copy.jpg)
![IMG_2363 copy.jpg](/proxy/?url=https://content.instructables.com/FMF/5X4F/H54089I3/FMF5X4FH54089I3.jpg&filename=IMG_2363 copy.jpg)
Connect to Analog Input
![IMG_2364 copy.jpg](/proxy/?url=https://content.instructables.com/F86/G3EO/H5405RH6/F86G3EOH5405RH6.jpg&filename=IMG_2364 copy.jpg)
![IMG_2365 copy.jpg](/proxy/?url=https://content.instructables.com/FG3/LRPD/H5405RHB/FG3LRPDH5405RHB.jpg&filename=IMG_2365 copy.jpg)
Simple Audio Out
![IMG_2412 copy.jpg](/proxy/?url=https://content.instructables.com/FZA/PA9E/H5ENPY1T/FZAPA9EH5ENPY1T.jpg&filename=IMG_2412 copy.jpg)
![IMG_2413 copy.jpg](/proxy/?url=https://content.instructables.com/FET/QB3I/H5E9JRXO/FETQB3IH5E9JRXO.jpg&filename=IMG_2413 copy.jpg)
![IMG_2414 copy.jpg](/proxy/?url=https://content.instructables.com/FCQ/ZBVM/H5E9Q518/FCQZBVMH5E9Q518.jpg&filename=IMG_2414 copy.jpg)
![IMG_2416 copy.jpg](/proxy/?url=https://content.instructables.com/FV9/P0YI/H5E9Q519/FV9P0YIH5E9Q519.jpg&filename=IMG_2416 copy.jpg)
![IMG_2406 copy.jpg](/proxy/?url=https://content.instructables.com/FKP/WAB1/H5F2Z2O8/FKPWAB1H5F2Z2O8.jpg&filename=IMG_2406 copy.jpg)
![IMG_2410 copyjpg.jpg](/proxy/?url=https://content.instructables.com/F2Z/F0FA/H5ENPY1S/F2ZF0FAH5ENPY1S.jpg&filename=IMG_2410 copyjpg.jpg)
![IMG_2417 copy.jpg](/proxy/?url=https://content.instructables.com/FAA/FRK5/H5F2Z2OA/FAAFRK5H5F2Z2OA.jpg&filename=IMG_2417 copy.jpg)
![IMG_2418 copy.jpg](/proxy/?url=https://content.instructables.com/FJQ/BXFK/H5ED7OIV/FJQBXFKH5ED7OIV.jpg&filename=IMG_2418 copy.jpg)
![Screen shot 2012-07-27 at 12.42.24 PM.png](/proxy/?url=https://content.instructables.com/FJ3/G0GY/H4VQDQ20/FJ3G0GYH4VQDQ20.png&filename=Screen shot 2012-07-27 at 12.42.24 PM.png)
In the code below I triggered the output to the DAC via the ADC interrupt. This interrupt is similar to other Arduino timer interrupts, but it only executed when a new ADC value has been reached (in this case at a rate of ~38.5kHz, or every 26us). The output of the code below is exactly the same as the code above, but it will be more convenient to use the interrupt code moving forward.
Half Frequency Playback
![IMG_2424 copy.jpg](/proxy/?url=https://content.instructables.com/FEB/T3H3/H5F2Z2OQ/FEBT3H3H5F2Z2OQ.jpg&filename=IMG_2424 copy.jpg)
RC Potentiometers
![IMG_2458 copy.jpg](/proxy/?url=https://content.instructables.com/F3Y/LNWJ/H5TU7BR8/F3YLNWJH5TU7BR8.jpg&filename=IMG_2458 copy.jpg)
![IMG_2460 copy.jpg](/proxy/?url=https://content.instructables.com/FAW/8IJL/H5TU8K93/FAW8IJLH5TU8K93.jpg&filename=IMG_2460 copy.jpg)
![IMG_2463 copy.jpg](/proxy/?url=https://content.instructables.com/F8Q/YFW8/H5TU9QYB/F8QYFW8H5TU9QYB.jpg&filename=IMG_2463 copy.jpg)
![IMG_2464 copy.jpg](/proxy/?url=https://content.instructables.com/FRS/8WL2/H5TUCEQP/FRS8WL2H5TUCEQP.jpg&filename=IMG_2464 copy.jpg)
![IMG_2465 copy.jpg](/proxy/?url=https://content.instructables.com/FDM/782R/H5TUCEQS/FDM782RH5TUCEQS.jpg&filename=IMG_2465 copy.jpg)
![IMG_2466 copy.jpg](/proxy/?url=https://content.instructables.com/FJ4/PDJJ/H5ED8H5O/FJ4PDJJH5ED8H5O.jpg&filename=IMG_2466 copy.jpg)
![IMG_2467 copy.jpg](/proxy/?url=https://content.instructables.com/F90/25X2/H5TU7BR9/F9025X2H5TU7BR9.jpg&filename=IMG_2467 copy.jpg)
![IMG_2686 copy.jpg](/proxy/?url=https://content.instructables.com/FAD/QA7J/H5TUCDTZ/FADQA7JH5TUCDTZ.jpg&filename=IMG_2686 copy.jpg)
Solder a row to header pins to digital pins 9-13. Solder a 10kOhm resistor and 0.1uF capacitor in series to pins 10-12. Solder the free end of the 0.1uF capacitors together and connect to Arduino +5V. Connect the outside pin of two 1mOhm linear taper pots to the junction between the resistor and capacitor attached to digital pins 11 and 12. Connect the outside pin of a 1mOhm logarithmic taper pot to the junction between the resistor and capacitor attached to digital pin 10. Solder the middle pins of each pot to ground.
I you'd like you can increase the resolution of any of these controls by increasing the capacitance of the 0.1uF cap to 1uF or 10uF. This change will have to be accounted for in the final firmware as well.
Switch
![IMG_1976.JPG](/proxy/?url=https://content.instructables.com/FEJ/LPL9/H0KL4F69/FEJLPL9H0KL4F69.jpg&filename=IMG_1976.JPG)
Indicator LEDs
![IMG_2534 copy.jpg](/proxy/?url=https://content.instructables.com/F0W/HTT4/H5IRUMDF/F0WHTT4H5IRUMDF.jpg&filename=IMG_2534 copy.jpg)
![IMG_2537 copy.jpg](/proxy/?url=https://content.instructables.com/F2M/U4QT/H5IRUMDG/F2MU4QTH5IRUMDG.jpg&filename=IMG_2537 copy.jpg)
Output Switch
![IMG_2681 copy.jpg](/proxy/?url=https://content.instructables.com/FCS/C9TK/H5EDUW7D/FCSC9TKH5EDUW7D.jpg&filename=IMG_2681 copy.jpg)
![IMG_2683 copy.jpg](/proxy/?url=https://content.instructables.com/FAW/P1HJ/H5TUCDTN/FAWP1HJH5TUCDTN.jpg&filename=IMG_2683 copy.jpg)
![IMG_2534 copy.jpg](/proxy/?url=https://content.instructables.com/F0W/HTT4/H5IRUMDF/F0WHTT4H5IRUMDF.jpg&filename=IMG_2534 copy.jpg)
![IMG_2537 copy.jpg](/proxy/?url=https://content.instructables.com/F2M/U4QT/H5IRUMDG/F2MU4QTH5IRUMDG.jpg&filename=IMG_2537 copy.jpg)
Enclosure
![IMG_2628 copy.jpg](/proxy/?url=https://content.instructables.com/FTH/5D0V/H5TVASA3/FTH5D0VH5TVASA3.jpg&filename=IMG_2628 copy.jpg)
![IMG_2672 copy.jpg](/proxy/?url=https://content.instructables.com/FE7/JQ67/H5TU9QAQ/FE7JQ67H5TU9QAQ.jpg&filename=IMG_2672 copy.jpg)
![IMG_2669 copy.jpg](/proxy/?url=https://content.instructables.com/FOW/SFLS/H5TU8K88/FOWSFLSH5TU8K88.jpg&filename=IMG_2669 copy.jpg)
![IMG_2675 copy.jpg](/proxy/?url=https://content.instructables.com/F8I/0W2N/H5EDUW76/F8I0W2NH5EDUW76.jpg&filename=IMG_2675 copy.jpg)
![IMG_2677 copy.jpg](/proxy/?url=https://content.instructables.com/FR1/HH6W/H5TU9QB8/FR1HH6WH5TU9QB8.jpg&filename=IMG_2677 copy.jpg)
![IMG_2680 copy.jpg](/proxy/?url=https://content.instructables.com/FR4/TVXF/H5TU9QBK/FR4TVXFH5TU9QBK.jpg&filename=IMG_2680 copy.jpg)
![IMG_2689 copy.jpg](/proxy/?url=https://content.instructables.com/FTV/2RGO/H5TUCDVN/FTV2RGOH5TUCDVN.jpg&filename=IMG_2689 copy.jpg)
![IMG_2687 copy.jpg](/proxy/?url=https://content.instructables.com/FIQ/KMQ6/H5TUCDVG/FIQKMQ6H5TUCDVG.jpg&filename=IMG_2687 copy.jpg)
![IMG_2688 copy.jpg](/proxy/?url=https://content.instructables.com/FTY/LNXJ/H5TUCDVM/FTYLNXJH5TUCDVM.jpg&filename=IMG_2688 copy.jpg)
![IMG_2690 copy.jpg](/proxy/?url=https://content.instructables.com/FFK/CPK7/H5TU9QCA/FFKCPK7H5TU9QCA.jpg&filename=IMG_2690 copy.jpg)
![IMG_2693 copy.jpg](/proxy/?url=https://content.instructables.com/F75/IAOO/H5TUCDWA/F75IAOOH5TUCDWA.jpg&filename=IMG_2693 copy.jpg)
![Screen shot 2012-08-14 at 3.45.37 PM.png](/proxy/?url=https://content.instructables.com/F0S/FS08/H5TUCEGC/F0SFS08H5TUCEGC.png&filename=Screen shot 2012-08-14 at 3.45.37 PM.png)
I coated the plywood in three coats of polycrylic and glued the sides together with wood glue. I glued three small triangular pieces into the corners of the enclosure so that I could screw the back panel on with wood screws (fig 3).
Attach the Arduino to the header pins on the protoboard and begin installing the components in the enclosure. I started by attaching the pots and switches to the front panel and then added the jacks, LED indicators, and pots to the sides. Finally I pushed the arduino's usb port through the square hole on the bottom of the enclosure. My arduino sat firmly in place, you could screw it to the back panel for an extra secure fit.
I've attaches the corel file for the enclosure that I built.
Downloads
Batteries
![IMG_2692 copy.jpg](/proxy/?url=https://content.instructables.com/F0G/4MXU/H5TUCDW7/F0G4MXUH5TUCDW7.jpg&filename=IMG_2692 copy.jpg)
Knobs
![IMG_9975 copy.jpg](/proxy/?url=https://content.instructables.com/FFA/PGUL/H5Y9WAH5/FFAPGULH5Y9WAH5.jpg&filename=IMG_9975 copy.jpg)
Final Firmware
![arduino_logo1.png](/proxy/?url=https://content.instructables.com/FQ7/0QYH/H2MYKNK9/FQ70QYHH2MYKNK9.png&filename=arduino_logo1.png)