Blog - Sketching with Hardware

Electronic Xylophone – Group 5

Published on: | Author: Kai Holländer | Categories: 2015a, Projects

„Create a music instrument“ – This was the theme for our project work for the next six days. Our mission was to build a digital instrument which either received tunes over a midi port and played these or created tunes and sent them over a midi port.

After some googling for music instruments and checking ebay classified adverts for more inspiration, our first idea was to build a digital musical clock. We instantly started making
first sketches.

A turning wooden drum roll containing metal pins would be pulled out by electronic magnets. The pins would lift up a clapper and drop it on to a membrane of a xylophone. We discarded the idea of implementing real metal membranes since these would have to be installed extremely firmly next to the drum roll for them to create any kind of tone.

Lessons learned after day one:

  • sketching on real paper is very powerfull
  • using a consistent wording for describing elements of a fictive object is essential

The second day was reserved for brainstorming only. Our goal was to iterate as often as possible to reach a satisfying, technically and mechanically consistent idea.

While buying the first elements for our gorgeous and still fictive instrument we tried out different techniques and ideas on the spot and had to change our ideas due to increasing costs for specific elements.

Lessons learned on day two:

  • Use gears
    • In order for the drum roll to rotate reliable, the force of the motor had to be transmitted directly to the roll.
    • Using a v-belt we would not be able to control the speed of the role to our needs.
    • Depending on the time difference of two played notes, the role would have had to be turned in different speeds in a very short time period.
  • The drum role must be turned as fast as the time difference between to played notes.

    • Using only one row of pins the motor would have had to turn its self 360 degree to play the next note.
    • So we decided to implement two rows of pins on to the drum role.
  • Electro magnets are expensive!
    • In order to pull the pins out of the drum role we would have needed 8x2x4€ electro magnets.
    • Idea: Build own electro magnets
  • Fail fast
    • As soon as you actually hold the devices in your hand and combine them with each other, you realize if they will work for you the way you want them to or not.

On day three we presented our idea to the other groups and got good feedback. We realized that implementing the drum role would leave us with many mechanical unanswered questions. (Will the magnets pull out the pins reliable? Will the pins stay stuck in the role? How do we get the pins back in to the role?) So we moved away from that idea and thought about pulling or pushing the clapper up or down with magnets directly.

After prototyping our first electro magnet we realized, that in order for them to lift one of the clapper to let it drop on to a membrane we would have needed a fairly long pin
wrapped with an enormous amount of wire, using voltage beyond 20V.

Our last and final idea was to use a motor for every clapper to move it up over its membrane of the xylophone. When witching the motor off, the clapper would drop on to the membrane and create the desired tone.

We immediately tried out our new idea with success. We also found out, that in order to create a fine tone, the clapper would have to be pulled up immediately after its fall on to the membrane to prevent it from creating unwanted second tones. This brought us to our next idea of stopping the membranes vibration by deliberately letting the clapper linger on it hence simulating the tones length.

Our goal for today was reached as we installed all motors with their Cables and Clappers.

Lessons learned on day three:

  • Rapidly and consistently validating ideas with prototypes or feedback through others will bring you valid and well refined concepts to work on
  • For building your own electro magnet you will need – depending on what you want to lift – many layers of wrapped wires on a 100% ferro magnetic long or think pin and the according amount of voltage.

The goal for our fourth day was to control all eight motors. For this task we needed one transistor for each motor. We startet testing on one and realized a voltage drop when trying
to switch the motor on. In order for the motors to lift our clapper we needed every energy we could get so we decided to use the L293DNE. This IC has a dedicated power supply pin
and is even able to steer two motors in both directions. Dedicated power pins for both motors are also included.

Pin 1 = supplied with power will switch the motor on (5V)
Pin 2 and 7 = if one is supplied with power (5V) and the other is grounded, the motor will turn its self in that direction. Power is received here by the arduino board. The both pins will need a pull down resistor and will need to be defined as pinMode(n, ) accordingly within the arduino program.

Pin 3 and 6 = motor
Pin 4 and 5 = ground for motor
Pin 8 = power supply for motor

Lessons learned on day four:

  • Equipotential bonding is also necessary when using different voltages in one system
  • Even when no power is set on pin1 and pin2 the motor will be provided with its voltage supply and turn its self on.
  • Never set 5V and 12V together. It will blow the IC (in our case the ATMEGA) on your Arduino and in the worst case your notebooks power supply

We spent a fair amount of time on cabling on day five. Too much in fact. We noticed that some cables lost connection when implemented in to the bread board. Cabling looked nice
and indicated voltage and ground by color but was far to buggy. So we exchanged all cables with reliable cables, unfortunately with all kinds of colors. After that we simulated our first tones provided by midi. This was the first time our motors reacted to a midi program provided by the Arduino.

Lessons learned on day five:

  • Do rough cabling first and check if everything is working
  • If so exchange every cable bit by bit if you want a clean installation.
  • Triple-check your connections if you are using more than 5V and an arduino in your system.

On our last day of work we spent quite some time on finding the right moment for the motor to pull the clapper back up after hitting the membrane. This was a pure trial and
error sequence of an our. Luckily enough the same delay time could be used for all of the motors: 70ms.
After that we installed the midi port and its cabling to the bread board. Unfortunately we had problems controlling the input of it on the arduino. The midi port provided us with
byte-values, we needed int-values. So we tried to parse byte to int until we realized that there is no such thing necessary since both values are basically the same and arduino
understands byte as well. Midi has 128 tones, we mapped every „d“ from every octave to our only „d“ we had on our xylophone. We did this by using a set of arrays. All our arrays led to an enormous delay time when a tune came in on our midi port. So we exchanged the arrays with try-catch
blocks which removed the latency. We now had a fully working xylophone receiving its notes via midi port.

Lessons learned on our last day:

  • Byte = Int. No parsing necessary.
  • Many arrays lead to high latency on the Arduino

The last and final day we used for beautification. We installed a plexy glass see through housing around all cables, stuck the bread boards to the main board of our installation and installed a connection possibility for a 12V power supply.

Then we presented or work to the other teams and an external crowd. We were able to hook up our device to other devices with midi out ports and play their music. We realized that
there was still some delay when playing very fast tunes after each other.

But all in all it was a great experience to see our final work turning in to a living object which played all by its self when provided with any kind of input.

linked categories 2015a, Projects

|

Write a comment

Comment