Difference between revisions of "F15: Electronic Piano"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Hardware Design)
(Hardware Design)
Line 177: Line 177:
 
Discuss your hardware design here.  Show detailed schematics, and the interface here.
 
Discuss your hardware design here.  Show detailed schematics, and the interface here.
 
     [[Power Circuit]]
 
     [[Power Circuit]]
 +
    [[SJSU OneBoard]]
 +
    [[VS1033]]
 +
    [[Analog to Digital Converter Circuit]]
 +
    [[LED Driver]]
  
 
=== Hardware Interface ===
 
=== Hardware Interface ===

Revision as of 00:01, 17 December 2015

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

Electronic Piano with Motion Controlled LED Keys

Abstract

The purpose of this project is to design a motion controlled electronic piano powered by an SJ-One Board. The piano will be able to play the notes of a piano using motion sensors as keys. At activation, LEDs will light up the key. The physical size of the piano will cover a single octave; however, the board will provide, the player, control to change the scope of the notes across other octaves.

Objectives & Introduction

Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.

Team Members & Responsibilities

  • Jason Tran
    • Design and write the software
    • Design and build the power circuit and ADC circuit
  • Arthur Nguyen
    • Design and build the wooden frame
    • Mount boards and IR keys onto the wooden frame
    • Design and build the LED circuit

Schedule

Show a simple table or figures that show your scheduled as planned before you started working on the project. Then in another table column, write down the actual schedule so that readers can see the planned vs. actual goals. The point of the schedule is for readers to assess how to pace themselves if they are doing a similar project.

Week# Date Task Actual
1 10/30 Project proposal Completed. .Went over entire project in theory of both hardware and software design.
2 11/6 Part testing and project outline Completed testing Sharp IR sensor and MIDI controller interface.
3 11/13 Order parts Completed order of essential parts including VS1053, short IR sensors,IR jumper wires, and analog to digital converters. Completed software.
4 11/20 Setup all keys with sound. Completed playing sounds with key activation.
5 11/27 Volume control and power circuit. Completed.
6 12/4 Combine circuits and start mounting system. Ordered LEDs and LED driver. Started mounting system onto board.
7 12/11 Build LED circuit and implement software for LEDs. Combine circuits and mount to board. Completed on 12/16.
8 12/17 Final changes and demo Completed demo on 12/17.

Parts List & Cost

Give a simple list of the cost of your project broken down by components. Do not write long stories here.

Quanitity Price per part Part Detail Vendor
1 $40 SJ-One Board Microcontroller SJSU SCE
12 $13.95 GP2Y0A41SK0F Infrared Proximity Sensor Short Range-Sharp SparkFun
12 $1.50 3-pin JST Infrared Sensor Jumper Wire SparkFun
6 $2.30 MCP3002 Analog to Digital Converter SparkFun
12 $0.202 WP59EGW/CA Red/ Green Diffused Common Anode LED Mouser
1 $1.48 TLC6C5912QPWRQ1 12 Channel Shift Register LED Driver Mouser
1 $5.42 LCQT-TSSOP20 TSSOP to 20DIP Socket Adapter Mouser
1 $19.95 VS1033D MP3 breakout board/ MIDI decoder SparkFun
1 $1.95 LD1117V33 3.3 V voltage regulator SparkFun
1 $1.50 PRT-08032 3.5 mm audio jack SparkFun
2 $1.25 PRT-09011 USB female type A speakers SparkFun
1 $13.00 AL-101 USB powered speakers Amazon
24 $0.04 MCP3002 150 Ohm resistor Fry's

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

    Power Circuit
    SJSU OneBoard
    VS1033
    Analog to Digital Converter Circuit
    LED Driver

Hardware Interface

SPI was used used to communicate with the ADC devices, the MIDI decoder, and the LED driver. Essentially, the SPI driver used the following setting: MSB first, 8-bit data frame, and 500 KHz clock. Meanwhile, GPIO was used as control signals, such as chip select and output enable, for the MIDI decoder and the LED driver.

   namespace My_spi {
       void init_ssp1_spi( void );                   // Using SCK1, MISO1, MOSI1 (P0.7, P0.8, P0.9)
       void init_cs( uint8_t port, uint8_t pin );
       char spi_exchange_byte ( char byte );
       void cs_select( uint8_t port, uint8_t pin );
       void cs_deselect( uint8_t port, uint8_t pin );
   }
   namespace My_gpio {
       void set_gpio_mode( uint8_t port, uint8_t pin, bool mode );
       void digital_write( uint8_t port, uint8_t pin, bool state );
       bool digital_read( uint8_t port, uint8_t pin );                     // Assuming active high input
   }

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

LED driver soldering

At first, the LED driver had difficulty implementing. The problem that occurred was that the soldering of the LED driver to the TSSOP to DIP20 adapter may have created a short along the way. After fixing the soldering, the data was able to be sent to the LED driver as expected.

ADC chip select

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

https://youtu.be/DqBue8DKsk0

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

Short IR data sheet Media: CMPE146_F15_ElectricPiano_shortIR.pdf

Analog to digital converter datasheet Media: CMPE146_F15_ElectricPiano_ADC.pdf

LED driver data sheet Media:CMPE146_F15_ElectricPiano_LEDdriver.pdf

Appendix

You can list the references you used.