maverick machines
May 16, 2007Group project: Prototype Physical Computing Artwork
Report
This report will be based on the development of our group prototype artifact for the module Maverick Machines. It will show our concept, constant development of our ideas and our concluded results.
The artifact will be created with the aid of an Arduino board.
Taken from www.arduino.cc/
Arduino is an open-source physical computing platform based on a simple i/o board, and a development environment for writing Arduino software. The Arduino programming language is an implementation of Wiring, itself built on Processing.
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free.
Group Members: Prar Eshun, Shahin Islam a.k.a Islam and Abi-Abisoye Osokoya
We held our first meeting on 2nd-May-2007. We analyzed each others journals and spoke of the research we had gathered over the weeks and trips we had taken for the module. Prar spoke of an exibition he saw at the Kinetic museum in east London. He spoke of giant Light Emitting Diodes (LEDs) he saw and ……………………………………………………. Abi also spoke of an exhibition she saw at the Kinetica museum based on electromechanical sound generators by artists Ray Lee and Jim Bond. It was about sound in motion on different mechanical instillations.
Sirens by Ray Lee

Picture taken by Abi-Abisoye Osokoya at the Kinetica Museum.
As a group we decided to implement the ideas of light and sound to our prototype. Our idea was to give a person the ability to trigger a sensor using sound (input) and making the sensor react to the sounds high and low pitches by displaying LED’s (output).

Image created by Abi-Abisoye Osokoya
To begin this we corresponded to http://www.arduino.cc/ (Arduino Website) to find tutorials on light and sound that could lead us into developing our prototype. We also discussed our roles in the group as we had a presentation due. Roles were split like this; Islam was to prepare and present the concept for our prototype artifact at the presentation, Prar was to create the slideshow and film the group working on the board. Abi was to write up the proposal. Ten to thirty pages of this report has to be completed and we are all aiming to complete ten pages or less individually for our three remaining weeks on the module. Our assessment requirement also required us to have a bibliography, time plan, description of group members roles and signed ‘proportion of work’ form which we will do as a group. Most of the work will be done in our homes so we decided to keep in contact and exchange work via email, telephone and text messages.
We began by creating the Play Melodies with a Piezo Speaker tutorial under the sound section.
Taken from Http://www.arduino.cc/en/Tutorial/PlayMelody.
Play Melody
This example makes use of a Piezo Speaker in order to play melodies. We are taking advantage of the processors capability to produde PWM signals in order to play music. There is more information about how PWM works written by David Cuartielles here and even at K3’s old course guide.
A Piezo is nothing but an electronic device that can both be used to play tones and to detect tones. In our example we are plugging the Piezo on the pin number 9, that supports the functionality of writing a PWM signal to it, and not just a plain HIGH or LOW value.
The first example of the code will just send a square wave to the piezo, while the second one will make use of the PWM functionality to control the volume through changing the Pulse Width.
The other thing to remember is that Piezos have polarity, commercial devices are usually having a red and a black wires indicating how to plug it to the board. We connect the black one to ground and the red one to the output. Sometimes it is possible to acquire Piezo elements without a plastic housing, then they will just look like a metallic disc.
We setup the board and copied and pasted the processing code to the Arduino environment. We were very relieved to hear the melodies playing. It was only then that we realized our aim could be accomplished as we did have our doubts due to the complexity of the module and our inexperience with maverick machinery.
This is a very small section of the processing code. It was responsible for the melody we were hearing. Prar began to experiment with the melody by changing the notes around (int melody), giving it higher and longer notes (#) and also speeding up and slowing down the phase of the melody(int MAX_COUNT).
// MELODY and TIMING =======================================
// melody[] is an array of notes, accompanied by beats[],
// which sets each note’s relative length (higher #, longer note)
int melody[] = { C, b, g, C, b, e, R, C, c, g, a, C };
int beats[] = { 16, 16, 16, 8, 8, 16, 32, 16, 16, 16, 8, 8 };
int MAX_COUNT = sizeof(melody) / 2; // Melody length, for looping.
The catch 22 with this tutorial was the input, we didn’t have any and the aim was to interact with the board. Islam and I (Abi) looked through the web for an ideal tutorial to experiment with. After fifteen or so minutes we found the ideal tutorial from the Analog input section.
Taken From Http://www.arduino.cc/en/Tutorial/KnockSensor
Knock Sensor
Here we use a Piezo element to detect sound, what will allow us to use it as a knock sensor. We are taking advantage of the processors capability to read analog signals through its ADC – analog to digital converter. These converters read a voltage value and transform it into a value encoded digitally. In the case of the Arduino boards, we transform the voltage into a value in the range 0..1024. 0 represents 0volts, while 1024 represents 5volts at the input of one of the six analog pins.
A Piezo is nothing but an electronic device that can both be used to play tones and to detect tones. In our example we are plugging the Piezo on the analog input pin number 0, that supports the functionality of reading a value between 0 and 5volts, and not just a plain HIGH or LOW.
The other thing to remember is that Piezos have polarity, commercial devices are usually having a red and a black wires indicating how to plug it to the board. We connect the black one to ground and the red one to the input. We also have to connect a resistor in the range of the Megaohms in parallel to the Piezo element; in the example we have plugged it directly in the female connectors. Sometimes it is possible to acquire Piezo elements without a plastic housing, then they will just look like a metallic disc and are easier to use as input sensors.
The code example will capture the knock and if it is stronger than a certain threshold, it will send the string “Knock!” back to the computer over the serial port. In order to see this text you could either use a terminal program, which will read data from the serial port and show it in a window, or make your own program in e.g. Processing. Later in this article we propose a program that works for the software designed by Reas and Fry.
The tutorial was perfect because the setup looked very similar to the Play Melodies with a Piezo Speaker tutorial we did, apart from the analog input pin. We were also using the Piezo as a sensor (input)
Our next step was to create the output, which was the display of Led’s. We found this tutorial in the Google search engine.
Taken from Http://www.arduino.cc/en/Tutorial/LEDDriver
LED Driver
This example makes use of an LED Driver in order to control an almost endless amount of LEDs with only 4 pins. We use the 4794 from Philips. There is more information about this microchip that you will find in its datasheet.
An LED Driver has a shift register embedded that will take data in serial format and transfer it to parallel. It is possible to daisy chain this chip increasing the total amount of LEDs by 8 each time.
The code example you will see here is taking a value stored in the variable dato and showing it as a decoded binary number. E.g. if dato is 1, only the first LED will light up; if dato is 255 all the LEDs will light up.
The wiring looked complex




Posted by dartiste 


Posted by dartiste