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.
The project can be split into a few simple functional blocks:
Suggested 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.
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.
The main processing unit is the ATmega328P from the Xplained Mini board. It handles:
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.
The user controls are:
This section will include:
Placeholders:
The firmware will be written in C/C++ using an AVR-compatible development environment:
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.
This project includes functionality from multiple laboratories:
The firmware can be organized into the following modules:
The general execution flow is:
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 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 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.
The project should contain more than 100 lines of original non-trivial code. The most important parts are:
At this stage, the project has a complete design plan and a clear implementation direction.
The expected final result is a working prototype that:
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.
Example files:
Example attachments:
Software Resources
Course Resources
Other Resources