Advertisement

Quick Links

ECE 492 Capstone Project
2013W
Virtual Guitar Gloves
Summary: Play a virtual guitar in the air by using two gloves fitted with tactile sensors
and an accelerometer.
Group Members:
Elysia Jong
Qingyue Zhou
ejong@ualberta.ca
qingyue@ualberta.ca

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 492 and is the answer not in the manual?

Questions and answers

Summary of Contents for ECE 492

  • Page 1 ECE 492 Capstone Project 2013W Virtual Guitar Gloves Summary: Play a virtual guitar in the air by using two gloves fitted with tactile sensors and an accelerometer. Group Members: Elysia Jong ejong@ualberta.ca Qingyue Zhou qingyue@ualberta.ca...
  • Page 2 Abstract Terasic’s V.1.6 DE2_SD_Card_Audio demonstration was used as a base for this project. By default, it waited for an SD card to be inserted into the FPGA’s port, then played all the files within it in sequence through audio out. The files are assumed to be of .wav format with a 48 kHz sampling rate.
  • Page 3: Table Of Contents

    Table of Content FUNCTIONAL REQUIREMENT ......................3 : ............................3 PECIFICATION : ............................. 3 OW TO USE : ............................ 3 OALS ACHIEVED DESIGN AND DESCRIPTION OF OPERATION ................. 4 : ............................5 LOW CHART :......................5 NPUT TO OUTPUT FUNCTIONALITY : ..........................
  • Page 4 : ........................23 ACKUP LANS PTIONS : ............................24 XTENSIONS HARDWARE DOCUMENTATION....................... 25 : ..............26 LOCK DIAGRAM OF INTERACTIONS BETWEEN PROCESSES : ........................26 NDEX TO SOURCE CODE...
  • Page 5: Functional Requirement

    Functional Requirement Specification: Our virtual guitar consists of 2 gloves. There are 7 tactile sensors on the left hand, which are used for 7 notes (A to G). There are 4 sensors on the right: 2 used to go up/down octaves, 1 to switch from playing notes to chords or vice versa, and a reset to the original mode (notes with default octave).
  • Page 6: Design And Description Of Operation

    The tactile sensors, combined with hardware debouncing, had no issues. The left hand sensors correspond to the correct notes/chords and the right hand’s mode switch (for selecting notes/chords), octave up, octave down, and reset buttons were functional. The LCD also correctly displayed whether the user was in note or chord mode and which octave.
  • Page 7: Flow Chart

    Flow chart: Image 2: Software design flow Input to output functionality: 1 Tap sensor and accelerometer signals detected from GPIO pins 2 Based on input, read sound file from SD card 3 Output sound file to speakers connected to FPGA Algorithms/Tasks: “task_which_note”...
  • Page 8: Bill Of Materials

    BASE_ADDRESS, it corresponds to a tactile sensor being depressed. The sector that should be read from the SD card is then updated depending on which sensor it was. While polling is generally wasteful for CPU cycles, this system has no need to do any other critical computation or tasks other than to respond to the user’s actions.
  • Page 9: Reusable Design Units

    2GB SD Card $10.00 $10.00 $9.95 $9.95 Accelerometer (MMA8452Q) Digital output via I2C bus. Low voltage to interface (1.6- 3.6V). ±2g/4g/8g 3-axis. Package is about the size of a quarter. 1.95-3.6V supply. 2 programmable interrupt pins. Supplier: https://www.sparkfun.com/products/10955 Datasheet: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Ac celerometers/MMA8452Q.pdf $0.05 $0.55...
  • Page 10: Datasheet

    3. For the SD card, the application note “SD_Card_Interfacing” created by Jason Brown & Brady Thornton (Group 12) of Winter 2013 can be used as a substitute plan: https://www.ualberta.ca/~delliott/local/ece492/appnotes/2013w/SD_card_interfacing/ Datasheet User Perspective Diagram Image 3: User perspective diagram User I/O Signals: All GPIO inputs are driven by +3.3 V and are active low.
  • Page 11 GPIO_0[10] Note A tactile sensor on left index tip Input GPIO_0[12] Note B tactile sensor on left middle tip Input GPIO_0[14] Note C tactile sensor on left ring tip Input GPIO_0[16] Note D tactile sensor on left pinky tip Input GPIO_0[18] Note E tactile sensor on left index tip below Note A Input...
  • Page 12: Ribbon Header Mapping

    Image 4: GPIO pin schematic Ribbon Header Mapping Image 5: Ribbon Header Mapping...
  • Page 13: Accelerometer Interface

    Accelerometer Interface: Signal Description Type sda_padoen_o data enable scl_i2c_to_accel i2c clock to accelerometer sda_i2c_to_accel i2c data to accelerometer inout scl_i2c_to_bus i2c clock to i2c bus sda_i2c_to_bus i2c data to i2c bus inout interrupt2 int2 on accelerometer avalon_slave_address avalon_slave.address avalon_slave_readdata avalon_slave.readdata avalon_slave_writedata avalon_slave.writedata avalon_slave_write_n...
  • Page 14: External Circuitry Schematic

    External Circuitry Schematic: Image 6: Schematic Power: The below values were obtained with a DE2 power measurement wiring harness connected to the system: Idle: 0.447A, 9.10V Power = I R = (0.447 to 0.457) 9.10 = 1.818 to 1.901 [W] Peak: 0.457A, 9.10V Background Reading 1.
  • Page 15 program is going to read 512 bytes each time, write the data to the DAC FIFO in the audio controller, and then enter the next loop. In our design, we should know base/starting address of each sound file, and how many loops we are going to read for each of them. 2.
  • Page 16 http://dcodelab.files.wordpress.com/2012/11/command.jpg Furthermore, SD card initialization, data reading, data writing, and data erasing, were explained. The information was extremely similar to what we are doing for our project (based of off Terasic’s demo.) and multiple example projects we have found have used the same methods for SD card communication (1-bit SPI).
  • Page 17: Software Design

    http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6278363&contentType=Books+ %26+eBooks&searchField%3DSearch_All%26queryText%3DAltera+Quartus+II+Tutorial This is a tutorial article for Altera Quartus II. It includes several functions of Quartus II. We found it is very useful under the section “B6. Making Pin Assignment”. It helped us to complete our application notes, which is about applying internal weak pull-up resistor in Quartus Software design The software design is based on Nios II, uC/OS-II.
  • Page 18: Block Diagram

    all the messages from other tasks and analyze the signals to perform the next correct move. It is going to monitor the sensors’ signals from the player’s left hand by polling. There are seven tap sensors/switches on the left hand glove. We could distinguish all those signals by assigning them to different pins on the GPIO on DE2 board.
  • Page 19: List Of Libraries

    List of Libraries: Name Description "altera_avalon_pio_regs.h" Provides a hardware interface that allows software to access the PIO. "altera_avalon_lcd_16207_regs.h" Provides a hardware interface that allows software to "altera_avalon_lcd_16207.h" access the two (2) internal 8-bit registers in an Optrex model 16207 (or equivalent) character LCD display (the kind shipped with the Nios Development Kit, 2 rows x 16 columns).
  • Page 20: Test Plan

    const int cmd24[5] = {0x58,0x00,0x00,0x00,0x00}; /* Write a single block */ const int acmd41[5] = {0x69,0x0f,0xf0,0x00,0x00}; /* Active Card's ini process */ const int acmd42[5] = {0x6A,0x0f,0xf0,0x00,0x00}; /* Disable pull up on Dat3 */ const int acmd51[5] = {0x73,0x00,0x00,0x00,0x00}; /* Read SCR(Configuration Reg) */ note: we are not using all of these commands.
  • Page 21: Results Of Experiments And Characterization

    Decrease octave works on all notes Reset sends system to note mode and default octave No sound plays if no tactile sensors are engaged but accelerometer detects No failure if user holds the chord/up octave/down octave/reset buttons instead of pressing them Playing one note and another in quick succession should cut off the first note (no overlap) Response time and performance...
  • Page 22: References

    [4] Altera Corporation. “Audio/Video Configuration Core for DE-Series Boards.” Internet: ftp://ftp.altera.com/up/pub/Altera_Material/12.0/University_Program_IP_Cores/Audio_Video/A udio_and_Video_Config.pdf, May 2012 [Jan. 26, 2013]. [5] R. Wong, V. Santhanagopalan. “ECE 5760 - Final Project Music Player.” Internet: http://people.ece.cornell.edu/land/courses/ece5760/FinalProjects/f2010/vs327_rw363/WAV_pla yer/ECE%205760.htm, 2010 [Jan. 27, 2013]. [6] Z. Lai, Z. Liu, M. Li, Q. Yuan. “MP3 Player.” Internet: http://www.cs.columbia.edu/~sedwards/classes/2010/4840/reports/KH.pdf, 2010 [Jan.
  • Page 23 bin/page/archive.pl?Language=English&CategoryNo=165&No=30&PartNo=4, Nov. 16, 2006 [Feb. 2, 2013] [8] N. Minderman. “niosII_microc_lab1.vhd.” Internet: https://eclass.srv.ualberta.ca/mod/resource/view.php?id=529057, Jan. 8, 2013 [Jan. 26, 2013] [9] Terasic Technologies. “DE2_system_v1.6.zip.” Internet: https://eclass.srv.ualberta.ca/mod/resource/view.php?id=232128, July 19, 2006 [Feb. 3, 2013] [10] C. Smart, T. Davis. “G8_Accelerometer/.” Internet: https://www.ualberta.ca/~delliott/local/ece492/appnotes/2013w/G8_Accelerometer/, Mar. 25, 2013 [Apr.
  • Page 24: Appendices

    Appendices Quick Start Manual Hardware: Image 9: Placement of sensors modified from http://media.npr.org/assets/news/2010/01/27/hands- ef12ac2473025791c19e4478b5ca0078c2fa1942-s6-c10.jpg Overview: Left-hand: 7 notes/chords (depending on which MODE) A-G. Right-hand: - Reset: reset to default setting (note mode with 0 octave). - Mode Switch: switch between note and chord mode. - Octave Up: increasing the octave by 1 level.
  • Page 25: Software

    Software: Steps for non-volatile version: 1. Navigate to the directory of this project. 2. Run ./scripts/launch_quartus.sh in the terminal. 3. Compile the code in Quartus task section. 4. Flash the compiled .sof file to the DE2 board (JTAG port). 5. Run ./scripts/launch_niosII.sh in the terminal. 6.
  • Page 26 (SHARP GP2D15 F 52) was successfully implemented as a backup. This sensor requires a 5V power supply and outputs a digital signal (0 for non-detection, 1 for detection). Thus, it was very easy to interface and power it through the GPIO pins on the DE2. The accelerometer was still chosen as the main option for strumming detection as it provided much more features that can be used to extend upon this project.
  • Page 27 Hardware documentation Image 10: Hardware block diagram...
  • Page 28 Source code section: Block diagram of interactions between processes: Image 11: Software block diagram Index to source code: Status: -Not compiled successfully -Compiled without errors -Executed or otherwise demonstrated -Tested and passed Source File (Created) Description Status hello_ucosii.c Main C file modified from Terasic’s “DE2_SD_Card_Audio.”...
  • Page 29 terasic_includes.h From Terasic’s demo. Links to other header files. i2c_ctrl.h/i2c_ctrl.c From Reference [10], controller for the accelerometer I2C bus. accelerometer.h/ From Reference [10], controller for the accelerometer. accelerometer.c DE2_SD_Card_Audio.v Top level Verilog file modified from Terasic’s “DE2_SD_Card_Audio.” opencores_i2c_master.vhd Top level VHDL file of i2c bus modified by Troy. Table 7: Created source files Source File Description...
  • Page 30 noteB.v SOPC builder - tap sensor noteC.v SOPC builder - tap sensor noteD.v SOPC builder - tap sensor noteE.v SOPC builder - tap sensor noteF.v SOPC builder - tap sensor noteG.v SOPC builder - tap sensor Oct_DOWN.v SOPC builder - octave down tap sensor Oct_UP.v SOPC builder - octave up tap sensor SD_CLK.v...

Table of Contents