• No se han encontrado resultados

CAPÍTULO IV PROPUESTA (COTIZADOR)

4.3 MANUAL DE USUARIO

Department of Electronics

Faculty of Electrical and Electron ics Engineering Ho Chi Minh City University of Technology

[email protected] Abstract  — This paper summarizes the design and

implementation of Music Glove project. Music Glove is a project which uses MSP430G2553 microcontroller to play music in response to human i nteraction. The keyboard consists of buttons, either from mechanical buttons or capacitive touch buttons.

There are two booster packs combined with a mainboard to create a complete music player. People may call the device a music glove or capacitive piano keyboard or any name that fits their interests since our major purpose is to apply the learned knowledge and to create an entertainment device for everybody to entertain after day work. This study also applies a new knowledge in capacitive sensor which is currently becoming more popular.

Keywords  — capaciti ve sensor, musi c, tone, microcontrol l er, si mul ation, mu si cal note.

I. I NT RODUCTI ON

This study will provide reader with more knowledge in mus ical sound , the theory of music and how mus ical notes are emitted. The major purpose is to apply the learned knowledge to create an entertainment dev ice. This project was ins pired by a Yubi de Piano project which is a toy from Japan. The device can be described as a glove that can emit piano-like music without the keyboard in real life. The music glove in this paper is improved with more musical notes played with the ADC sensor. The technique is here is detecting the change of frequencies of notes using the microcontroller and generating outp ut signal with corresp onding cy cle to produce a right n ote.

The design includes three major blocks. The input block has sev eral butto ns to determine which musical no te is chos en, The main block has an MSP430G2553 microcontroller and the Output block has a small capacity buzzer. Some limits still  pers ist such as the disto rtion of so und due to the lack o f a floating point MCU and limit of MIDI sound but. Howsoever, the Music Glove is sufficient to play several simple familiar music tracks. To design a music glove, understandings on acoustics –  the s tudy of so und is necess ary. Understanding of the relation of musical notes and their frequencies is very important and requires s ome research. Moreover, the s olution for some problems, especially algorithm, is the most important thing, thus this paper will try to explain it meticulously. Also, the introduction of capacitive touch s enso r is also an interesting knowledge for tho se who are the techn ology‟s hobbies.

II. BASIC THEORY

There are two theories which are us ed in this project. First, the musical note theory, in this problem, the frequency of certain note, the formula to find certain note must be known.

Second, the capacitive touch sensing theory, in this problem,

the knowledge of how the capacitive touch sensing work and how to co ntrol it mus t be s olved.

 A.  Musica l notes

This section discuss about how to make a complete table of frequency of musical notes and give an example of notes. But in programming, to use these frequency values, we should round to its nearest Integer.

TABLE I. FREQUENCY OFMUSICAL NOTES there are twelve notes per octave. Notes are separated by the factor

or 1.059463.

Starting at any note the frequency to other notes may be calculated from its frequency by:

    



In this case, N is the number of notes away from the starting no te. N may b e pos itive, negative or zero.

For example, staring at D (146.84Hz), the frequency to the next higher F is:

  



 

Since F is three not es above. The frequency o f A in the ne xt lower octave is:

  



 

The equation will work starting at any frequency but remember that th e N value for the starting frequency is zero.

 B. Capacitive Touch Sensing

Capacitive touch sensing is a solution replacing mechanical buttons in several recent years. Capacitive touch sensing has wide application in recent year which defeat almost other touch product like resistive touch sensing.

Capacitive touch sensors are using like an add-on in this device.

Capacitive touch systems in general operate on the  principle that the introduction of a human finger to an electrode adds a parallel capacitance to earth ground. The electrode is also influenced by the parasitic capacitances resulting from the internal GPIO pin of the MCU and from the capacitance between the electrode„s trace and its signal ground.

Capacitive touch sensing is based on two major capacitance measurement methods: RO method (fixed gate time and variable electrode oscillation counts) and fRO method (fixed electrode oscillation counts and variable gate time) [2].

In this stu dy, RO method is used to d esign capacitive touch  buttons . The RO method meas ures electrode capacitance by using a timer to establish a fixed window of time during which the electrode oscillates, a second timer counts the number of oscillation that occur within that fixed gate time.

If a human interacts with the sensor„s electrode, the increase in capacitance causes the oscillation frequency to decrease. Figure 1 s hows th e principles of the RO method .

Figure 1. RO Measurement T iming Diagram

III. ALGORITHM

At first, the algorithm which use in this s tudy is describe as  below.

Because the most important thing in a project is find a suitable algorithm then make a code. If you don‟t have th e algorithm, you will not know how to do, where to begin with your project, then you will go astray to a maze without exit.

 A.  Main algorithm

The algorithm of music glove will show in Figure 2 at  below.

Figure 2. P rocessing of MCU Flowchart

Process of MCU is described as the diagram, from top to  bot tom and has infinity loop unt il th e power has turn off or

reset of MCU.

First, the program define all variant value, predefined such as buttons or frequency of tone, define prototype of sub-functions, etc.

Then, check the status of “main button”, if button is  pressed, program will check ADC v alue then look up second table to emit certain note. If button is held, program will emit music which is stored. Else, program will check status of piano  but ton s to emit certain note.

 B. Capacitive touch algo rithm

Figure 3 describe the algorithm of capacitive touch which using in this study.

If a human interacts with the sensor„s electrode, the increase in capacitance causes the oscillation frequency to decrease as the RO method which is mentioned above.

Figure 3. Capacitive Touch Flowchart C.  Musical frequency co ntrol

Once y ou h ave d etermined the frequency for a certain no te, this is converted into a time period between half cycles. For example, the 220Hz note would correspond to 1/220 of a seco nd for a whole cycle, and 1/440 of a s econd for each half cycle. Doing the division results in a delay of 2.273 milliseconds for each half cycle. So, to emit A (220Hz), MCU  program could do the following:

Drive the ou tput pin high

Wait for 2.273 milliseconds

Drive the outpu t pin low

Wait for another 2.273 milliseconds

Repeat as d esired until the tone sh ould no longer s ound

At below is s ome s tandard notes with the ideal frequency of note and the ideal half cycle delay in microsecon ds [3].

TABLE II. IDEALPARAMETERS OFSTANDARD NOTES

From above, we have known how to emit a musical note and how to calculate time to interrupt time b etween high output and low outp ut.

IV. HARDWAREDESIGN  A. Overview block d iagram

There is an input block interaction between user and mainboard to determine which note is chosen which have two choices to select: mus ic glove or capacitive piano keyboard.

Mainboard has an ADC sensor and main button to receive command from user, and MCU handle buzzer to emit certain tone.

The diagram of mainboard is briefly described as Figure 4  below:

Figure 4. System Block Diagram

 B.  PCB design

The PCB of mainboard is designed by Layout Plus of OrCAD 10.5, and s how at figure below.

Figure 5. PCB Design

The dimension of PCB design is approximately 58 x 69 (mm) as above. There are 2 ports to connect with external  piano but ton s. The mainboard is s mall, s o this is co mfortable

for us er to put it on their hand.

C.  Design of glove

The glove has five butto ns , one for each finger. The bu ttons connect to mainboard with wire.

In the mainboard, there is an ADC sensor using adjustable resistor to increase or decrease frequency of mus ical note th en  bas ed on it, the MCU select certain note to emit.

There are seven notes of music but we just have five fingers, so the modification is necessary. Otherwise, the modification will make us confused when using it because of remembering where note is placed.

First opinion, two buttons in hand to enough seven buttons for seven notes is thought but it will not comfortable for  peo ple who us e. Therefore, one but ton for each finge r is

chos en although there is a lot of problem when us ing it.

The intuitive des ign of th is project has briefly described at the below figures.

Figure 6. Bottom View

Piano buttons block is placed on fingers to press comfortably. If certain button is pressed, signal will transmit to mainboard via signal wire along each finger.

Figure 7. T op View

Mainboard has ADC sensor and main button to receive command from user, and MCU handle buzzer to emit certain tone.

The disadv antages of music glove make the development is important. Therefore, the production of capacitive touch  boo sterpack is ess ential.

 D. Capacitive Touch BoosterPack

Capacitive touch is an add-on which can plug into mainboard to play music like playing piano in real. This  boo sterpack is more comfortable than the g love becaus e it has

seven touchpad, corresponding with seven musical notes.

Figure 8. Capacitive Touch BoosterPack

V. TEST& R ESULT

Figure 9. Mainboard with Capacitive Touch BoosterPack

The Happy birthday song is tested with device, sound seems very good.

Figure 10. Happy birthday song

VI. CONCLUSIONS& FUTUREWORK

After the design of glove, we have detected that we can expand this study, combine mainboard with capacitive touch sensors to create a completely new piano like a real piano. So, we decide to design a Capacitive touch BoosterPack that can  plug into mainboard to create a touch piano . Then we develop

it. We think in t he future, this st udy will be dev eloped more by  peo ple who care.

An effective des ign mus t meet thes e requirements : 1. Easy to us e

2. Playing various mus ical notes 3. Can adjust wide frequency range

VII. R ECOMMENDATIONS

Our overall method of solution was to build subsystems then integrate. The first thing to be is write down your ideal to  pap er, then find the so lution to so lve the problem we have.

After all of that, we design the hardware and write down the

code. Remember, focusing on the algorithm and the diagram is the mos t important key to s olve the solution.

In order to make a su ccess ful project, th e following points are advice to you:

- Limit the amount of hardware that you will have to  build or spen d time cus tomizing.

- Attempt to buy components, i.e. a microcontroller, with most of the peripheral you will need.

- Make basic design decisions and immediately build  proto typ es o f thos e su bs ys tems and interface.

- Don‟t worry about speed! Make your main focus to  build a project and remember the d eadline.

- Save all your code! Either move it to a different file or comment it out . You will most likely right s everal versions o f a code, attempting sev eral ways to s olve the same problem. You will want to record your evolution of design.

ACKNOWLEDGEMENT

This st udy has referrenced from many sou rce, we than k to their hard work when researching. The list below is the auth or and the documents which us ed in this study .

EFERENCES

[1] B. H. Suits, P hysics Department, Michigan T echnolo gical Un iversity ,

“ Ph ysics of Music - Notes” copyright 1998-2013. [Online]. Available:

http://www.phy.mtu.edu/~suits/NoteFreqCalcs.html

[2] “ Capacitive T ouch Sensing” SLAA574, Jan 2013. [Online]. Available:

http://www.ti.com/lit/an/slaa574/slaa574.pdf

[3] M. Eric Carr, “ Making music with microcontrollers” and “ Musical Note Frequencies” A th read of blog from Mar 28 2012 . [Online]. Available:

http://www.paleotechnologist.net/?p=2253

Documento similar