Table of Contents

Electric Guitar Effects Pedal

Introduction

This project is an electric guitar effects pedal built around the ATmega328P Xplained Mini development board.

The pedal receives the signal from an electric guitar, processes it using the microcontroller, and sends the modified signal further to an amplifier or audio system. The main effects chosen for this project are distortion and tremolo, together with a simple clean/bypass mode.

The project started from the idea that guitar pedals are both useful and interesting from a technical point of view. They are good examples of systems that combine analog electronics with embedded software. Instead of making a very complex multi-effect unit, the goal was to create something simpler, realistic, and possible to build by hand with common components.

This project is useful for us because it helps us apply concepts learned in the laboratories, such as ADC, PWM, timers, interrupts, GPIO, I2C, and UART, in a practical product. It can also be useful for other students or hobbyists who want to understand the basics of digital audio effects on a microcontroller.

General Description

The project can be split into a few simple functional blocks:

Suggested block diagram:

Block diagram

Signal flow:

Guitar Input → Analog Conditioning → ADC → Effect Processing → PWM Output → Output Filter → Guitar Amplifier

Control flow:

The interaction is simple: the input signal is first prepared so it can be safely read by the microcontroller. Then the ADC samples it, the firmware applies either distortion or tremolo, and the result is sent to the PWM output. After filtering, the output becomes an analog signal again and goes to the amplifier.

Hardware Design

Main components

Input stage

The electric guitar produces an AC signal, but the ADC of the microcontroller works with positive voltages only. Because of this, the signal has to be adapted before sampling.

The analog conditioning stage contains:

This stage is important because it makes the signal compatible with the ADC and improves stability during processing.

Processing unit

The main processing unit is the ATmega328P from the Xplained Mini board. It handles:

Output stage

The output signal is generated as PWM. Since PWM is not directly suitable as an audio signal, it is passed through an RC low-pass filter. After filtering, the signal is sent to the output jack.

An op-amp buffer can also be used here to improve output stability.

Controls

The user controls are:

Proposed pin usage

Schematics and diagrams

This section will include:

Placeholders:

Input stage Output stage Full schematic Input signal Distortion signal Tremolo signal

Software Design

Development environment

The firmware will be written in C/C++ using an AVR-compatible development environment:

External libraries

The project will try to keep the code as simple as possible. Only a few external libraries may be used:

Most of the main logic will be implemented manually.

Laboratory concepts used

This project includes functionality from multiple laboratories:

Software structure

The firmware can be organized into the following modules:

Main logic

The general execution flow is:

  1. initialize peripherals;
  2. configure ADC;
  3. configure timer and PWM output;
  4. initialize buttons, LED, and optional LCD;
  5. start sampling the input signal;
  6. process each sample depending on the selected mode;
  7. update output;
  8. update controls and debug information in the main loop.

Effect modes

Clean / bypass

This mode sends the input further without applying a strong audio effect. In the final hardware version, the footswitch can also provide real hardware bypass.

Distortion

Distortion is implemented by increasing the amplitude of the signal and clipping it when it goes above a threshold.

Example logic:

The distortion intensity is controlled by a potentiometer.

Tremolo

Tremolo changes the signal amplitude periodically. It is implemented by multiplying the input signal with a slowly changing factor generated in software.

Parameters:

The modulation can be generated using a counter or a lookup table.

Planned functions

Implementation notes

The project should contain more than 100 lines of original non-trivial code. The most important parts are:

Results Obtained

At this stage, the project has a complete design plan and a clear implementation direction.

The expected final result is a working prototype that:

After implementation, this section will include:

  • photos of the prototype;
  • oscilloscope screenshots;
  • screenshots or photos of the user interface, if LCD is used;
  • notes about sound quality and stability;
  • practical test results with guitar and amplifier.

Placeholders:

Prototype Prototype Measured signals

Conclusions

The project is a realistic embedded application that combines hardware and software in a clear and useful way.

Its main advantage is that it remains simple enough to be built by hand while still including important concepts from the laboratory. Instead of trying to implement many difficult effects, the project focuses on two effects that are easier to understand and demonstrate: distortion and tremolo.

The final result should be a functional guitar pedal prototype that can later be improved with more effects, better filtering, a custom PCB, or a more advanced user interface.

Download

The following files will be uploaded when the implementation is finished:

  • source code
  • schematics
  • block diagram
  • optional simulation files
  • README
  • ChangeLog
  • build instructions
  • flashing instructions

Example files:

  • `guitar_pedal_sources.zip`
  • `guitar_pedal_schematics.pdf`
  • `README.md`
  • `CHANGELOG.txt`

Example attachments:

Journal

tip

Bibliography/Resources

Hardware Resources

  • ATmega328P datasheet
  • ATmega328P Xplained Mini documentation
  • operational amplifier datasheet
  • LCD datasheet, if LCD is used
  • basic guitar pedal electronics references

Software Resources

  • AVR peripheral documentation
  • ADC and PWM examples
  • UART communication examples
  • optional I2C examples

Course Resources

  • PM laboratory materials
  • PM project template

Other Resources

  • similar guitar pedal projects
  • audio signal processing tutorials for embedded systems

Export to PDF