2m3
Contents
About 2m3
2m3 is an open space of 2 metres in 3 dimensions. It represents a platform for artists who like to suprise themselves and a small audience. A performance starts with 2 minutes of action in 3 minutes of silence.With each artist goes a special beer to keep us all company for the night. This experimental snapshot takes place at home, every last friday of the month.
Invited to do a performance at 2m3, there where two things which I found inspiring. The 2 cubic meters are physically marked with a plummet hanging from the ceiling. The space has a lot of similarities with my own workspace : a ground level, dark space, with little daylight coming thru whatever windows.
Technical
The pendulum is made out of a plummet which I got in the local hardware store. It was cut in half and the inside was milled out to fit two powermagnets. It weighs about ?. And is suspended on a 3m60 steel wire cable. Swinging above a small wooden construct. Underneath the construct I installed a coil. This gets charged and thus creates a small magnetic force which pushes the pendulum every time it passes above the centre.
http://en.wikipedia.org/wiki/Foucault_pendulum
Electronics
The whole thing works with an arduino. This controls a solid state relay to switch on the power for the coil. A hall effect sensor senses the plummet moving over and triggers everything. It goes like this :
- Plummet moves over hall effect, - Hall effect switches on because of magnetic force - A small delay of 100 ms - The coil is charged for short while - Hall effect switches off because the coil creates a negative magnetic force from underneath the hall effect - Coil is discharged - Plummet moves over hall ...
With a piezo I detect the piece of wood being knocked over by the plummet. The code + circuit for this comes from one of the basic arduino examples http://www.arduino.cc/en/Tutorial/Knock
I'm using a solid state relay instead of a tip 122 circuit.
Solid State Relay, 3.5 A 25VDC from Crydom
[Hall effect latch sensor] This hall effect sensor switches on whenever a postive magnetic force moves over. Stays on until a negative magnetic force is applied.
Code
Here is the arduino code I wrote to drive the pendulum. It's something I came up with, tinkering about, it works for me, but possibly there are better ways to code it. Feel free to use it.
/*
Code for driving a pendulum and detecting a small wooden block falling.
Digital pin 12 has a solid state relay attached to it. Whenever the pin
goes high it allows current to flow to a coil giving the passing pendulum a push
Attached to interrupt pin 0(digital pin 2) is a hall effect sensor, which latches
whenever the pendulum passes over. And so giving the pendulum a push
This example code is in the public domain.
*/
int SolidState = 12; //pin to switch solid state
int Piezo = A0; //listen to piezo on Analog port 0
int PiezoValue = 0;
const int thPiezo = 100; // threshold for piezo, if bigger then value switch of light
int HallState = 0; //Status of hall effect sensor
unsigned long timeON ; //moment of time that hall effect is triggered
unsigned long timeOF ; //moment of time that coil is activated
unsigned long currentTime;
long timeDON = 0; //time that has passed since hall effect was triggered
long timeDOF = 0; //time that has passed since coil was activated
int timeOFa = 0; //
long threshOn = 100; // milliseconds to pass before activating solid state relay to sending a push with coil
long threshOf = 100; // milliseconds to pass before deactivating solid state relay
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(SolidState, OUTPUT); // make the SolidState's pin an output:
digitalWrite(SolidState, LOW); // set SolidState pin LOW
// adding attachInterrupt on digital pin 2,
// when this pin's state changes, the push function will be executed
attachInterrupt(0, push, RISING);
}
void loop() {
unsigned long currentTime = millis(); //getting current time
PiezoValue = analogRead(Piezo); //reading piezo value on analog pin 0
//Serial.println(PiezoValue);
if (PiezoValue > thPiezo){
Serial.println(1000);
}
if (HallState == 0)
{
timeDOF = currentTime - timeOF;
if (timeDOF > threshOf && timeOFa == 1)
{
digitalWrite(SolidState, LOW);
Serial.println(2000);//2000 = solenoid off
timeOFa = 0;
}
}
else
{
timeDON = currentTime - timeON;
if (timeDON > threshOn)
{
HallState = 0;
digitalWrite(SolidState, HIGH);
Serial.println(3000);//3000 = solenoid on
timeOF = currentTime;
timeOFa = 1;
}
}
delay(100);
}
void push() {
HallState = 1;
timeON = currentTime;
}