Difference between revisions of "2m3"
(22 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[File:Settingupstilcroppedl.jpg|1000px]] | ||
+ | |||
+ | |||
====''About 2m3''==== | ====''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. http://2m3.be | + | 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. |
+ | |||
+ | http://2m3.be | ||
+ | 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''==== | ====''Technical''==== | ||
− | [[File:Schietlood.jpg|plummet exploded view| | + | |
+ | 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 [http://www.powermagnetshop.de/gb/pd1955473294.htm?categoryId=16 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 | ||
+ | |||
+ | |||
+ | [[File:Schietlood.jpg|plummet exploded view|480px]] | ||
+ | [[File:Plomb.jpg|plummet picture|480px]] | ||
+ | |||
+ | ====''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 | ||
+ | |||
+ | [[File:IMG_2774.JPG|480px]] | ||
+ | I'm using a solid state relay instead of a tip 122 circuit. | ||
+ | |||
+ | [https://be01.rs-online.com/web/p/solid-state-relays/7203940/?searchTerm=720-3940&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D3732302D333934302677633D4E4F4E4526 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''==== | ====''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. | ||
+ | |||
+ | <syntaxhighlight lang="C"> | ||
/* | /* | ||
− | Code for driving a pendulum and detecting a small wooden block | + | |
− | + | 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 | Digital pin 12 has a solid state relay attached to it. Whenever the pin | ||
− | goes high it | + | 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 | Attached to interrupt pin 0(digital pin 2) is a hall effect sensor, which latches | ||
− | whenever | + | whenever the pendulum passes over. And so giving the pendulum a push |
+ | This example code is in the public domain. | ||
*/ | */ | ||
− | int SolidState = 12; // | + | |
+ | int SolidState = 12; //pin to switch solid state | ||
int Piezo = A0; //listen to piezo on Analog port 0 | int Piezo = A0; //listen to piezo on Analog port 0 | ||
int PiezoValue = 0; | int PiezoValue = 0; | ||
− | const int thPiezo = 100; // threshold for piezo, if bigger then | + | const int thPiezo = 100; // threshold for piezo, if bigger then value switch of light |
int HallState = 0; //Status of hall effect sensor | int HallState = 0; //Status of hall effect sensor | ||
unsigned long timeON ; //moment of time that hall effect is triggered | unsigned long timeON ; //moment of time that hall effect is triggered | ||
Line 26: | Line 73: | ||
long timeDON = 0; //time that has passed since hall effect was triggered | long timeDON = 0; //time that has passed since hall effect was triggered | ||
long timeDOF = 0; //time that has passed since coil was activated | long timeDOF = 0; //time that has passed since coil was activated | ||
− | int timeOFa = 0; // | + | int timeOFa = 0; // |
long threshOn = 100; // milliseconds to pass before activating solid state relay to sending a push with coil | 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 | long threshOf = 100; // milliseconds to pass before deactivating solid state relay | ||
Line 39: | Line 86: | ||
// adding attachInterrupt on digital pin 2, | // adding attachInterrupt on digital pin 2, | ||
// when this pin's state changes, the push function will be executed | // when this pin's state changes, the push function will be executed | ||
− | attachInterrupt(0, push, RISING); | + | attachInterrupt(0, push, RISING); |
} | } | ||
− | |||
void loop() { | void loop() { | ||
− | unsigned long currentTime = millis(); | + | unsigned long currentTime = millis(); //getting current time |
− | PiezoValue = analogRead(Piezo); | + | PiezoValue = analogRead(Piezo); //reading piezo value on analog pin 0 |
//Serial.println(PiezoValue); | //Serial.println(PiezoValue); | ||
if (PiezoValue > thPiezo){ | if (PiezoValue > thPiezo){ | ||
Line 82: | Line 128: | ||
timeON = currentTime; | timeON = currentTime; | ||
} | } | ||
+ | </syntaxhighlight> | ||
− | + | <videoflash type="vimeo">52616089|1024|720</videoflash> | |
− | |||
− | |||
[[category:Daylighting]] | [[category:Daylighting]] |
Revision as of 12:57, 5 December 2012
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;
}