Transcript
Pocket Pedal - A Bluetooth Controlled Effects Box ECE 445 Spring 2016 Design Review Jacob Waterman, Alexander Van Dorn, Kaan Erel TA: Brady Salz March 2nd, 2016
0
Table of Contents
Page 2 2 2 2
1.
Introduction 1.1. Statement of Purpose 1.2. Goals 1.3. Functions
2.
Design 2.1. Block Diagram 2.2. Hardware Schematic 2.3. Block Descriptions 2.3.1. Power Converter 2.3.2. Microcontroller / Bluetooth 2.3.3. LED Indicators / Buttons 2.3.4. Analog Filter Potentiometers 2.3.5. Filter #1 Fuzz Distortion 2.3.6. Filter #2 Boosted Tremolo 2.3.7. Filter #3 Fixed Wah 2.4. Software 2.4.1. Device Software 2.4.2. Android Application Software
3 3 4 5 5 5 6 7 7 9 11 13 13 14
3.
Requirements and Verification 3.1. Requirements Summary 3.2. Power Converter 3.3. Microcontroller / Bluetooth 3.4. LED Indicators / Buttons 3.5. Digital Potentiometer 3.6. Analog Filters 3.6.1. Filter #1 Fuzz Distortion 3.6.2. Filter #2 Boosted Tremolo 3.6.3. Filter #3 Fixed Wah 3.7. Tolerance Analysis
16 16 16 17 17 18 18 18 18 19 19
4.
Logistics 4.1. Cost Analysis 4.2. Schedule
20 20 22
5.
Ethics/Safety 5.1. Ethics 5.2. Safety
24 24 24
6.
References
25
1
1
Introduction
1.1
Statement of Purpose Our idea is to make an inexpensive alternative to traditional pedal powered guitar effects boxes. Essentially, we hope to implement a single aftermarket effects box that can be remote controlled via a mobile app. This low-power, Bluetooth connected application can control the box to change effects on the go. The hardware within the effects box will be able to alter the guitar's signals to create different sounds including Wah, Tremolo, and Fuzz. These effects will be implemented using analog circuits that we will design and construct to be controlled by an app on your phone. In the existing market, many companies have attempted to implement similar effects and tones using DSP and a computer’s processor. However, this has not been done before using common analog electronics. We believe that creating these effects with analog electronics is better than the equivalent digital effects for a number of reasons. The use of these analog components in guitar pedals, arguably originating in the 1950’s, came about when engineers figured out they could model the effects of “overdriving” a tube amplifier with transistors. These transistors can similarly be overdriven, and allow for the quality that is still seen today in the analog effect pedals. These effects have many subtleties due to the breakdown voltages of silicon or germanium, and the change in characteristics due to heating up that a digital effects pedal cannot emulate. In the market today, the best known effects companies (Dunlop, Boss, Electro-Harmonix, etc.) still implement most of their pedals using analog electronics. Famous musicians have been taking advantage of these hardware qualities for ages, and we hope to help continue this trend.
1.2
Goals ● Maintain high audio quality ● Suitable for aftermarket use with most guitar/amp systems ● Provide an intuitive user interface
1.3
Functions ● Bluetooth connectivity ● Powered by standard 120V outlet ● LED based user feedback ● Android mobile application ● Several analog filter options including Wah, Tremolo, and Fuzz ● Master volume control for each filter 2
2
Design
2.1
Block Diagram
Figure 1. Block Diagram 2.2
Hardware Schematic
3
Figure 2. High Level Hardware Schematic 4
2.3
Block Descriptions
2.3.1 Power Converter The analog filter circuits and the microcontroller will be tied to the same power source that will take in 120V AC from a standard wall outlet and convert it to 9V DC. Following the schematic shown in Figure 3, we are first isolating our filters and the microcontroller with a 10:1 transformer. Fro an outlet, we will see a sine wave with a magnitude of approximately 170V. Scaling that down by 10 and then rectifying the signal gives us the absolute value of a sine wave with a peak of about 17V. By attaching an LM7809 linear voltage regulator, which has a max voltage rating of 18V, we can smooth out the output to a steady and stable 9V DC waveform.
Figure 3. Power Converter Schematic 2.3.2 Microcontroller/Bluetooth The microcontroller will receive and interpret bluetooth signals from the mobile device using Y-MCU Bluetooth Slave Module as shown in Figure 4, and will direct the rest of the circuit based on those signals. The brains of the operation will be the ATmega328 - Arduino, otherwise known as the Arduino Uno. It will direct the Guitar Input to the appropriate filter using the Analog Multiplexer. The microcontroller will also use I2C protocol to control digital potentiometers on each filter to adjust tone. In addition the microcontroller send controls to LED’s, and receive controls from the filter buttons. ATmega328-Arduino Pin 2
Function RXD Serial Receive
Connection TXD of Y-MCU BT 5
3
TXD Serial Send
RXD of Y-MCU BT
Digital Pin
To Analog Multiplexer
PWM Pin Clk
Clk to Tremolo Filter
11
Digital Pin
Bluetooth LED Indicator
12,13
Digital Pin
Filter LED indicators
15,16,17,18
Digital Pin
Filter Buttons
23, 24, 25
Analog Pin
Digital Pot (SLC)
26, 27, 28
Analog Pin
Digital Pot (SDA)
4,6 5
Figure 4. Arduino to JY-MCU Schematic [2] 2.3.3 LED Indicators & Buttons Bluetooth Indicator - Single LED receiving control from the Arduino indicating that a device is connected via bluetooth Filter Indicators - Four LEDs corresponding to each filter to indicate which filter is currently being used, if any Filter Buttons - Four buttons corresponding to each filter that enable the user to change which filter is currently being used, if any 6
2.3.4 Digital Potentiometer Connections We are planning to implement the potentiometers shown in the filter schematics as digital potentiometers, specifically the Analog Devices AD5171 [3]. By doing so, we will be able to control volume and tone of the different filters based on user input from the Arduino using I2C protocol. Below is a table fleshing out the necessary connections. Analog Devices AD5171 Pin Layout Pin
Connection
1)Output
Connects to respective filter
2) VDD
+5V coming from Arduino
3) Ground
Connects to circuit ground
4) Serial Clock
Connects to analog input from Arduino
5) Serial Data Pin
Connects to analog input from Arduino
2.3.5 Filter #1: Fuzz Distortion The first sound effect that we wanted to implement is a Fuzz Distortion sound. This is a very common effect used by guitar players and is also fairly straightforward to implement. The Fuzz filter we are using is a variation on a commonly used circuit, with a positive 9V DC input going into the the emitter of the transistors. As you can see in Figure 5, the circuit itself consists of an input stage that takes in the guitar input and an output stage that takes in the output of the first transistor and uses it as its input. Using a common-emitter amplifier circuit for our input stage, we can obtain a high voltage gain. The emitter voltage of the first BJT is 9V, making the base voltage about 8.3V to keep a V of .7. Knowing that the current into the base, BE I B,is about 2.4uA, we can use the following equations to get to the gain. [5]
Aside from the input stage, the filter contains an output stage that is another common-emitter amplifier, but with an emitter resistance implemented with a 7
potentiometer. That pot is also part of a feedback loop that send the emitter signal back to the base of the first BJT. This feedback loop gives us more control of the input and output resistance of both amplifiers, reduces electrical noise, and stabilizes the gain. Not to mention, this is how we set the degree of distortion we want in our signal. In our simulation, we kept the potentiometer tapped at the center and applied an input of 10mV sine wave at 440Hz. This is the frequency of the note A, the standard tuning pitch. The resulting output waveform is shown in Figure 6. This is an example of hard-clipping, and will will result in significant distortion or a “fuzz” sound. The louder the guitar is played, the more the signal will be distorted. In terms of frequency, as seen in Figure 7, the higher the frequency, the less of an effect the filter has on the sound.
Figure 5. Fuzz Distortion Schematic
8
Figure 6. Fuzz Vin and Vout
Figure 7. Fuzz Frequency Response 2.3.6 Filter #2: Boost/ Tremolo [6] This filter is very simple in theory. Essentially we have a basic common-emitter transistor setup, intended to be a very simple way to amplify the input signal. This effect, called a boost, is a very common effect used for guitarists hoping to amplify their output, whether it be for a solo performance or just to drive the amplifier a little harder. In our case, the math behind the common-emitter setup is quite simple then. With a standard guitar signal coming in, the DC bias is filtered out by the coupling capacitors (See Figure 8). Then, following the next few steps of calculations, the circuit is setup to amplify the signal by a factor of 4.4 at its maximum. 9
Of course, using the linear volume potentiometer seen at the output, this amplification could feasibly be brought back down. In the boost simulation in Figure 9, the potentiometer was swept, allowing for a continuing increase in gain, until the gain was maximized at 4.4. Because we are using a digital potentiometer here at the output, we are able to let the user sweep this voltage via the mobile app. Additionally, the app can create a controlled sweep (like the one shown in the simulation), making the volume oscillate. This effect is called a “tremolo” in the audio world.
Figure 8. Boost Tremolo Schematic
10
Figure 9. Boost Tremolo Vin and Vout
2.3.7 Filter #3: Fixed Wah [7] The last of the effects we are implementing is the classic Wah-Wah sound with the circuit shown in Figure 10. To do this we construct a feedback amplifier at the input stage of the filter. For this amplifier to function properly, the transistor must operate in the linear region. This means the V be greater than .7V and the BE must base and collector current must be greater than zero. The gain of this transistor can be calculated by dividing the collector resistance, R C,by the emitter resistance, R E. A = R /R = 22000/470 = 46.8 V C E The feedback loop again creates stability in the frequency response and prevents transistor variations from having adverse effects on the signal. The collector current then flows through the 470k resistors down to the inductor and over to the base of the second BJT. The real work in this circuit is done with the capacitor feeding back from Q2 to Q1. The connection of that cap to the inductor, as well as the potentiometer changing the gain of the input stage amplifier, the reactance that the input signal sees is different than the actual value of the capacitance. This is the reason for the peak at near resonant frequency shown in Figure 12. Altering the position of the potentiometer will shift the peak in the frequency response. The main attraction for the Wah filter is the frequency, however as seen in Figure 11, there is slight amplification of the input signal as well as a phase shift that is caused by the inductance in the circuit. The phase shift will also vary with the pot setting because of the apparent change in the feedback capacitor.
11
Figure 10. Fixed Wah Schematic
Figure 11. Fixed Wah Vin and Vout
12
Figure 12. Fixed Wah Frequency Response 2.4
Software
2.4.1 Device Software The software on the device (ATmega328-Arduino Uno) is very simple, as its main functionality is to listen to commands coming from either Bluetooth or the physical buttons and take the appropriate actions. Figure 13 shows a simple flowchart outlining the software’s processes.
13
Figure 13. Device Software Flowchart 2.4.2 Android Application Software The main function of the Android Application is to enable the user to connect to the Pocket Pedal via bluetooth then switch between different analog filters on their phone. A mockup of our User Interface can be found on the next page in Figure 14.
14
Figure 14. Android Application User Interface 15
3
Requirements and Verification
3.1
Requirements Summary Module Name AC-DC Power Converter
Summary This module is responsible for supplying the rest of the circuit with the correct voltages.
12.5
This module is responsible for taking input commands from bluetooth/buttons and directing the analog signals accordingly.
12.5
LED Indicators / Buttons
This module should show the current state of the device as well as allow the user to change the state.
5
Analog Filters
These filters are responsible for providing the proper adjustments to the input signal from the guitar.
20
Microcontroller/Bluetooth
Total
3.2
Points
50
AC-DC Power Converter Requirements 1. Converter’s transformer is able to step down AC wall outlet from 120 Vrms (±5%) (~170 Volts AC) by a factor of 10 (to ~17 Volts AC). 2. Diode bridge is able to rectify 17 Volts AC into 17 Volts DC. 3. LM7805 Linear Regulator regulates the 17V input into a steady 9V output 4. AC-DC Power Converter is able
Verifications 1. Separately connect 10:1 transformer to a 120 Vrms sinusoidal input from signal generator on the bench. Measure voltage at secondary coil on oscilloscope to confirm a step down of a factor of 10, to 17 Volts DC 2. Connect four diode bridge separately. Feed it 16-17V AC from a signal generator into the input, and measure oscilloscope on the other end. Expect a rectified 17 Volt DC on the output of the bridge 3. Feed steady 17 Volt DC from power supply, measure voltage at other end 16
to supplied to the Arduino Uno at a DC Voltage of 8-11V ± 1V. [1]
3.3
Microcontroller/Bluetooth Requirements
Verifications
1. Each digital output pin on the Arduino Uno is capable of producing 3.3V ± 0.1V [1]
1. Use a voltmeter connected to GND and each pin and verify that the readings are in the correct range
2. Each digital PWM output pin on the Arduino Uno is capable of producing the full range of 0V 5V ± 0.25V [1]
2. Use a voltmeter connected to GND and each pin and verify that the readings are in the correct range
3. Bluetooth capable of receiving “Hello World + [timestamp]” message to device 10m away with latency of under 200ms.
3.4
of linear regulator to confirm a steady 9 Volt output 4. Use a voltmeter connected to GND and the VIN pin on the Arduino, then verify that the readings are in the correct range
3. Using the mobile device, transmit the “Hello World + [timestamp]” message to the Arduino from a distance of 10m and verify that the difference between the timestamp in the message and the timestamp of message received is under 200ms.
LED Indicator / Buttons Requirements 1. LEDs light up when 5V ± .1V of power is provided to the LED as shown in the schematic 2. Buttons are properly debounced and only register one input per button press
Verifications 1. Connect each LED to a 5V lab power supply via a 1KΩ resistor and verify that they do indeed light up 2. Use an oscilloscope connected to GND and each Arduino pin that has a button input. Verify that the signal is debounced.
17
3.5
Digital Potentiometer Requirements 1. Be able to run constant linear sweeps from 0Ω to 100kΩ
3.6
Verifications 1. Connect to the Arduino as shown in section 2.3.4. While running the I2C protocol from the Arduino, connect a multimeter across the wiper pin (pin 1) and ground. Observe the sweeping resistance from 0-100kΩ [4]
Analog Filters
3.6.1 Filter #1 Fuzz Distortion Requirements
Verifications
Assuming input signal of 10mV, 440 Hz: 1. Filter outputs distorted signal which maintains original frequency 2. Filter is responsive to amplitude of input signal 3. Filter displays same output characteristics seen in 2.2.4 (Fuzz Distortion Block Descriptions and Simulations)
1. Feed ideal 10 mV, 440 Hz frequency into filter and measure output frequency through oscilloscope 2. Feed 10 mV, 440 Hz signal in and verify soft-clipped signal with 30 mV amplitude ±5% 3. Feed 50 mV signal and verify hard-clipped 25mV amplitude ±5% at output of filter
3.6.2 Filter #2 Boost/Tremolo Requirements Assuming input signal of 10 mV, 440 Hz: 1. Boost is able to amplify voltage signal to a maximum gain of 5x original signal amplitude 2. Output responds to
Verifications 1. Feed standard 10 mV, 440 Hz input to filter. With digital potentiometer at full capacity (100kΩ), measure output to be steady 50mV amplitude 2. Connecting the filter as designated, set potentiometer to 0Ω. Connect 18
potentiometer sweep
oscilloscope to the output and measure that the original signal is unaltered.
3.6.3 Filter #3 Fixed Wah Requirements Assuming input signal of 10mV, 440 Hz: 1. Filter needs to output same frequency as original input 2. Filter is responsive to a sweep of the potentiometer based on bandpass filter calculations
3.7
Verifications 1. Feeding a 10mV 440 Hz signal into the filter, measure from the output to ground with an oscilloscope. Verify that the signal’s frequency has not been altered. 2. With the same nominal 10mV 440 Hz signal fed at the input, the decibel peak should be at 400 Hz ±10% when the 100KΩ potentiometer is center-tapped.
Tolerance Analysis The most important aspect of each of our filters are the transistors that are responsible for the gain and distortion of the signal. Without them, there would be no change in sound. However, the circuits surrounding them must follow some rules in order to keep them functioning properly. As mentioned in the Wah filter description, the BJT must be operating in the linear region for the filter to be effective. The same is true with a little leeway into the saturation region for the Fuzz and Boost/Tremolo filters. For BJT’s , linear operation occurs under the following conditions:
Taking our calculation for the boost/tremolo circuit BJT into consideration, we can see how the collector load of a transistor can drastically affect the gain. Using the following steps we can see the analyze the range our collector resistor must be in in order to keep our gain within 10% of 4.4.
19
Just to make sure this makes sense, it’s important to understand the implications of collector resistors maintaining a tight spec within our analog filters. Take the Boost effect for example. The calculations above are based on the transistor having a gain of 4.4 ±10% , as we had showed in an earlier section. Backsolving for this, we require a collector resistance of 10k Ω ±8.03%. If the collector resistance sat out of range (too high, for example), the gain would be too high. In the case of the Boost effect, this would lead for too high of an amplitude in your guitar’s signal. That means too much volume, and if it’s high enough, it may actually damage the electronics in your amplifier. This is very costly, and needs to be avoided. 4
Logistics
4.1
Cost Analysis Labor
Name
Hours Invested
Hourly Rate
Total Cost
Jacob Waterman
200
$30
$15,000
Kaan Erel
200
$30
$15,000
Alex Van Dorn
200
$30
$15,000
All Together
600
$30
$45,000
Parts Part
Unit Cost
Total Cost
Arduino Uno | 1
$24.95
$24.95
JY-MCU Bluetooth Slave Module | 1
$10.99
$10.99 20
Various Resistors, Inductors, Capacitors, FETs, Transformers, etc.
~ $15.00
~ $15.00
EP-0055-000 Switchcraft #11 1/4" Input Jack | 1
$3.00
$3.00
EP-0280-010 Switchcraft Male Cable Mount Plug | 1
$3.40
$3.40
FST3253 Fairchild Semiconductor Dual 4:1 Multiplexer |1
$0.75
$0.75
Analog Devices AD5171 Digital Potentiometer |3
$3.35
$10.05
16mm Linear 500K Potentiometer (500K) |1
$0.75
$0.75
Mouser 562-703W-00/08 AC Power Entry Module | 1
$0.76
$0.76
Digi-Key SWITCH PUSH SPST-NO 0.01A 35V | 4
$0.53
$2.12
Mouser 755-SLR-343VR3F LED $0.46 |6
$2.76
Total
$74.53
Grand Total Source
Cost
Labor
$45,000.00
Parts
$74.53
Grand Total
$45,074.53
4.2
Schedule 21
Week Of
Task
Delegation
2/08/2016
Project Proposal Due 2/10 at 11:59 pm
All Members
2/15/2016
Mock Design Review
All Members
2/22/2016
Finalize filter effects schematic
Alex Van Dorn
Finalize power
Kaan Erel
Finalize Arduino planning and Application Design Schematic
Jacob Waterman
Order electronics for filters and guitar input
Alex Van Dorn
2/29/2016
Begin initial filter soldering
3/07/2016
3/14/2016
Build 120V-10V AC-DC rectifier power supply
Kaan Erel
Initial Android app / Arduino development phase
Jacob Waterman
filter design and quality testing (#1)
Alex Van Dorn
Power supply Implementation (Continued)
Kaan Erel
Arduino/Android Development
Jacob Waterman
Finish filter #2 and quality test
Alex Van Dorn
Finalize power supply and begin PCB design for Filters
Kaan Erel
Established BT connection
Jacob Waterman 22
3/21/2016
Spring Break - Beach Tanning Everyone
3/28/2016
Develop filter #3 and quality test
Alex Van Dorn
PCB Design cont.
Kaan Erel Jacob Waterman
4/04/2016
4/11/2016
Finalize and test individual connections between bluetooth connected microcontroller and filters
Alex Van Dorn
FInalize all PCB
Kaan Erel
Work out kinks in software communication/quality
Jacob Waterman
Extra design time allocated for debugging
Alex Van Dorn Kaan Erel Jacob Waterman
4/18/2016
Final Quality Testing/ Misc. Extra Time
Alex Van Dorn Kaan Erel Jacob Waterman
4/25/2016
Demonstration Week
Alex Van Dorn Kaan Erel Jacob Waterman
5/02/2016
Final Presentation Week
Alex Van Dorn Kaan Erel Jacob Waterman
5 Ethics/Safety 23
5.1
Ethics Throughout this project we adhere to the IEEE code of ethics [8], specifically focusing on the following clauses 1. to accept responsibility in making decisions consistent with the safety, health, and welfare of the public, and to disclose promptly factors that might endanger the public or the environment; 3. to be honest and realistic in stating claims or estimates based on available data; 5. to improve the understanding of technology; its appropriate application, and potential consequences; 6. to maintain and improve our technical competence and to undertake technological tasks for others only if qualified by training or experience, or after full disclosure of pertinent limitations; 7. to seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to credit properly the contributions of others; 8. to treat fairly all persons and to not engage in acts of discrimination based on race, religion, gender, disability, age, national origin, sexual orientation, gender identity, or gender expression; 9. to avoid injuring others, their property, reputation, or employment by false or malicious action; 10. to assist colleagues and co-workers in their professional development and to support them in following this code of ethics.
5.2
Safety Pocket Pedal relies on a standard wall outlet for power, which carries 120V AC and up to 15 A current. We will take the necessary precautions to make sure that the user is never exposed to this power supply by properly insulating these wires and not exposing the device to liquids or other conductive materials. Once we step down the power with our Power Converter, the risk of electrocution is minimized. Before we poke around at any of the hardware we will be mindful to make sure that the device is unplugged, that our bodies are not statically charged, and that capacitors have had ample amount of time to discharge.
24
Protecting our hardware is also a key aspect of our design. As a result we will protect our microcontroller with a fuse, so that if our circuit shorts out somewhere the expensive components of the microcontroller will be protected. 6
References 1. "Arduino - ArduinoBoardUno." https://www.arduino.cc/en/Main/ArduinoBoardUno. N.p., n.d. Web. 16 Feb. 2016. 2. Neto. "Installing Arduino 1.6.3 on Ubuntu 32 and Enabling Optiboot." http://blog.carr3r.com/ . N.p., 19 May 2015. Web. 01 Mar. 2016. 3. Analog Devices. "A Thick-film Digital Potentiometer." Microelectronics Reliability 18.4 (1978): 319. Web. 4. Arduino. "Arduino - DigitalPotentiometer." Arduino - DigitalPotentiometer . N.p., n.d. Web. 01 Mar. 2016. 5. Keen, R. G. "The Technology of the Fuzz Face." http://www.geofex.com/. N.p., 1998. Web. 01 Mar. 2016. 6. Allaway, Simon. "Electro-harmonix LPB-1." Hot Bottles . N.p., 14 Feb. 2012. Web. 01 Mar. 2016. 7. Keen, R. G. "The Technology of Wah Pedals." The Technology of Wah Pedals . N.p., 1999. Web. 01 Mar. 2016. 8. "IEEE IEEE Code of Ethics." IEEE . N.p., n.d. Web. 01 Mar. 2016.
25