Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Single Octave 32 kHz Auditory Output Device By: Erick Ruiz and Jeffrey Rollman Research Problems: -Can a PSoC device be programmed to allow for auditory.

Similar presentations


Presentation on theme: "A Single Octave 32 kHz Auditory Output Device By: Erick Ruiz and Jeffrey Rollman Research Problems: -Can a PSoC device be programmed to allow for auditory."— Presentation transcript:

1 A Single Octave 32 kHz Auditory Output Device By: Erick Ruiz and Jeffrey Rollman Research Problems: -Can a PSoC device be programmed to allow for auditory output? -Is it possible to create a workable external CapSensing device that can overcome issues associated with accuracy, signal loss and wiring difficulties? -How can reliable pin connections be maintained with the large number of pins needed? Abstract: The PSoC (Programmable System on Chip) device is a highly adaptable circuit board that can be programmed to allow for complete usage of the various onboard components. A PSoC device can be programmed for auditory output if it has the right components installed. The CY8C24894-24FLXI PSoC board contains a buzzer which allows for use of the board as an auditory output device. Additionally, the board includes a CapSense (Capacitive Sensor) component. This CapSense component includes touch sensitive buttons along with a slider which enable the input end of the project. Utilizing a CY3214 device, an octave of a piano keyboard can be simulated. The base of the program was written in C programming language on Cypress Semiconductor’s PSoC Designer 5 software. Initially, the program was written to work with only one board, allowing one full octave. However, with some modification, the C code can be modified successfully to allow two boards to connect and utilize both CapSense components. In addition, with even further development and more research, the board was able to be connected to external CapSense buttons that would serve as keyboards for the full octave to be outputted and also including a “whammy” slider for whammy effect on notes. With much testing and debugging, the device output was successful, with the CapSense components utilized to allow for a single full octave, including sharp and flat notes. Since the board was apt for that kind of customization, we tested it to see if an amplifier would have sustained. The amplifier sustained and the output was significantly cleaner. The board, with further programming, has the capability to play full songs with the amplifier. This application of the PSoC device is very promising for future embedded systems design as it demonstrates the feasibility of user friendly entertainment devices with flexible inputs and outputs. The PSoC is a revolutionary device that if used for specific uses, may surpass the dominance of multi-purpose personal computers. UCSD COSMOS 2008 Cluster 1: Adventures in Embedded Computer Systems August 2, 2008 Hypotheses: -PSoC Designer 5.0 can be used to program a digital entertainment device -An external CapSensing device can be created on Plexiglas acrylic -Input from CapSense can create an output of varying sounds from PSoC circuit board Hardware Used: -PSoC CY3214 circuit board -Auditory amplifier -Copper electric tape -Assorted wires and capacitors -Acrylic Plexiglas boards -MiniProg programming device Software Used: -Cypress Semiconductor’s PSoC Designer 5.0 (C programming language) -Cypress Semiconductor’s PSoC Programmer -A Windows computer Acknowledgements: Thank you to the following: -Professors: Rajesh Gupta Choon Kim -Teacher Fellow: Shirley Miranda -T.A.s: Arash Arfaee Bridget Benson -COSMOS staff Purpose of Project: -Create a digital entertainment device using the PSoC circuit board -Create a user friendly interface for device operation - Ultimate Motivation : PSoC circuit board is relatively low cost and can serve as a universal platform for future consumer devices Conclusion: The PSoC board was successfully able to support CapSense buttons and an 8-bit Pulse Width Modulator (Auditory Output.) The PSoC CY824094 EVAL board was able to support two sliders and had enough space for two more buttons. This board is not suitable for more than one octave at a time. The external CapSense buttons had significant noise and are extremely sensitive to each other and length. Some of the CapSense buttons had to be assigned to different port’s pins in order to have them all working. The number of components and the number of CapSense buttons were inversely proportional to each other; the more components placed, the less could be used for CapSense buttons. The pins were assigned logically to position the wires so they would not touch each other or else interference occurred. The wires were then soldered to the copper tape and the copper tape was attached to the eight-inch acrylic sheet. The acrylic sheet is non conductive, thus allowing for capacitive sensing to work. This board sustained all the external CapSense buttons and the auditory output. The completed CapSense keyboard coupled with PSoC CY3214 circuit board. Source Code: Sample variables: int freq; int time_val; int out_freq; struct noteNames{ int C4; int C4Sharp; int D4; Notes Function: int playNote(int freq, int time) {int out_freq = 32000/freq; int time_val = 32000/time; return out_freq; } char frequency; Sample for Initialization: LCD_1_Start(); M8C_EnableGInt; CSD_1_Start(); LCD_1_Position(0,0); LCD_1_PrCString("Note: "); CSD_1_InitializeBaselines() ;//init baseline (start up scanning sensors) CSD_1_SetDefaultFingerThresholds() ; Sample for Notes’ Frequency: struct noteNames notes; notes.C4=261.63; notes.C4Sharp=277.18; notes.D4=293.66; notes.D4Sharp=311.13; notes.E4=329.63; Sample for Sharp Note: if(CSD_1_bIsSensorActive(2) && CSD_1_bIsSensorActive(0)) { frequency = playNote(notes.C4Sharp,100); PWM8_1_WritePeriod(frequency); PWM8_1_WritePulseWidth(20);//|------C4#-------| PWM8_1_Start(); LCD_1_Position(0,7); LCD_1_PrCString("C#"); } Sample for a note: //Notes Middle C (C4) 1 higher Octave C (C5) else if(CSD_1_bIsSensorActive(2)) { frequency = playNote(notes.C4,100); PWM8_1_WritePeriod(frequency); PWM8_1_WritePulseWidth(20);//|------C4-------| PWM8_1_Start(); LCD_1_Position(0,7); LCD_1_PrCString("C "); } else if(CSD_1_bIsSensorActive(3)) { frequency = playNote(notes.D4,100); PWM8_1_WritePeriod(frequency); PWM8_1_WritePulseWidth(20);//|------D4-------| PWM8_1_Start(); LCD_1_Position(0,7); LCD_1_PrCString("D "); } 1.Open PSoC Designer 5 and create new Chip Level Project and select the chip CY8C24894-24LFXI in the catalog. Be sure to select C as the Main file. 2.Go to User Modules on the left side of the main page: Capsense  CSD  CS D with PRS16  right- click  place  Ok. 3.Change the Properties of CSD: Scanning Speed: fast, Resolution: 9. 4.Right-Click CSD  CSD Wizard  fix your settings according to your necessities of your board. i.e.: 2 buttons, 1 slider: then drag and drop the port and pin number on the boxes. 5.Add buzzer: user modules  PWMs  PWM8  place  righ t-click PWM8 then fix global properties and PWM8 properties for your board. 6.Get your configuration files: Build  Generate Configuration files for all. 7.On Workspace Explorer go to the last folder and click on the + then the + on the Source Files and open Main.C. 8.Edit the Main.C and add the C Program. 9.Build  Generate/Build all Projects then Program your board with PSoC Programmer. Be sure to have IMAGECRAFT set in Tools  Options. In Programmer be sure you have selected Family 24X94 then in Device choose CY8C24894-24LFXI. Then file load “yourproject.hex” and then click Program. 10.Lightly touch the Capsense button and listen for the buzzer to go off. Procedures: Possible Further Applications: A CapSense electric guitar can be created after over- coming wiring issues. An early prototype of the CapSense device The final CapSense keyboard with PSoC circuit board


Download ppt "A Single Octave 32 kHz Auditory Output Device By: Erick Ruiz and Jeffrey Rollman Research Problems: -Can a PSoC device be programmed to allow for auditory."

Similar presentations


Ads by Google