recycled sound setup
March 22, 2010 | Filed Under Blog, Installation Art, Music Composition, Sound Sculpture, physical computing | Leave a Comment
[I will edit this post soon to be more detailed]
I am posting my scratchy sketch of the pitches I am using for Recycled Sound. Click on the picture to see a larger version. Branches with two notes means it will alternate between the two pitches (it should should like it is always progressing between two chords). The purple wiggly lines indicate the ratchet sound makers.

Here is a picture of the electronics and the sound makers in a very small version of the circle they will be in:

soldering and soldering and soldering and . . .
March 22, 2010 | Filed Under Installation Art, Music Composition, Sound Sculpture, art, physical computing | Leave a Comment
I have been doing a great deal of soldering the past week (all day, every day). Here’s are the arduinos and optoisolated transistor circuits:

Next is the main unit for the center sculpture = a unit housing two atmega328 chips (“two arduinos”) using the same clocking crystal, two RF transmitters and one digital compass. The atmega328 chips have different programs on them and one of them controls the other. I am showing the breadboard version next to the final perfboard soldered version (I haven’t pushed in the atmega328 chips in the perfboard yet):

Next is the arduino with RF receiver. I am showing three versions = the commercial arduino, the breadboard arduino, and my perfboard arduino:

Here is another picture of all of the units together:

construction of sounds for Recycled Sound
March 22, 2010 | Filed Under Blog, Installation Art, Music Composition, Sound Sculpture, physical computing | Leave a Comment
Here are some pictures of the construction of the “sound makers” for Recycled Sound. I took apart an old set of student bells (used by junior high students learning to play keyboard percussion) and constructed something to hold a motor with a chain attached. When the motor turns, the chain hits the bell (it sounds like an old telephone – but specifically pitched). The other objects I made sound like a very loud ratchet. The pipe extension amplifies the sound (they do not really have any particular pitch). Other motors with chains will be mounted to the sculptures Jonathon is making – they should all sound a bit different.






optoisolator
March 22, 2010 | Filed Under Installation Art, Music Composition, Sound Sculpture, art, physical computing | Leave a Comment
I changed the optoisolator circuit I used in the light-box project I did after doing some more datasheet research for this installation piece. I’m just going to post a labeled picture rather than a circuit diagram (due to time). I’m also posting a picture of a soldered finished product (with two optoisolators). This circuit turns powers a 12V motor with a 12V battery controlled from a 5V arduino board (separated by an optoisolator in order to make sure the 12V cannot reach the arduino). This circuit works great with PWM output of the arduino = very smooth and responsive.


new batteries!
March 9, 2010 | Filed Under Blog, Installation Art, Sound Sculpture, physical computing | Leave a Comment
I just bought 12 great batteries (Werker 12V 7.5ah) from BatteriesPlus for only $15/each — that’s over half off! Thank you BatteriesPlus! I’ll be charging the batteries in parallel using the Schumacher 2/4/6 Speed Charge. I put a picture below of how to charge in parallel (the guy at BatteriesPlus said to think of a ladder to remember it = great tip).



burning arduino bootloader with another arduino
March 6, 2010 | Filed Under Installation Art, physical computing | Leave a Comment
Burning the arduino bootloader using another arduino duemilanove is very easy. I’m documenting it here (informally) so I can remember how to do it later. It is all done in the Arduino software (I was using version 0018)
1) upload the example sketch (File->Examples->ArduinoISP) to the arduino that has a working bootloader already on it (I used a duemilanove – I’m not sure if it will work with the older ones, but I’m sure it will . . . I’m going to give it a try later with my old NG).
2) hook up the two arduinos (from the digital pins of the arduino with the ArduinoISP sketch to the ICSP pins of the other arduino) and put an LED (with resistor) on the following pins of the arduino with the ArduinoISP sketch on it:
9: Heartbeat – shows the programmer is running
8: Error – Lights up if something goes wrong (use red if that makes sense)
7: Programming – In communication with the slave

3) with only the arduino with the ArduinoISP sketch plugged into the USB of the computer (the other gets power from this one) – go to (Tools->Burn Bootloader->w/ Arduino as ISP) and it will take a while (30seconds or more) to burn the bootloader
4) that is it!
wireless RF Arduino with digital compass
February 6, 2010 | Filed Under Blog, Installation Art, Sound Sculpture, physical computing | Leave a Comment
I just wrote and tried out the code with hardware for wireless (RF) transmitting from an Arduino with a digital compass to other arduinos with LEDs.
Here is the code for the transmitter (sending to 3 different Arduinos). The code is set up (the x and y variables) to only send a message out for a given degree range once . . . so you must go to another degree range and come back for the message to be sent again from a given degree range. This insures that LEDs (or solenoids in the instance of my installation work) are not continuously fired when the compass is left facing one direction with no one around turning it.
#include <Wire.h>
#include <VirtualWire.h> // http://www.open.com.au/mikem/arduino/VirtualWire-1.4.zip
int HMC6352Address = 0x42;
// This is calculated in the setup() function
int slaveAddress;
int ledPin = 13;
boolean ledState = false;
byte headingData[2];
int i, headingValue;
int x = 0;
int y = 0;
void setup()
{
//digital compass setup
// Shift the device's documented slave address (0x42) 1 bit right
// This compensates for how the TWI library only wants the
// 7 most significant bits (with the high bit padded with 0)
slaveAddress = HMC6352Address >> 1; // This results in 0x21 as the address to pass to TWI
//Serial.begin(9600);
pinMode(ledPin, OUTPUT); // Set the LED pin as output
Wire.begin();
//transmitter setup
vw_setup(2000); // Bits per sec
}
void loop()
{
// Flash the LED on pin 13 just to show that something is happening
// Also serves as an indication that we're not "stuck" waiting for TWI data
ledState = !ledState;
if (ledState) {
digitalWrite(ledPin,HIGH);
}
else
{
digitalWrite(ledPin,LOW);
}
// Send a "A" command to the HMC6352
// This requests the current heading data
Wire.beginTransmission(slaveAddress);
Wire.send("A"); // The "Get Data" command
Wire.endTransmission();
delay(10); // The HMC6352 needs at least a 70us (microsecond) delay
// after this command. Using 10ms just makes it safe
// Read the 2 heading bytes, MSB first
// The resulting 16bit word is the compass heading in 10th's of a degree
// For example: a heading of 1345 would be 134.5 degrees
Wire.requestFrom(slaveAddress, 2); // Request the 2 byte heading (MSB comes first)
i = 0;
while(Wire.available() && i < 2)
{
headingData[i] = Wire.receive();
i++;
}
headingValue = headingData[0]*256 + headingData[1]; // Put the MSB and LSB together
/*
Serial.print("Current heading: ");
Serial.print(int (headingValue / 10)); // The whole number part of the heading
Serial.print(".");
Serial.print(int (headingValue % 10)); // The fractional part of the heading
Serial.println(" degrees");
*/
headingValue = (int (headingValue / 10));
//Serial.println(int (headingValue)); //debugging
const char *mymessage = "Z";
if ((headingValue >= 1) && (headingValue <= 179)){
mymessage = "A";
y = 1;
}
else if ((headingValue >= 180) && (headingValue <= 250)){
mymessage = "B";
y = 2;
}
else {
mymessage = "C";
y = 3;
}
if (x != y){
digitalWrite(13, true); // turn on LED to show transmitting
vw_send((uint8_t *)mymessage, strlen(mymessage)); // transmit message
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13, false); // turn off LED to show transmitting is done
x = y;
//Serial.println(mymessage); //debugging
}
else{
}
delay(100); //not sure how short I can make this yet???
}
=======================================================
Here is the code for the receivers (change what is commented out, ‘A’, ‘B’, or ‘C’ message at the end, according to which of the three Arduinos you load the sketch up to):
// receiver.pde
#include <VirtualWire.h> // http://www.open.com.au/mikem/arduino/VirtualWire-1.4.zip
char inString[32];
int inCount;
void setup()
{
pinMode(9, OUTPUT); // sets the LED pin to be an output
////// serial code is commented out because this application does //////
////// not require a computer - remove comment to send to computer //////
//Serial.begin(9600);
//Serial.println("setup");
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver PLL running
}
void loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
inCount = 0;
if (vw_get_message(buf, &buflen)) // Non-blocking
{
int i;
digitalWrite(13, true); // turn on LED to show received good message
// Message with a good checksum received, dump it.
//Serial.print("Got: ");
for (i = 0; i < buflen; i++)
{
//Serial.print(buf[i]);
//Serial.print(" ");
inString[inCount] = buf[i];
inCount++;
}
//Serial.println("");
////// if statements comparing incoming message //////
////// comment out letters for different sculptures //////
/*
if (strcmp(inString, "A") == 0){
digitalWrite(9, true);
delay (500);
digitalWrite(9, false);
}
if (strcmp(inString, "B") == 0){
digitalWrite(9, true);
delay (500);
digitalWrite(9, false);
}
*/
if (strcmp(inString, "C") == 0){
digitalWrite(9, true);
delay (500);
digitalWrite(9, false);
}
digitalWrite(13, false); // turn off LED to show done
}
}