Tuesday, April 2, 2013

Final project proposal

So for my final project, I want to build a series of relay circuits to trigger old tube television functions---mainly the charge and discharge of the cathode ray gun, and the anode charge of the tube itself (this is essentially a fancy way of saying turning the TV on and off at a specific rate).  This might sound like non-sense, so here are some videos to clarify (note: the light of the TV's is quite bright and is not represented well through video recording---it is supposed to be a live visual experience)>


Each TV utilizes a different placement of various types of magnets to accent/manipulate the charge/discharge of the tube (some magnets hidden, some magnets exposed).  For the final project, Im guessing (hoping) to have about 6 TV's finished for this.

The relay circuits will be designed using Max msp, then loaded onto the arduino, then that data will be transferred onto ATiny chips, then those circuits will be hidden within the TV casing.

Why do I want to use relays instead of transistors?  I like the physicality of the switch in relays, I like hearing it and I feel like keeping that 'click' sound makes sense in terms of this project----when the cathode ray gun charges/discharges it makes a very nice, but also sort of dangerous sounding sweeping tone (these are all pretty old TV's) and it is paired well with the 'click' of the relay:  "click-bweeeyoo"  ...   "click-boowop" ...  etc.

Max MSP and Jitter

So here is the first thing (program?  not sure what it would be called) I made as a test of my memory for max msp.  It is just a sequence of flashing buttons.  I just used exactly what we learned in class, multiplied it by... i don't even know---x100 or so?

I was trying to make a series of triangle waves that would link up to make diagonal lines.  Not a complete success, but not a total failure.  Good for a first attempt.  Then I gave up to start working on televisions for our final projects (next post).

so here are some photos and a video of the max msp setup:



 no matter how close I moved the buttons together, I couldn't get rid of that white line, unless I overlapped the buttons quite a bit (which cut into the circles... no good!).


Tuesday, March 26, 2013

mid-term project

So, for my mid term project, I took this 1970's (???) portable television set...


...and added variable resistors to the electromagnetic yoke-controls.  TV yokes determine the positioning of the image on the screen.  The modifications limited the yoke positioning signals for the horizontal and vertical positioning, I crossed the x--y axis controls (creating circular and semi-3D imaging).  I also connected one of the yolk input voltages to the TV's  audio amplifier input, I then connected the audio output to the video input on the device.  Here is the initial modification: 


I wanted to automate these controls somehow, so I decided to cut gears out of wood and attach them to the pots like control knobs.  I printed the gear outlines off of this website:

http://woodgears.ca/gear_cutting/template.html

...which is a great site!  You can test different gear settings, then animate them to approximate the transference of degree of turn.  I had to change the 180 degree turn of a servo motor to (approximately) a 270 degree turn of the potentiometers.  After printing the gear outlines, I glued them onto wood, and cut them out using a band saw, as well as a scroll saw.

here is a video of the first test...  two gears = one motorized and one attached to a pot:
this seemed to work just fine, so I printed and cut out two more pot-gears and wired it up.


at this point, the modified TV had inexplicably changed.  Im pretty sure I accidentally fried a diode, or resistor somewhere within the circuitry from over use.  But no matter, it still worked, only differently... and actually for the better!

Because the TV's parameters had changed, I had to adjust my project accordingly.  I decided to have my gear box not only automate images on the portable TV, but also automate parameters of the video-noise generator I had built over christmas break.

I first finished building the gear box, then figured out what parameters I wanted automated for the noise-generator, and which parameters I wanted to leave manually controllable.

pictures of the nearly completed gear box:


and here is video of it hooked up to both the portable TV, as well as the video-noise generator:
The three smaller gears on the front of the gear-box are hooked up to the video-noise generator, the gears on top control the small portable TV yoke.  There is a potentiometer on the front of the box that allows one to control the speed of the gear sweep, and a switch which turns the front motor off.  This is nice inorder to set the manual controls of the noise-generator.

The audio heard is an interesting point to note---most video signals are of much too high of a frequency for us to hear, so i coupled the video signals with the grounding-hum.  This results in one being able to hear the changes in frequency against the harmonics of the ground hum.

So it's all hooked up, Im pretty happy with it so far.  I plan to add more gears to the box which will be connected to a color generating circuit which I will send the video-noise signal through, perhaps to an additional TV to retain the initial noise signal images.

For a long term plan, I hope to just keep adding control modules and additional screens to this thing, until it is very large with many many differing visual elements on different screens.

the end.

Sunday, March 3, 2013

Mid-term project proposals and LED flashlight circuit

here are my 5 initial ideas for the mid term project:






machine for breaking wood - (not pictured = piezo microphones attached to the base of each 1x1 to pick up the sounds of the wood cracking and bending).

Also, Im pretty sure I can find a relatively cheap "wench" or "bait-and-tackle" on craigs list (i.e. the kind that go on the front of trucks).  then I would simply need to get various sizes of pulley's and extend a drive shaft off of the 'wench' for each of them.    EASY!
 This idea I do not like.  I like an aspect of it--that of submerging video electronics into mineral oil-which does not conduct electricity (giving the appearance of being submerged underwater).

like that, but not for this sort of kinetic project.
 I do like this idea, but also perhaps not for this project...  a summer project/collaboration with another film student (for i do not work in film proper).
 I like the top idea of this one, I was looking at gears at science and surplus this weekend (not a whole lot of selection).  I would almost rather just cut cogs out of wood for this instead of using plastic or metal gears.   Im pretty sure that would be do-able (allowing time for trial and errors of course).


the  bottom idea I like, but... nah.  a little risky attaching metal worm-screws near the yoke of a TV.... lots of voltage... could arc.  forget it.

here is what the circuit layout of my RGB LED flashlight turned out.  I could have made it more compact, but this allows enough space to actually adjust the RGB pots, and also hit the button (not pictured...  this is actually a scan from my printer, I can't seem to find my digital camera, sorry).  The flashlight works great except for the 'red' pot---it jumps a bit, so Im going to replace it eventually.

I think Im going to give this to my fellow film grad Elizabeth, she just made a beautiful film of just shining LED's onto film in the dark room.  She might want to screw around with this adjustable one?  we shall see.

Sunday, February 24, 2013

LAB #7

LED sequence - pot controls sequence speed, button pressed = sequence hold.
Servo motors - triggered by sequence count #2 and 4 (green and blue).

I tried to make it so when the button was pressed on count 2 or 4, the servo motors would continue to move as long as the count remained at 2 or 4, but I couldn't get that to work.   There is some conditional I'm missing, or perhaps have placed in the wrong spot in the programming  void.loop.   Not quite sure.  I'll figure it out though.  For now though, what is here will suffice for this lab exercise.


here's the code:

////////3///////servo library, name servo motors//////
#include <Servo.h>

Servo Green;
Servo Blue;
/////////3///////////

/////////////////////////
const int led01 = 8;
const int led02 = 9;
const int led03 = 4;
const int led04 = 5;
const int led05 = 6;

int count = 0;
int dir = 1;

////////////////////
const int buttonPin = 7;
int buttonPress = 0;

//const int led06 = 11;
int bright = 0;
int dirB = 1;
//////////////////

///2///////////////
const int potPin = A0;
int potValue = 0;
int newValue = 0;

int dlyVar = 0;

///2//////////////


void setup() {               
 
  Serial.begin(9600);
 
  pinMode(led01, OUTPUT);    
  pinMode(led02, OUTPUT);
  pinMode(led03, OUTPUT);
  pinMode(led04, OUTPUT);
  pinMode(led05, OUTPUT);
/////////////////////////// 
  pinMode(buttonPin, INPUT);
  digitalWrite(buttonPin, HIGH);
  ///////////////////////////

/////////////3/////////

Green.attach(3);
Blue.attach(11);

///////////3/////////

}


void loop() {
  /////2//////////////
  potValue = analogRead(potPin);
  newValue = map(potValue, 0, 1023, 50, 1000); 
 
 
  dlyVar = newValue;

Serial.print("potValue = ");
Serial.print(potValue);
Serial.print("      ");
Serial.print("newValue = ");
Serial.print(newValue);
Serial.print("           ");
  /////2//////////////
 
  //////////////////////////////
  buttonPress = digitalRead(buttonPin);
  Serial.print("buttonPress = ");
  Serial.print(buttonPress);
  Serial.print("          ");
 
 
  if(buttonPress==1){
 // digitalWrite(led06, LOW);
 
  /////////////////////////////////////
 
  if(count >= 6){
   dir=-1;
  }
 
  else if(count <=0){
    dir=1;
  }
 
  count = count+1*dir;
 
  delay(dlyVar);
 
  ///^^2^^////changed delay amount to be controlled by pot////////
 
  if(count==0){
  digitalWrite(led01, LOW);               
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);      
  digitalWrite(led05, LOW);
  
  }
 
  else if(count==1){
  digitalWrite(led01, HIGH);              
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW);

  }
 
  else if(count==2){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, HIGH);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);      
  digitalWrite(led05, LOW);
 
  ///////////3/////////
   Green.write(90);
  delay(500);
  Green.write(0);
  delay(10);
  ////////////3////////
  }

  else if(count==3){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, HIGH);
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW); 
  }

  else if(count==4){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, HIGH);   
  digitalWrite(led05, LOW); 

///////3////////// 
  Blue.write(90);
  delay(500);
  Blue.write(0);
  delay(10);
/////3///////////
}

 else if(count==5){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, LOW);   
  digitalWrite(led05, HIGH); 

}

 else if(count==6){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW);
 }


Serial.print("sequence-count = ");
Serial.print(count);
Serial.println("      ");

}
//////////////////////////
if(buttonPress==0){
 bright = bright + dirB;

if(bright>+255){
 dirB = -1;
}

else if(bright<=0){
dirB = 1;
////////////////3///////////////
if(count==2){
    Green.write(90);
  delay(500);
  Green.write(0);
  delay(10);
}

if(count==4){
  Blue.write(90);
  delay(500);
  Blue.write(0);
  delay(10);
}
///////////3////////////////
}



   
    //analogWrite(led06, bright);

Serial.print("sequence hold = ");
Serial.print(count);
Serial.println("   ");
/////////////////////////////
}
}

Saturday, February 16, 2013

LAB #6

I added a potentiometer to vary the sequence speed of the last circuit.  The control pin of my pot is going to an analog in,  the arduino measures the resistance of the pot between the ground and 5v. terminal.  then I map control ratio for for the speed of the digitally triggered sequence.




here is the coding (analog in information in between :  /////////2//////////'s).  i didn't have to add very much.  I don't want to fade these LED, s because they are going to be relay on/off indicators soon (as soon as my relays come in the mail).  Fading wouldn't make sense then.

const int led01 = 5;
const int led02 = 6;
const int led03 = 7;
const int led04 = 8;
const int led05 = 9;

int count = 0;
int dir = 1;

////////////////////
const int buttonPin = 3;
int buttonPress = 0;

const int led06 = 11;
int bright = 0;
int dirB = 1;
//////////////////

///2///////////////
const int potPin = A0;
int potValue = 0;
int newValue = 0;

int dlyVar = 0;

///2//////////////

void setup() {               
 
  Serial.begin(9600);
 
  pinMode(led01, OUTPUT);    
  pinMode(led02, OUTPUT);
  pinMode(led03, OUTPUT);
  pinMode(led04, OUTPUT);
  pinMode(led05, OUTPUT);
/////////////////////////// 
  pinMode(buttonPin, INPUT);
  digitalWrite(buttonPin, HIGH);
  ///////////////////////////
}


void loop() {
  /////2//////////////
  potValue = analogRead(potPin);
  newValue = map(potValue, 0, 1023, 100, 1000); 
 
 
  dlyVar = newValue;

Serial.print("potValue = ");
Serial.print(potValue);
Serial.print("      ");
Serial.print("newValue = ");
Serial.print(newValue);
Serial.print("           ");
  /////2//////////////
 
  //////////////////////////////
  buttonPress = digitalRead(buttonPin);
  Serial.print("buttonPress = ");
  Serial.print(buttonPress);
  Serial.print("          ");
 
 
  if(buttonPress==1){
  digitalWrite(led06, LOW);
 
  /////////////////////////////////////
 
  if(count >= 6){
   dir=-1;
  }
 
  else if(count <=0){
    dir=1;
  }
 
  count = count+1*dir;
 
  delay(dlyVar);
 
  ///^^2^^////changed delay amount to be controlled by pot////////
 
  if(count==0){
  digitalWrite(led01, LOW);               
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);      
  digitalWrite(led05, LOW);
  
  }
 
  else if(count==1){
  digitalWrite(led01, HIGH);              
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW);

  }
 
  else if(count==2){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, HIGH);   
  digitalWrite(led03, LOW);
  digitalWrite(led04, LOW);      
  digitalWrite(led05, LOW);
 
  }

  else if(count==3){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, HIGH);
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW); 
  }

  else if(count==4){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, HIGH);   
  digitalWrite(led05, LOW); 
}

 else if(count==5){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, LOW);   
  digitalWrite(led05, HIGH); 

}

 else if(count==6){
  digitalWrite(led01, LOW);  
  digitalWrite(led02, LOW);   
  digitalWrite(led03, LOW);   
  digitalWrite(led04, LOW);   
  digitalWrite(led05, LOW);
 }


Serial.print("sequence-count = ");
Serial.print(count);
Serial.println("      ");

}
//////////////////////////
if(buttonPress==0){
 bright = bright + dirB;

if(bright>+255){
 dirB = -1;
}

else if(bright<=0){
dirB = 1;
}

analogWrite(led06, bright);

Serial.print("sequence hold = ");
Serial.print(count);
Serial.println("   ");
/////////////////////////////
}
}

Tuesday, February 12, 2013

LAB #5

so I took my lab #4 and and added a digital temporary push-button (normally open style in terms of the sequence).  Also added a pulsing LED to signify when the button should be pushed in order to trigger the sequence.
I removed the digitalWrite information for the sequencing LED's when the digital trigger reads : 1 (i.e. button open).
Because there is no conclusion as to what happens to the sequence when the button is not pressed, the sequence freezes in place.  Pressing the button acts as a hold-release for the sequence.

 

here's the code for it (i tried to put all the new code for this project in between lines of ////////////////  but I think I forgot to add the   ////////'s  a couple places).









 the end.