Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Electrical engineering wikipedia , lookup
Mechanical filter wikipedia , lookup
Pulse-width modulation wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Solar micro-inverter wikipedia , lookup
Analogue filter wikipedia , lookup
Oscilloscope history wikipedia , lookup
Oscilloscope types wikipedia , lookup
Electronic engineering wikipedia , lookup
Project Number: P13323 OPTO-ELECTRIC GUITAR PICKUP (REV. 2) Chris Steele Mechanical Engineering Chris Perry Electrical Engineering Robert Paul Hoops Electrical Engineering Rachel Arquette Electrical Engineering Joe Mauger Electrical Engineering Ye Kuang Electrical Engineering Caroline Lichtenberger Electrical Engineering ABSTRACT The vibrational movements of stringed instruments have been detected primarily through the use of fluctuations in a magnetic field. The problem is that magnetic pickups produce a weak signal and have a limited frequency response. The purpose of this project was to design and create a guitar pickup that accounts for the disadvantages of magnetics, through the use of optical sensors. The vibrational signal of a stringed instrument will be detected by the intersection of a string with a light beam between an infrared LED and a matched photo-transistor. The incoming signal will then be selectively filtered by either digital or analog signal processing. The sensing unit of the pickup is portable, and removable from the sound-board of a guitar, without any required modifications or permanent fixtures. INTRODUCTION Current market options for guitar string pickups are limited to magnetic and piezo-electric types with the former being most common. The magnetic type, using wire wound permanent magnets under each string, are fastened to the guitar permanently or integrated into its design. The use of wound magnets will cause damping of the true string vibration and may result in the unintended detection of any uncontrolled RF in the vicinity (fluorescent light ballasts, power supply transformers, etc). Piezo-electric systems are not prone to electrical noise, but are limited to detecting the vibrations of the guitar body itself, since they cannot discriminate between strings, and therefore have mechanical noise concerns as well. The goal of this project is to create a non-contact, optically driven guitar pick-up using infrared sensors that are temporarily affixed to a guitar and that reproduce string tones through an analog or digital filter set. This is a completely optical system for each string so that each note is filtered and reproduced individually, thereby minimizing the influences of mechanical and electrical noise interference, while being easily removable. The pick-up mounts completely under the strings by the rear bridge (with the exception of a small upper photo-transistor mount) and does not impede playing the guitar for most users. To be used effectively, it is mechanically adjusted to the guitar’s string spacing and automatically adjusts to any difference in signal offset coming from the sensors which results from string type and diameter differences. This prototype system will demonstrate the effectiveness of optical pickups and hopefully create interest in an unexplored area of opto-electric technology. DESIGN Copyright © 2013 Rochester Institute of Technology Page 2 Specifications This unit is foremost designed to be temporary, with no modifications to the guitar required. It has to satisfy the desire to switch digital and analog signal filtering quickly, with minimal lag time between them so that the user can compare the effects of each (filtering should encompass 20 Hz-20 kHz signals). The infrared optical pick-up system must be versatile enough to detect both fundamental and harmonic string tones out to approximately the 20th harmonic, but it cannot interfere with the original acoustic sound. Noise from the ambient environment will need to be dealt with as well. Sound reproduction must be clear and output should be from a standardized connector and at a standardized level (¼'' TRS, 894mV peak-to-peak). Additionally, the unit must be ergonomic and have a small learning curve so that it can be picked up and used by anyone. The enclosure and sensor will need to be aesthetically pleasing, with no exposed, loose components and the entire unit must be powered from one source. Battery life should be at least a couple songs. All of the aforementioned specifications must be developed and produced for under $500. A few designs for the sensors were formulated, having beam positions that are parallel, perpendicular, or diagonal to the soundboard. Circuitry enclosure locations were considered both on and off the guitar, and many filtering methods were theorized. The final product uses a space saving perpendicular sensor arrangement, with one set for each string. The enclosure is located on the hip to relieve ergonomic constraints on size that would be present if it was mounted to the guitar. Filtering is performed by active high-pass and low-pass Butterworth filters of the second order in the analog path and high-pass and low-pass Butterworth filters of the sixth order in digital path. Power is provided from a sole 9 V battery and output is from the common ¼'' TRS jack with signals at 894mV peak-to-peak. Optical Sensors The flow of information throughout the system originates at the string sensors. Each sensor consists of an 870 nm infrared LED and photo-transistor pair positioned vertically in a breakbeam setup mounted near the bridge. At rest, each string should lie directly between the LED and photo-transistor pair, creating the maximum physical impedance of the infrared light beam. As the strings are plucked/strummed, they oscillate between their respective sensor pair. The oscillation is detected by the photo-transistor in the form of the correlated oscillating light intensity caused by the string moving through the light beam. The photo-transistors translate the oscillating light intensity to an oscillating voltage. The signal obtained then goes through a processing stage to be outputted. The schematic for the sensor circuit is shown below in Figure 1, with the analog path circuit. Processing Paths As requested by the customer, the information gathered by the photo-transistors is filtered using either analog or digital implementation. First, the signal from the photo-transistor is passed through a gain stage to optimize the voltage range upon inputting to the microprocessor for the digital implementation. Depending on the position of the analog/digital switch, the signal is then passed through both a high-pass and low-pass filter using either an analog or digital implementation. The digital implementation is designed to mimic its analog counterpart. The cutoff frequencies for the aforementioned filters allow for the specific frequencies of each string and up to two harmonics to pass through un-attenuated. Each of the high-pass filters are designed to attenuate low frequency noise typically present around the DC level as well as the 60 Hz noise which may be present due to interference from the electrical outlets. P13323 Page 3 The information flow finally terminates in this system at the ¼” jack output. Both the analog and digital implementations contain a summing stage, which sums the output of all six strings as well as reducing the peak-to-peak voltage to a level compatible with commercially available headphones and amplifiers. Analog Filtering Path Low Pass Filter Design: A second-order Butterworth Filter was chosen for both the high- and low-pass filters. The poles are always the same in a second-order low-pass filter. The expression for normalized H(s) is shown below in Equation (1). (1) Element values in the normalized filter network designed so far – H(s) above – must be frequency-scaled in order to make the 3-dB frequency of the network fit the attenuation specifications given. In this case, the attenuation is 1. Equation (2) below is used to determine the ω3dB. (2) In the filter network designed above, leave the resistance values as they are. Replace each capacitance C by . In general, if the frequency-scaling factor is kf, then replaces each C. Table 1 shows the calculated results for all 6 strings as well as real-world values for capacitors. This refers to commercially available elements, each with a tolerance generated by the manufacturing process. When the calculated values are replaced with real-world values, the LPF passes frequencies slightly higher than the planned cutoff. Table 1: Calculations for Low Pass Filter Passive Values High Pass Filter Design: To design a second-order Butterworth high-pass filter, first design a low-pass filter with high-pass cutoff frequency and apply the RC-CR transformation, which consists of replacing each R in the LPF by a capacitance of value (1/R) Farad and replace each C in the LPF by a resistance of value (1/C) Ohms. The resulting network is a HPF with the 3-dB frequency at 1 rad/s. When the calculated values are replaced with real-world values, the HPF passes frequencies slightly lower than the planned cutoff. Table 2 shows the calculated results for all 6 strings as well as real-world values for capacitors. Table 2: Calculations for High pass filter P13323 Page 4 Full Analog Path: The full analog path, containing gain stage, low pass filter, high pass filter, and summing amplifier, is shown as a PSpice model in Figure 1 for the low E string. For completeness, the sensor circuit is also shown on this model. Figure 1: Low E String Analog Path Digital Filtering Path Microcontroller and Hardware: The basic functionality of the digital processing path is to take the analog signals from each of the six guitar strings, convert them to their respective digital formats, filter using the same filtering format as the analog path, sum the signals together, convert the processed signal back to an analog signal, and send the analog signal to the output jack. The analog to digital conversion (ADC) and all relevant signal processing algorithms are handled by the microcontroller. The digital to analog conversion is handled by an external digital to analog converter (DAC). Since six ADC channels are required in order to read each string, a feature known as the direct memory access controller (DMA) is used. The DMA allows for the transfer of data between peripheral modules and memory. The DMA reduces overhead by avoiding processor intervention (i.e. interrupts) for data transfers. As a result, the performance of the processor is improved and software design is simpler. Much like in the analog path, each string is filtered with a series of high pass and low pass filters before summing the signals together. The implementations of the high and low pass filters are their finite impulse response (FIR) implementations. FIR filter implementations run faster in software and are simpler to implement with given DSP library functions. The microcontroller selected for the digital signal processing (DSP) path of the guitar is the Atmel AT32UC3L064. Major factors in the selection of the processor for this project included ADC resolution and speed, the number of ADC channels, processor speed, processor cost, and processor power consumption. The AT32UC3L064 is a 32 bit AVR architecture with 64 Kbytes of Flash memory, clock speeds up to 50 MHz (64 DMIPS), 8 12-bit (28 ksps) ADC channels, 12 DMA channels, and DSP instructions. The AT32UC3L064 typically operates between 1.62 and 3.3 V. Assuming the processor is running on 3.3 V, the ADC uses 14.9 µA/MHz; the TWIM uses 5.1 µA/MHz; and the worst case for the digital filtering algorithm is 260 µA/MHz. As it is uncommon to find a DAC on most microcontrollers, an external DAC had to be selected. The DAC chosen under terms of cost, resolution, and simplicity of interfacing with the microcontroller is the Microchip MCP4728. The MCP4728 is a 12-bit quad DAC with on-board EEPROM. The communication interface for the DAC is the two wire interface, I2C. The I2C protocol is compatible with the processor’s TWIM (two wire interface master mode) interface. The schematic for the digital path is shown in Figure 2. P13323 Page 5 Figure 2: Digital Circuit Software Layout: The software file structure is given by Table 3. The idea behind this software structure is to allow for ease of software expandability, readability, and re-usability. Therefore, it makes sense to break down the embedded code into source files based on the microcontroller peripheral feature being used. File Name Description OptoGuitar.c Main source file (i.e. main(void) function call) OptoADC.h ADC configuration header file OptoADC.c ADC configuration source file OptoDMA.h DMA configuration header file OptoDMA.c DMA configuration source file OptoTWIM.h TWIM configuration header file OptoTWIM.c TWIM configuration source file OptoGPIOConfig.h GPIO configuration header file OptoGPIOConfig.c GPIO configuration source file Table 3: Software File Descriptions In OptoGuitar.c, all calls to the peripheral functions defined in their respective source files are made. All other source files listed in Table 3.1 relate to their respective peripheral functions. Figure 3 shows the software flowchart. The flowchart describes how the software for the system goes together. After initializing each peripheral, the software remains in an infinite loop, triggering an interrupt every 48 kHz (0.021 ms) in order to maintain a fixed sampling rate equivalent to that of high quality audio recording devices. Once the software enters the interrupt service routine (ISR), all ADC channels are read, the signals are processed, converted back to an analog signal, and sent to the output. P13323 Page 6 Figure 3: Software Flowchart Power Management The power regulation consists of three main sections, the battery, the battery indicator, and the voltage regulators. The battery was chosen based on the selected components, the required energy to run entire circuit efficiently, and the need to power the circuit for a set amount of time. The battery chosen is a Tenergy 9 volt lithium ion battery, with a 500 mA output. The battery indicator section consists of two zener diodes at 4.3 volt forward voltage, two 10 kΩ resistors, and an LED. The indicator circuit will remain lit up, indicating a good battery life, and will turn off when the battery goes below approximately 7.25 volts. The voltage regulators will convert the incoming 9 volts into steady ±5 volt rails, giving the required two voltage rails. Figure 4: Schematic for Power Regulation and Battery Indicator PCB Layout The Printed Circuit Board (PCB) was designed using ExpressPCB software. The PCB contains four layers: components are soldered to the top layer with traces routed to the ground plane and positive plane, both located on the inner layers, and signal trace on the bottom layer. Two PCBs operating in parallel fully accommodate the six strings of an acoustic guitar. The boards are identical, with the first board populated with three strings of the analog path, all of the digital path, and the power regulation and the second board populated with the remaining three strings and the sensor circuit resistors. The layout currently in use is shown in Figure 5. P13323 Page 7 Figure 5: PCB Schematic Layout Mechanical Components Mounting and operation of the system in a simple, intuitive mannerr is required. The whole system consists of two major components: the optical sensor system and the processing enclosure. Each sensor unit consists of an LED / photo-transistor pair that mount on pods (Fig 6) in a break beam arrangement with the string, varying the amount of light permissible to the photo-transistor. Adjustments to sensor position upon installation to a guitar can be made in two ways (two degrees of freedom) that will not cause movement in any other direction than the one intended. The first degree of freedom, offset height from the string to each component, is adjustable via set screws acting on a guide. This gives the correct distances between the string, photo-transistor, and the emitter to provide the photo-transistor with a signal that will not cause saturation at any point in the strings movement, as saturation gives no data as to string position. A second degree of freedom provides the horizontal placement of the pair to account for variations in string spacing, which is also positionable with set screws and a guide on the guide bed, so that as the string swings back and forth, the lowest light level detected by the photo-transistor is at the strings resting (or zero offset) position. String swath was accounted for in the dimensions of each sensor pod and under heavy strumming the string will never contact another surface. The guitar system uses 6 sets of identical mounts, each tuned individually to their string, but all identical in specifications when manufactured. All components are modular and can be replaced individually if required, without dismantling the entire setup. The enclosure for housing both analog boards, the digital board, and the battery is remote from the guitar and is attached to the player with a belt-clip. This relieves the problem of placing the enclosure on the guitar in an ergonomic location (of which there are very few). Inside the enclosure, the digital board is mounted to the back (the removable cover being the front) by four standoffs (one in each corner). Each analog board is then mounted on two standoff adapters that run through the digital board and connected in between to limit flex and remove any breakage concern during rough use. The battery is mounted to the bottom in a clip, next to a 1/4” TRS jack. The jack is on the bottom to aid in strain relief of the cable. Input from the guitar comes in the left side, as it is expected that the unit is worn on the left of a right handed guitar player. Six switches are mounted on the top surface (one for each string) along with the power switch for the P13323 Page 8 unit and the jack switch. The unit is designed to be ergonomic to use while playing in both sitting and standing positions and has a short learning curve when first introduced. RESULTS The system meets most of the customer needs and specifications. There were several changes made to the specifications with approval of the customer, due to unforeseen design constraints. Each subsystem functions properly. The sensors were tested under normal conditions and output expected results to be sent to the processing paths. The analog path was observed using an oscilloscope at every stage to ensure functionality. The result of a single strum of the guitar strings after being processed and summed is shown in Figure 7. The results of the digital path testing gave less than expected results, due to the current DAC’s clock samples not being quick enough for an accurate 48 kHz sampling frequency. This is due to clock speed limitations of the I2C bus. The output of the DAC with the poor sampling rate is shown in Figure 7. The voltage regulators in the power system were tested to maintain an output of ±5 volts from a range of 9 V to approximately 7.25 V. Figure 7: Oscilloscope Captures of Outputs, Analog Path (left) and Digital Path (right) CONCLUSION AND RECOMMENDATIONS Overall, this project was a success because the analog path and digital path both proved their functionality. The team learned a lot about processing, both using analog means and digital means. Though the system functions as expected, there is a vast amount of room for improvement. Future work for this project could be explored with regards to sound quality, ease of use, efficiency of resources and/or power, and even processes for commercial availability. ACKNOWLEDGEMENTS Optical Pickup Team would like to thank our guide Les Moore and our customer and technical advisor Dr. Patru. We would also like to acknowledge other faculty support from Professors Slack, Indovina, and Barrios, Dr. Puchades, and Ken Snyder. In addition, the Team would like to thank fellow student Alex Coleman for valuable input throughout the MSDI process. P13323