1 / 1

A Single Octave 32 kHz Auditory Output Device

Procedures:. A Single Octave 32 kHz Auditory Output Device. Hardware Used: -PSoC CY3214 circuit board -Auditory amplifier -Copper electric tape -Assorted wires and capacitors -Acrylic Plexiglas boards -MiniProg programming device.

stacy
Download Presentation

A Single Octave 32 kHz Auditory Output Device

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Procedures: A Single Octave 32 kHz Auditory Output Device Hardware Used: -PSoC CY3214 circuit board -Auditory amplifier -Copper electric tape -Assorted wires and capacitors -Acrylic Plexiglas boards -MiniProg programming device 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. Go to User Modules on the left side of the main page: CapsenseCSDCSD with PRS16right-clickplaceOk. Change the Properties of CSD: Scanning Speed: fast, Resolution: 9. 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. Add buzzer: user modules PWMs PWM8placeright-click PWM8 then fix global properties and PWM8 properties for your board. Get your configuration files: BuildGenerate Configuration files for all. On Workspace Explorer go to the last folder and click on the + then the + on the Source Files and open Main.C. Edit the Main.C and add the C Program. 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. Lightly touch the Capsense button and listen for the buzzer to go off. By: Erick Ruiz and Jeffrey Rollman UCSD COSMOS 2008 Cluster 1: Adventures in Embedded Computer Systems August 2, 2008 Software Used: -Cypress Semiconductor’s PSoC Designer 5.0 (C programming language) -Cypress Semiconductor’s PSoC Programmer -A Windows computer 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? 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 An early prototype of the CapSense device The completed CapSense keyboard coupled with PSoC CY3214 circuit board. The final CapSense keyboard with PSoC circuit board 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. Possible Further Applications: A CapSense electric guitar can be created after over- coming wiring issues. 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 Source Code: Sample variables: int freq; inttime_val; intout_freq; structnoteNames{ int C4; int C4Sharp; int D4; Notes Function: intplayNote(int freq, int time) {intout_freq = 32000/freq; inttime_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: structnoteNames 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 "); } 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. Acknowledgements: Thank you to the following: -Professors: Rajesh Gupta ChoonKim -Teacher Fellow: Shirley Miranda -T.A.s: ArashArfaee Bridget Benson -COSMOS staff

More Related