User:Yadarwish/project3

Copy this form to your user page.

Delete the italics (delete the two quote marks) when filling out this form.

Project Preference
''
 * Beat Bearing
 * wireless electricty          ''

Problem Statement
''In one or two sentences, describe the project that your group will be working on. Identify what CDIO phase (Conceive, Design, Implement, or Operate) your group will complete in this project cycle.''

Project Plan
Briefly describe your group's plan for the next 4 weeks, including major tasks that will be completed each week.

Week 1 Narrative
For the first week of project 3 I decided to do some reseach, and I found that beat bearing is a computer that uses a pattern of ball bearings that will be put in a position on the software that will allow it to convert into a certain rhythm. The screen will show what beats that would be changed and how it sounds, as red goes through the screen it will show the exact placement. This will all be measured using arduino and the screen of the computer. This projects purpose is to be at a low cost


 * For this week it was hard to be able to work with my new group for project 3 since most of the people in my group had been in the previous group, and we weren’t able to work at hcc, so I decided to do some research, and get a broader understanding on this Beat-bearing project. I looked through the previous group and saw a very effective design and I also looked at the group after and saw what they had added. I was able to understand the software and technical knowledge and learned that this will include using arduino that the previous group has this code will allow the red lights to move back and forth on the screen this will come in contact with the washers and will let a sound come out. In the last group they were able to use the potentiometer connected to an (A0) which is an Analog0 to control the speed of how fast or slow the beat may go. I also learned that they used a code that was able to create a simple beat that can be modified through using arduino.

http://www.peteinfo.com/projects/beatbearing.html

this site had great videos of an example of this projects purpose


 * For the next three weeks the group and I must find codes that will help increase the volume and pitch, and connecting the board to the arduinos as well as wiring it so its all connected.


 * In the picture the previous group had posted a picture of their final design of the template that’s used to wire the board



The BeatBearing has been designed with the use of several different design trials containing 3D- drawing and a model development, testing procedures during the process of designing, and validations that would give good feedback. This will allow customers who those who are using beat bearing to feel the instrument and listen to it.

When a person is using the beatbearing a red line will come on the screen back and forth, going from the left towards the right side of the screen. When none of the balls are on the grid their will be no sound produced, and a grey circle will appear that will represent he ball will  be turned, while each row has a set of a particular color that will effect the sound it will make.

Week 2 Narrative
For this week my tasks were to help finalize codes for the arduino and as well as come up with a design. Below i drew out how things are going to be connected, but i am still working on the design and adjusting this as well as adding different things to it. I decided that the monitor we could use would be the one in the engineering classroom (approved by forester). In this design i drew out a crate that is used as a cradle that the monitor could be placed in to ensure its stability, while the monitor will be placed upside down with all the wiring and arduino hidden underneath it, then the board sits on top if it.

A computer precedes the rhythms response from the arduino and converts it instantaneously into both MIDI sound data and images for demonstration on the screen beneath the grid. The computer turns standard software to translate MIDI into a sound.
 * Next the monitor will be connected to a computer or laptop using a USB cord. I sketched out the board placed on top of the monitor, where the ball bearings are positioned in any place that closes the electrical connection in-between the metal washers that are split. The arduino uno that has a Midi shield attached on top it, gathers the ball on each washer, and is constantly sending this information to a laptop or a computer using the usb cord that’s attached to the monitor from the computer. Values of  the washers will be seen receiving  information.

codes

For the codes we had problems with having the message show up and by removing and replacing the shield from the arduino we could upload a code, but this process won’t be a great idea because we could effect the pins every time we take them out and put it back in, so we are still deciding on a different method to upload this. We tried different buttons to press on the arduino, we also tried resetting the system, but it still needs more practicing on figuring that out. Anyways we tried to find codes for the volume and controlling the pitch. We tested many different codes until we decided to change some of the codes for the volume and we started to get a beat that started off low to high. We were successful with this process. Below you can see the adjustments we made in the code. We had to control the volume by using the second pit. We found a code online for the volume that we decided to join with the previous code we have but it didn’t seem helpful or relevant to our problem, so we took its out and then discovered the turning the potentiometer it would change the sound of the note rather then how high or low the note is. To fix the problem of the high and low notes we edited the velocity of the code we had before. It only worked by using hex numbers. We also ended up seeking help from you (Professor Edelen) with putting the shield on and off, where we held down the button for it to upload. The range of the volume was very large going from extremely loud to extremely low, so we were able to fix that problem with adjusting the codes for the volume. Ranged it form (0-1000) for it to upload.



Week 3 Narrative
tasks
 * working on the design
 * Working on the code for the volume of the song
 * working on the speed for the song
 * working the three buttons

WOKING ON THE CODE


 * During this week i payed more attention, and time on working with the volume. We decided that we wanted to demonstrate the song "Sail" so we needed to get the volume to work for that. We found a code online for the song, but when we transferred and uploaded the song through the arduino it had problems. In the three video I recorded the problems we had and after spending time finding a solution, we had a successful result, which is in the third video. To elaborate more after we had uploaded the original code for the song, we tried turning the volume from high to low but the volume wouldn't get lower until after every measure, when we turned the knob. We didn't understand why it was doing this, which made us very frustrated, so we started the trial and error method and tried different things to add and change from the code. We even tested ( In the second video) if the volume would change after every measure without even turning the knob, because we weren't sure if this problem had to do anything at all with the knob or with what we added to the code. So finally after testing many theories we finally decided to add after every measure the volume which changes the range. when we added the volume and uploaded the code we played the song and turned the knob and the volume changed right away, instead of having to wait after every me sure for it to get higher or lower, which is not what we intended on doing. Also this week were unsuccessful with trying to merge the speed to work correctly with the code for the song. After we added the command for the speed it didn't make the speed go faster or slower, but instead it changed the note on the keyboard instead. So we must test different ways to get that to work with the code.  As for the buttons this week we tried to use an example of the analoginput from the arduino software, but it didn't correctly, so we will still be fixing that.


 * 1) https://www.youtube.com/watch?v=fWbNRL0Wv8Y&feature=youtube_gdata_player
 * 2)  https://www.youtube.com/watch?v=Zc3elzJRci0&feature=youtube_gdata_player
 * 3) https://www.youtube.com/watch?v=jFncP7lQf9E&feature=youtube_gdata_player

videos


 * 1.) (Volume changes only after each measure)
 * 2.) Volume stays the same when you don't turn the knob)
 * 3.) (Volume successfully changes after turning the knob)

void setup { Serial.begin(31250); //MIDI protocol baud rate is 31250 bits per second } void loop { // channel 0 synth strings 1 (51) 0xC0,0x33 Serial.write(0xC0); Serial.write(0x33); // channel 1 Pad 3 poly synth (91) 0xC1,0x5B Serial.write(0xC1); Serial.write(0x5B); // channel 9 drums 0 Serial.write(0xC9); Serial.write(0x00); //0x4B = E flat 8va //0x50 = A flat 8va //0x49 = G flat 8va //0x27 = E flat (bass) //t=0 noteOn(0x90, 0x4B, 0x60); // start strings, E flat noteOn(0x90, 0x50, 0x60); //start strings, A flat noteOn(0x90, 0x4B, 0x00); //stop strings, E flat noteOn(0x90, 0x50, 0x00); //stop strings, A flat delay(550); //t=1 noteOn(0x90, 0x4B, 0x60); // start strings, E flat noteOn(0x90, 0x50, 0x60); //start strings, A flat noteOn(0x90, 0x4B, 0x00); //stop strings, E flat noteOn(0x90, 0x50, 0x00); //stop strings, A flat delay(550);

The code we had for the song 'sail' we got from wikiversity, had difficulties when we uploaded it onto the Arduino because as we tried to turn up the volume it wouldn't work precisely until we decieded to add the volume after every delay in each measure. Below you can see the part we added, and in the photo underneath is the final code for part of the song.

val2=analogRead(1); Volume=map(val2,0,1000,0,100); //

^this changes the range of val2 to pot range

'''(Final Code)



fixing the code


 * In the previous group they had to make sure that the hex number was corrected, because getting the hex and decimal numbers can get jumbled or disorganized. Also we wanted to make sure to double check everything for this code so we wouldn’t have to keep going back and forth to check what is missing, which is why we also wanted to label everything correctly, so we could understand how the code works.

FINALIZED DESIGN

Also here is a better drawn out design of how the system should all be connected, even thought the laptop doesn't always have to be connected since the code will already be transferred through the arduino. Also all the wiring and the arduino will be placed underneath the monitor so that it can be hidden:)

Next week


 * For next week we will work on what we failed to get to work this week which were the buttons, we decided that one of the buttons will be the on and off button for the system and the other button will be changing the tone of the sound, and we are still deciding on the third button but we need to find a better and more accurate way of working on the buttons because we weren't able to get it to work this week. Also we need to work on the other knob which is the speed because during this week we tried to get it ready to work for the song we presented on thursday during seminar but we had difficulties with it.

Week 4 Narrative
For this week my tasks were to find a way to get the on/off buttons to work correctly wight he song, as well as adjust something on the design, and find a code for the button to work as the tone of the song.

For the on and off switch i wanted to use a code that will work with the song 'Sail' and we found one from the ladyada website that was used as a switch for lighting up the LED.


 * we also used the code for the knobs from the Ladyada website, and that worked great. So we knew that their shouldn't be a problem for the buttons to work using the same website. Even when we are using the MIDI board.

In this code we got from the Ladyada website we changed a few things to get the on/off button to work with the song. But when we tested the song and clicked the button it would stop after a few seconds when clicking it and then continue on again with the song. So we knew something was working but it still need more work to be done in order to get it to work correctly.

So we decided to try and work on a code for the on/off button without using the song so it can be simpler to adjust.

Here is another code we found online. We tested it using the song Sail, but again it didn't work correctly

*Also here are of some of the next steps that should be taken for future groups
 * Write sample code to use the midi shield pots and buttons to increase volume and speed
 * Glue washer halves down to board
 * Connect the board to the arduinos
 * Wire the positive side of the board
 * Create a wire harness to connect all the wires together