Our final project is making a Guitar Pedal. The problem is that many guitar pedals on the market are very expensive and only contain a few effects. Our solution is to leverage firmware to create our effects.

Initially, we were trying to amplify our input signal from a range of 0V to 300mV to 0V to 5V. We were using the LM386 chip to do this. We had built a circuit with a gain of 20 to reach our goal. The circuit required a lot of fine-tuning to ensure that we got the proper output without clipping. After further tests, we realized that we did not need to amplify our input signal and the Arduino was able to read the guitar signal with sufficient clarity using only a 10 bit ADC.

After this, we turned our focus to the firmware. Our firmware solution took the input from the 10-bit DAC on the Arduino and stored the 8 least significant bits in ADCL and 2 most significant bits in ADCH. This is designed by the Atmega328p Since we’re setting ADLAR to 0, ADCL stores the bottom 8 bits of the 10-bit digital value and ADCH stores the top 2 bits of the 10-bit digital value. We stored these values in variables of uint8_t so that we could modify them. We then created our effects: distortion, tremolo, and our own effect called poor sampling frequency. These effects modify the value stored from ADCH and ADCL. For tremolo, we use a function to map our ADC values to a sine wave. Essentially is that we are modifying our input value into a pre-designed sine wave. For distortion, if anything is above our distortion threshold, we limit the output value at the distortion threshold. For our poor sampling frequency, we only sample 1 out of every certain number of inputs.

Finally, once we had modified our signals, we then output it to OCR1AL and OCR1BL through pins 9 and 10. We then use a summing amplifier to sum the signal from pins 9 and 10. The output of the summing amplifier then goes through a low pass filter to make the signal more like a sine wave. Finally, it is put into an output jack for our amplifier.

Built With

Share this project:

Updates

posted an update

On April 5th, we started experimenting with building our circuit. We tried building a voltage booster using an Op-Amp. We used the LM358 as a two-sided Op Amp to allow us to amplify the input and output of the Arduino's ADC/DAC. To test the op-amp used the Waveform Generator at the lab bench to simulate the input from a guitar. We were able to see the proper voltage output on the Oscilloscope.

Log in or sign up for Devpost to join the conversation.