ECE597 Fall 2014 Project Bonekey Bonekey
Embedded Linux Class by Mark A. Yoder
Team members: Jiayu Guo, Zizhao Wang
Contents
Grading Template
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!
09 Executive Summary 09 Installation Instructions 06 User Instructions 08 Highlights 05 Theory of Operation 00 Work Breakdown 10 Future Work 09 Conclusions 10 Demo 10 Not Late Comments: I'm looking forward to seeing this. Score: 76/100
Executive Summary
We got the idea from Makey Makey which is a invention-kit to use everything to be Keyboard. like banana, water, even cat. For this project, we created a Bonekey Bonekey to play with sound. Our Bonekey Bonekey uses banana as keyboard to play piano tones. This design is consisted of a main microcontroller, a PCB board, a USB sound card, and an audio player. We use Beaglebone to get the different input informations and produce corresponding tones to the audio player. One of human's wrist is mounted by reference ground and human can use either figure to touch bananas to produce different tones. Our Bonekey Bonekey will not only use bananas as inputs but also apples, water and everything.
Installation Instructions
Hardware
PCB
The board and the schematic files can be found in the Github repository.
SV1 - Connect to the beagle bone from P8_7 to P8_17.
SV2 - Connect to bananas.
SV3 - middle pin connect to power and the two side pin connect to ground.
BOM
Qty | Value | Parts |
---|---|---|
7 | 1M | R1, R2, R3, R4, R5, R6, R7 |
7 | 2N2222 | T1, T2, T3, T4, T5, T6, T7 |
7 | 4.7M | R8, R9, R10, R11, R12, R13, R14 |
USB Sound Card
Since the beagle bone doesn't have an audio output we need to add a USB sound card to the bone.
We have tested two USB sound cards
USB 2.0 EXTERNAL 2.1 SURROUND SOUND ADAPTER
CREATIVE SOUND BLASTER X-FI GO! PRO
All together
Software
Build CSound from source
Build Csound from source Beaglebone. The BonekeyBonekey need CSound6 but the apt-get version is still CSound5
bone$ sudo apt-get build-dep csound bone$ sudo apt-get install cmake git bone$ cd ~ bone$ mkdir csound bone$ cd csound bone$ git clone https://github.com/csound/csound.git csound bone$ mkdir cs6make bone$ cd cs6make bone$ cmake ../csound bone$ make -j2 bone$ sudo make install bone$ sudo ldconfig bone$ cd cs6make
Clone BonekeyBonekey Repository
bone$ git clone https://github.com/MikuZZZ/BonekeyBonekey
Disable HDMI
Follow | this link to disable HDMI, and make some GPIO pins available.
Make the USB sound card as the default output
copy the asoundrc file from the Github repository to your home folder.
bone$ cd asoundrc ~/.asoundrc
User Instructions
1. Connect PCB borad to beaglebone P8-GPIO5, 7, 9, 11, 13, 15, 17.
2. Wire up seven bananas to the 7 inputs of the PCB board.
3. connect the USB sound adapter to the beaglebone, and also connect a earphone all audio player.
4. Run the Bonkey program.
bone$ python BonkeyBonkey.py
Then you an play the bananas.
Highlights
Add some text here that's also talking about what your project can do. The video is nice. Could you also include a picture that shows the bananas?
Here is where you brag about what your project can do.
https://www.youtube.com/watch?v=SFFVrcGGZdw
Theory of Operation
I'd like to see more details on how your Python code works. Give a flowchart for the code. Give an overview of how Csound works
1- Input
- The bananas are the inputs of Bonekey Bonekey
- By touching the banana, the input will be shorted to ground.
2 - Transistor Switch
- We uses transistor 2N2222, 4.7M and 1M resistor.
- The base of transistor is connected to bananas, and once transistor's base grounded, the emitter of transistor will drop down to 0V.
3 - GPIO Interrupt
- Beaglebone read the input through GPIO interrupt, and disable the internal pull-up resistor.
4- Csound
- Using Csound to play tones.
Work Breakdown
Tell me who did what.
- PCB
- GPIO Read Input
- Csound Play Sound
Future Work
- Use serial port for input so that we can add more input keys and make a real midi device
- Optimize CPU usage in csound so the BeagleBone can generate more notes at the same time
- Add some more instrument tones, and use a push button to select them
Conclusions
In this project, we designed a banana midi piano, which is consist of a BeagleBone, a PCB, USB sound card and a audio player. So far we can only play very easy songs with these seven piano notes. In the future, we may add more features, like add more inputs or add different tones to play more songs. As well we may optimize CPU usage to play more notes simultaneously and Coherently.
Embedded Linux Class by Mark A. Yoder