Digital Effects Pedal Description Ross Jongeward 10 December 2014 1
Contents Section Number Title Page 1.1 Introduction..3 2.1 Project Electrical Specifications..3 2.1.1 Project Specifications...3 2.2.1 Power Requirements 3 2.3.1 Special Environmental Requirements..3 3.1 System Description and Specifications 4 3.1.1 Microcontroller Type... 4 3.1.2 Hardware Block Diagram 4 3.2.1 Software Requirements 6 4.1 User Interface Requirements....6 4.1.1 Digital Effects Pedal Interface Layout Sketch.7 4.2.1 User Interface State Diagrams.7 5.1 Development Plan...9 5.1.1 Development Description.... 9 5.2.1 Prioritized List of Features......9 5.3.1 Weekly Schedule........9 5.4.1 Required Development Hardware and Software.........11 5.5.1 Demonstration 11 6.1 Preliminary Parts List....12 6.1.1 Power Requirements..12 2
1.1 Introduction: The result of this project will be a closed box effects pedal device used for an electric or amplified acoustic musical instrument. The box will have a standard patch cable input and output to interface with other music equipment. The pedal will have several features available for the user to choose from. The main feature will be the whammy effect which allows the user to add harmonics to their sound. In addition to a whammy pedal, this effects system will also house a wah pedal effect which controls the user s tone. The last feature of the effects pedal device will be a distortion switch. Each effect module will be independently controllable by the user to allow for a very customizable range of effects. 2.1 Product Electrical Specifications: 2.1.1 Project specifications: Dimensions 25 cm x 40 cm x 13 cm Product Weight <3 kg. Sample Rate 44.1 khz Frequency Response Dry 20 Hz 20 khz Frequency Response Wet 20 Hz 12 khz A/D Converter Bit Width 16 bit A/D Converter SNR 87 dba D/A Converter Bit Width 16 bit D/A Converter SNR 93 dba Max Signal Input +4 dbu Max Signal Output +4 dbu Resolution 2 Hz Additionally, my product will need to adhere to UL standard 6500: Standard for Audio/Video and Musical Instrument Apparatus for Household, Commercial, and Similar General Use. 2.2.1 Power requirements: Power Source Type 5 V / 4 A / 20 W AC/DC wall adapter Voltage Range 5 V Current (Max) 2.02 A Power (Max) 12.45 W 2.3.1 Special environmental requirements: The operating temperature range of my device will be 0 C to 40 C. Since my product will be used generally in indoor conditions and enclosed in its box; humidity, shock, and other special environmental factors should not affect its performance. 3
3.1 System Description and Specifications: 3.1.1 Microcontroller type: For optimal audio quality, the analog to digital converter (ADC) as well as the digital to analog converter (DAC) need to be high quality. A bit width of 24 would be ideal for both the ADC and DAC. 16 bit audio samples are certainly acceptable as that is the standard for the compact disc which is still used widely for storing musical audio data. Ideally I would use the TMS320C6713DSK, Cortex M4, Cortex M7, or a high performance digital signal processor (DSP) board with a 24 bit ADC and DAC. Since these are very expensive to buy as a single unit, I will be using the TWR-K70F120M board since we have them available to use here at Western Washington University (WWU). I will be using the K70F120M with an external codec module which will support 16 bits so it will meet the needs for my project. A K70 microcontroller (MCU) is required for my project because it has a digital signal processor integrated in its core as well as the speed and power required for the intensive amount of calculations necessary for my application. Since my application involves real-time (or near-real time) audio processing, my MCU needs to be fast to process the incoming data and send it out before any audible delay can be heard. 3.1.2 Hardware block diagram: The following diagram shows required hardware modules for my project. The input signal is first passed through a band-pass filter to act as an anti-aliasing filter. This allows for the bandwidth of the incoming signal to be limited to what is desired for DSP. If the incoming signal is unfiltered, or all-pass, the Nyquist sampling criteria could be violated. If the Nyquist sampling criteria is violated, unwanted spectral copies could appear in DFT bins. The filter will be set to filter out frequencies less than 20 Hz and greater than 20 khz. The gain of the pass-band of the filter will be 1 as to not change the gain of the important frequencies. After the signal has been filtered, it will be fed into the codec module via the instrument line-in jack. The next piece of hardware is an extremely important part of the total system. The codec module is what creates the digital samples of the audio input signal. The codec module is initialized with a 44.1 khz sample rate and a bit width of 16 bits. This system block communicates with the K70 MCU via the GPIO interface. As well as obtain the input samples and communicate them with the K70 MCU via I2S, the codec module receives modified samples and reconstructs an analog output using its DAC. An external codec module is required because the onboard K70 ADC/DAC will not be adequate. While the K70 does have a 16 bit ADC, it only has a 12 bit DAC. The external codec module will allow 16 bit samples in and out so it will be a much better option for dealing with the audio signal. The most important system block is arguably the K70. The K70 uses many resources to accomplish several tasks. The K70 MCU uses GPIO as well as I2S to receive and transmit data with the external codec module as well as the user interface hardware. After receiving samples from the codec module, the MCU saves the samples in RAM. The K70 has DSP capabilities and will therefore use specialized internal hardware to perform Fast Fourier Transforms (FFTs). The MCU will perform DFT calculations and modify the input samples. After the samples are modified, they will be stored back into RAM and transmitted back to the codec module. My system will need at least 8 bytes of RAM for storing samples. Floating point will not be necessary for my project. 4
Remaining hardware blocks that interface with the K70 MCU are to communicate with the user. A 4 bit rotary encoder switch will communicate with the K70 MCU via GPIO. The function of this hardware is to allow the user to select different effect settings. The user selection option will be determined by reading the values of all four connected GPIO pins. Another rotary encoder will used to interface with the MCU, referred in the figure as the whammy pedal switch. This rotary encoder will be 1 bit and gives the user further control of their desired effect. This rotary encoder will also communicate with the MCU via GPIO. Last of the user control hardware is the step button switch. This switch allows the user to toggle the digital effects on or off. By GPIO communication, the MCU can use the status of the connected pin to determine processor state. The step button switch activates the indicator LED by applying a voltage to it when in the on position. Looking back at the codec module, the only remaining hardware to trace is the signal output. The instrument line-out jack is identical to the instrument line-in jack as it is simply an interface for the audio signal path. The final stage of the audio signal path before exiting the system is the band-pass filter block. This stage removes any unwanted spectral copies that were created by the DAC. The purpose of this filter is to clean up the signal be removing spectral noise. The last piece of hardware that has not been mentioned is the supply power. For this project, all power will be supplied with a 5V, 20W DC power supply. The supply will be fed with standard North America AC power. 5
3.2.1 Software requirements: The programming language needed for this project is C. C will be the best language to do the DSP algorithms. A FFT algorithm will be needed to determine the fundamental frequency of the input signal. Beyond the actual digital signal processing involved, an I2S driver will need to be developed to enable communication between the K70 MCU and the external codec module. The whole program will be run underneath a µcos runtime environment. PCB size limitations: Since I will be building the enclosure for the effects pedal, size limitations will not be too much of an issue. The amount of analog circuitry will be pretty minimal compared to the size of the microcontroller, so it will be easy to make all the internals of my project fit inside a small box. For the sake of a realistic enclosure, my PCB should not exceed four by four inches. 4.1 User Interface Requirements: The following sketch is a top-down view of the physical user interface, or the actual effects pedal. On the left side of the rectangular wooden enclosure is the interface for a standard professional audio patch cable. This will be the audio signal input to the device. The audio signal output of the device is of the same format on the right side of the enclosure. The effect selection knob on the left side of the rocker pedals is the harmonics selection knob. This knob offers the user control of which selection of harmonics they wish to add to their instrument when using the whammy effect. Each setting offers two different harmonic choices. The rocker pedal adjacent to the harmonics selection knob controls which of the two harmonic choices will be added to the user s sound. The step button switch below the harmonics selection knob toggles the whammy effect on or off. The light emitting diode (LED) below the step button illuminates to indicate to the user when the effect is active. The rocker pedal on the right side of the digital effects pedal enclosure is the wah pedal control. By pressing the rocker pedal all the way forward, the user can toggle the wah effect on or off with the step button switch located underneath. The LED indicator below the wah pedal rocker will again indicate when the effect is active. The effect selection knob on the right side of the enclosure is the distortion effect control knob. This knob offers the user control of the level of distortion introduced by the effect. Turning the knob clockwise will increase the level of distortion while turning the knob counter-clockwise will decrease the point of distortion. The step button below the distortion effect control knob will toggle the effect on and off, again indicated by the LED below it. For the completion of my prototype, the only required user interface will be for the whammy harmonics effect. 6
4.1.1 Digital effects pedal interface layout sketch: 4.2.1 User interface state diagrams: Whammy step button: Whammy pedal: Wah pedal step button: 7
Distortion step button: Distortion selection knob: Whammy selection knob: 8
5.1 Development Plan: 5.1.1 Development description: The first step in the development of any project is to acquire the needed parts for testing and completion of the prototype. Once all of the necessary components have been obtained, the next step will be to build multiples of the needed hardware. Once the hardware has been built, the next task will be to test the hardware and ensure its functionality. After the hardware has been tested and interfaced with the microcontroller, software development will begin. The first step in software development will be to establish the microcontroller environment and begin creating the I2S driver to communicate with and initialize the external codec module. After the external codec module has been successfully initialized, the next stage will be to accomplish sampling an input signal and reconstructing it at the output. At this point the rest of the project mainly relies on creating and developing the digital signal processing (DSP) algorithms. The final stage of the development process will be constructing the final prototype enclosure and testing the digital effects pedal in a live music setting to evaluate its performance and make any last minute adjustments. 5.2.1 Prioritized list of features: As this project contains multiple elements, feature priorities must be established early in development to ensure the most complete product when the project deadline has been reached. 1. Input signal analog to digital conversion. Without this feature, my system will not be able to do anything for the user. Also, digital to analog conversion and output filtering. Without being able to convert digital samples back into an analog signal, a digital effects pedal cannot function on any level. 2. Digital signal processing (Whammy effects). The biggest and most important feature of this project will be the harmonic/whammy effect pedal system. Getting this feature operational will mean my project is a success on the most basic level. 3. Digital signal processing (Wah effects). The second most important feature of this project will be the wah pedal. At this stage, the pedal will be functioning on a basic level so this will really be an additional feature. This feature will not be completed for this course. 4. Analog circuit design (Distortion). Getting the distortion feature operational with just one preset will be the next feature to add to the system once the whammy and wah pedals have been established. This feature will not be completed for this course. 5. Now that all the software and hardware is complete, the final feature of this project will be integrating the pedals, knobs, and the rest into a professional and user-friendly enclosure. 5.3.1 Weekly schedule: Week Objective 12/01-12/07 Acquire hardware 9
12/08-12/14 Acquire hardware 12/15-12/21 Build band-pass filters and input/output circuits 12/22-12/28 Build band-pass filters and input/output circuits 12/29-1/4 Test band pass filters and input/output circuits 1/5-1/11 Develop microcontroller environment 1/12-1/18 Develop microcontroller environment 1/19-1/25 Accomplish sampling audio using ADC 1/26-2/1 Accomplish sampling audio using ADC 2/2-2/8 Accomplish outputting real-time audio samples 2/9-2/15 Accomplish outputting real-time audio samples 2/16-2/22 effects 2/23-3/1 effects 3/2-3/8 effects 3/9-3/15 effects 3/16-3/22 effects 3/23-3/29 effects 3/30-4/5 effects 4/6-4/12 effects 4/13-4/19 effects 4/20-4/26 Build and integrate effects pedal enclosure 4/22 Hardware design review 4/24 Hardware design review 4/27-5/3 Build and integrate effects pedal enclosure 10
4/29 Hardware design review 5/1 Hardware documents due Test effects pedal: use in a real live music setting and test 5/4-5/10 performance 5/6 Software system presentations 5/8 Software system presentations Test effects pedal: use in a real live music setting and test 5/11-5/17 performance 5/13 Software system presentations 5/18-5/24 Fine tune performance and quality of design 5/25-5/31 Fine tune performance and quality of design 5/27 Code reviews 5/29 Code reviews 6/3 Code reviews 6/5 Final presentations 5.4.1 Required development hardware and software: Since I will be using the K70F120M microcontroller, I will be using Kinetis Development Studio on the school computers. For development and testing, I will need to use a digital multi-meter, oscilloscope, computer, headphones or speakers, and the soldering station. Since the target application for my project is a saxophone, I will need to test the system with a saxophone. I will provide the saxophone for testing my system. 5.5.1 Demonstration: Other than the microcontroller, external circuitry will be soldered and mounted on a printed circuit board (PCB). The enclosure of my project will be a custom wood box designed to house the microcontroller and hide any circuitry from the user. This will be a prototype using a development board. The only interface available to the user will be a standard professional audio patch cable input and output, power connector, step button, control knob, and whammy pedal. For my demonstration I will use pre-recorded audio samples and a professional full range instrument amplifier. In addition to the physical demonstration of the project, I will provide visual aids to explain how my project functions internally. 11
6.1 Preliminary Parts List: The following is a preliminary list of hardware components needed to create three independent versions of every piece of hardware I will be interfacing with my microcontroller. Quantity Part Number (Digi-Key) Description Lead Time Cost (USD) 6 SC1085-ND PA cable phono jack Immediate 3.05000 6 CP-2205-ND 3.5 mm audio cable Immediate 2.80000 3 CKN1680-ND Step button toggle switch Immediate 4.70000 3 C503B-GCN-CY0C0791-ND LED indicator Immediate 0.24000 30 PPCHF100KTR-ND 100 kω resistor Immediate 0.69000 6 S1KCACT-ND 1 kω resistor Immediate 0.14000 6 445-4748-ND 6800 pf capacitor Immediate 0.41000 6 1001-2027-MIL 0.082 µf capacitor Immediate 0.91000 6 OP07EPZ-ND Operational amplifier Immediate 4.10000 6 PEC16-4215F-S0024-ND Rotary encoder Immediate 1.32000 1 237-1419-ND AC/DC wall adapter Immediate 14.2800 1 K70F120M K70 MCU 16 weeks 159.000 1 296-24373-1-ND External audio codec Immediate 7.00000 6.1.1 Power requirements: To calculate the worst case power dissipation for my hardware design, there are four main components to consider. The first, and easiest power loss to calculate is the power dissipated by the LED indicator light. Rated for a maximum current of 20 ma at 3.2 V, the maximum power dissipated by the LED indicator is 64 mw. The next power loss to consider is the power dissipated by the op-amps in the band-pass filters. The reference manual for the OP07 states a maximum peak voltage output for the OP07 operational amplifiers at 13 volts typically with a 10 kω load. This works out to be a maximum output power of 8.45 mw per amplifier. Since my circuit contains four amplifiers, the worst case power dissipation for my op-amps is 33.8 mw. The last power loss to consider is that of the MCU. The maximum power consumption of the K70F120M microcontroller is about 10 W. The last component to consider for power consumption is the external audio codec. According to its datasheet, at 25 C it can dissipate 2.35 W absolute maximum. This brings the total maximum power consumption of the system to about 12.45 W. 12