Amazon Cyber Monday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

DIY Programmable Looper Pedal: Build Your Own

Building your own programmable looper pedal is a rewarding project that gives you a fully functional effects pedal tailored to your needs, often for a fraction of the cost of a commercial unit. This guide walks you through creating a looper that can record, overdub, and play back loops with multiple presets, all controlled by footswitches. You’ll need basic soldering skills, comfort with Arduino programming, and a bit of patience. The result is a pedal that can store several loops and recall them with a tap, perfect for live looping or practice.

What You’ll Need

  • Arduino Nano or similar microcontroller (ATmega328P based)
  • Audio codec board (e.g., Adafruit I2S Audio Breakout, or a PCM5102 DAC and a separate ADC like the PCM1808)
  • MicroSD card module and a microSD card (for storing loop audio files)
  • 2 or 3 momentary footswitches (normally open)
  • 1/4″ instrument jacks (2 – one input, one output)
  • Enclosure (metal or sturdy plastic, sized to fit your components)
  • 9V DC power supply or battery clip with voltage regulator (5V)
  • Perfboard or PCB, wires, solder, soldering iron
  • Resistors (10kΩ for pull-downs, 100Ω for audio lines), capacitors (10µF, 100nF for decoupling)
  • Potentiometer (10kΩ) for volume control (optional)
  • LEDs (for status indication) and current-limiting resistors (220Ω)
  • Arduino IDE and USB cable for programming

As an Amazon Associate we earn from qualifying purchases.

Handy for this project: label maker (Amazon search)

Step-by-Step

  1. Design the circuit. Start by sketching a schematic. The audio input goes through a coupling capacitor (10µF) to the ADC input of the codec. The codec communicates with the Arduino via I2S (for audio data) and I2C (for control). The microSD module uses SPI. Each footswitch connects between a digital pin and ground, with a 10kΩ pull-up resistor to 5V (or use the internal pull-ups). The output from the DAC goes through a capacitor to the output jack. Plan the power: 9V in, regulated to 5V for the Arduino and codec.
  2. Prototype on a breadboard. Before soldering, build the circuit on a breadboard. Connect the Arduino, codec, SD module, and one footswitch. This lets you test the code and wiring without permanent connections.
  3. Install the required libraries. In the Arduino IDE, install the Adafruit Zero DMA Library (or the specific library for your codec), the SdFat library for SD card access, and the Adafruit I2S library. For the codec, you may need the Adafruit I2S Audio Library or a custom driver.
  4. Write the basic looper firmware. Start with a simple program that initializes the codec and SD card. Record audio from the ADC to a buffer in RAM (or directly to SD), then play it back. Use a footswitch to toggle between record and play. Test this before adding complexity.
  5. Implement loop storage. Instead of storing audio in RAM (which is limited), write audio data to a file on the SD card. Use a simple uncompressed format like 16-bit PCM at 44.1kHz. For each loop, create a new file. The Arduino writes incoming samples to the file during recording, then reads from the file during playback.
  6. Add overdub functionality. Modify the code to mix the live input with the existing playback during overdub mode. This requires reading the current sample from the file, adding the new input sample, and writing the sum back to the file (or to a new file). Be careful with clipping – scale the sum to avoid distortion.
  7. Implement multiple presets. Use a second footswitch to cycle through preset slots (e.g., 1-4). Each preset corresponds to a different set of loop files. When you select a preset, the looper loads the associated files. Store the current preset number in EEPROM so it persists after power-off.
  8. Add a status LED. Connect an LED to a digital pin. Use it to indicate recording (blinking), playback (solid), and overdub (double-blink). This helps you know the state during use.
  9. Test the prototype thoroughly. Connect a guitar or audio source to the input and headphones or an amp to the output. Test each feature: record, playback, overdub, preset switching, and power cycling. Make sure the audio is clean and free of pops or clicks.
  10. Transfer to perfboard/PCB. Once the prototype works, solder the components onto a perfboard or a custom PCB. Keep audio traces short and separate from digital lines to reduce noise. Use a ground plane if possible.
  11. Mount in enclosure. Drill holes for the jacks, footswitches, LED, and power jack. Secure the board inside the enclosure using standoffs. Wire the footswitches and jacks to the board. Ensure the enclosure is grounded to the circuit ground to reduce hum.
  12. Final test and calibration. After assembly, test again. Adjust the volume potentiometer if you added one. If the audio is too quiet or distorted, check the coupling capacitors and the codec’s gain settings in the code.

Common Mistakes

  • Incorrect wiring of the codec. Double-check the I2S and I2C pin connections. A swapped LRC or BCLK will result in silence or garbled audio.
  • SD card initialization failure. Ensure the SD card is formatted as FAT32 and the module’s CS pin is correctly defined. Also, use a 3.3V logic level shifter if your SD module is not 5V tolerant.
  • Audio clipping. When mixing signals in overdub, the sum can exceed the maximum value (32767 for 16-bit). Use a scaling factor (e.g., 0.8) to prevent clipping.
  • Footswitch debouncing. Mechanical switches bounce, causing multiple triggers. Implement debouncing in code (e.g., wait 50ms after a press) or use a hardware debounce circuit.
  • Power noise. A noisy power supply can introduce hum. Use a linear regulator with proper decoupling capacitors (100nF and 10µF) close to the ICs.

Tips

  • Use a stereo codec even if you only need mono. It gives you flexibility for future upgrades (e.g., stereo effects).
  • Add a bypass switch. A simple true bypass using a DPDT footswitch allows you to bypass the looper when not in use, preserving your guitar’s tone.
  • Label your footswitches. Use a label maker or engrave the enclosure to avoid confusion during live use.
  • Optimize SD card writes. Writing to SD in real-time can cause glitches if the card is slow. Use a high-speed card (Class 10) and buffer writes in RAM.
  • Consider a display. A small OLED or LCD can show the current preset and loop status, making the pedal more user-friendly.

Troubleshooting

  • No audio output. Check the codec’s power and ground. Verify that the I2S pins are correctly connected and that the codec is initialized in the code. Use an oscilloscope or logic analyzer to check the I2S signals.
  • Audio is distorted. Reduce the input gain in the codec’s registers. Also, check the coupling capacitors – if they are too small, low frequencies may be attenuated.
  • Loops are not saved. Ensure the SD card is properly formatted and that the file system is initialized. Check the CS pin and the SPI speed (try lowering it to 4MHz).
  • Footswitch does nothing. Verify the wiring – the switch should connect the pin to ground when pressed. Enable internal pull-ups in the code (pinMode(pin, INPUT_PULLUP)). Check for cold solder joints.
  • Random resets during operation. This is often due to power dips. Add a large capacitor (100µF) across the power rails and ensure the regulator can supply enough current (at least 500mA).
  • Pops and clicks when switching modes. Implement click-free switching by ramping the volume up/down over a few milliseconds in software, or by using a mute pin on the codec.

Frequently Asked Questions

  • How many loops can I store? It depends on the size of your SD card and the length of each loop. A 1GB card can hold roughly 2.5 hours of 16-bit/44.1kHz mono audio, so you can store many presets with typical loop lengths.
  • Can I use a Raspberry Pi instead of Arduino? Yes, but the programming and real-time audio handling are more complex. A Pi can handle higher quality and more effects, but the Arduino approach is simpler for a basic looper.
  • Do I need a special audio codec? Yes, the Arduino’s analog inputs are not fast enough for high-quality audio. An I2S codec like the PCM5102 (DAC) and PCM1808 (ADC) is necessary.
  • Can I add more than 3 footswitches? Absolutely. You can use more digital pins, but you’ll need to adjust the code and possibly use a multiplexer if you run out of pins.
  • Will this work with a bass guitar? Yes, as long as the input is not too hot. You may need to adjust the input gain in the codec to avoid distortion.
  • Is it possible to sync with other gear via MIDI? Yes, you can add a MIDI input using a serial port and implement MIDI clock sync in the firmware. This is an advanced modification but doable.
DIY Programmable Looper Pedal: Build Your Own
Scroll to top