Digital Signal Processing: The Arduino DUE Guitar Pedal
Introduction
PedalSHIELD DUE is a programmable Arduino Open Source and Open Hardware guitar pedal made for guitarists, hackers and programmers. Users can program their own effects in C/C++ or download ready effects from the online library.
It is designed to be a platform to learn about digital signal processing, effects, synthesizers and experiment without deep knowledge in electronics or programming.

The shield has three parts:
- The Input Stage or Preamp: Amplifies the guitar input signal and sends it to the Arduino microcontroller to be processed.
- Arduino Board: It does all the Digital Signal Processing (DSP) modifying the signal and adding the effect (delay, echo, distortion, volume).
- The Output Stage: Once the waveform is processed, the signal is taken from the Arduino DACs and prepared to be sent to the Guitar Amplifier. This part also includes a Summing Amplifier which is very useful for delay effects like echo or chorus.

The shield is programmed in C/C++ using the standard free Arduino platform (Linux/Windows/Mac). All tools and programs are open source and compatible with Arduino libraries.

Demodulating the 12-bit DAC/ADC
The Arduino DUE's powerful 32-bit ARM Cortex-M3 core and 84 MHz clock speed enable high-fidelity audio processing. A key feature is its true 12-bit Analog-to-Digital Converter (ADC) and Digital-to-Analog Converter (DAC), providing 4096 discrete levels for accurate signal representation. This is a significant upgrade over the 10-bit resolution found on standard Arduino boards like the UNO.
To leverage this, you must explicitly set the resolution in your code. This ensures the microcontroller correctly interprets and outputs the full range of the guitar's analog signal, from its quietest nuances to its loudest peaks, with minimal quantization noise.
// Configure the DUE for full 12-bit resolution
#define CPU_FREQ 84000000
void setup() {
analogReadResolution(12); // Set ADC resolution to 12 bits
analogWriteResolution(12); // Set DAC resolution to 12 bits
}
void loop() {
int guitarSignal = analogRead(A0); // Read 12-bit value from input stage
// Apply a simple digital distortion effect (waveform clipping)
int distortionSignal = constrain(guitarSignal * 3, 0, 4095);
analogWrite(DAC0, distortionSignal); // Output processed 12-bit signal to Amplifier!
}
Biasing the Analog Waveform
Guitar signals are alternating current (AC) waveforms that swing both positive and negative around a central zero point. However, the Arduino's ADC can only read positive voltages (typically between 0V and 3.3V on the DUE). The PedalSHIELD's input stage solves this by incorporating a DC bias circuit. This circuit adds a fixed voltage (typically 1.65V, which is half of the 3.3V reference) to the incoming guitar signal. This "lifts" the entire AC waveform into the positive voltage range where the ADC can accurately sample it. The DSP code in the Arduino then processes this biased signal. Finally, the output stage removes this DC bias before sending the clean, processed AC signal to your amplifier, preventing unwanted hum or damage.
Silicon Effects Architecture
The hardware platform is specifically engineered for real-time audio DSP:
- Arduino DUE (Not UNO!): The project is built around the DUE for its essential 12-bit DACs, high clock speed, and sufficient SRAM for audio buffer manipulation required by effects like delay and reverb.
- 1/4" Mono Guitar Jacks: Provide standard, robust connections for your instrument and amplifier.
- Op-Amp Buffer Arrays (TL072): These low-noise, high-input-impedance operational amplifiers form the core of the analog input and output stages. They ensure the guitar's high-impedance signal is properly conditioned for the ADC and that the DAC's output can drive an amplifier without signal loss.