Thursday, May 16, 2013

Final project... Final post

My ideas for the final project went through a number of changes.  Originally i wanted to assemble a number of simple relay controlled TV's with static magnet placement on various parts of the tube.  This seemed almost too simple for the class, and not a good representation of things I learned.  My idea then changed to a single monitor, with moving magnets hidden within the monitor casing.  The goal was to use a single servo and gears to move the various magnets (I had planned on three magnets, following three paths of circular motion.

step one was to remove the tube and circuitry from the TV's plastic casing.  I had to make sure the circuitry and wires were pulled far enough away from the tube to allow space for the gears.





step two was to cut the gears and figure out their placement.  I started with what I felt the most difficult gear/placement was---a gear placed around the positioning yoke.  Because of the size of the circuit board attached to the base of the electron gun (as well as the placement of high-voltage wiring I did not want to risk cutting/damaging: very high gauge wire I was unable to find to mend the cut), there was no way to simply slide the gear onto the yoke.  My solution was to cut the gear in half, and wood glue it into position---which was difficult because of the necessity to keep the gear teeth in precise line/proportion with each other. It was successful though.
Here are photos/video of the yoke gear, as well as its supporting base gears:


 
 It was at this point in the construction that I realized that the magnets that would be attached to the yoke gear were too strong (the magnet strength was necessary for the intended manipulation) and the magnetic force between the magnet and the yoke (which is just one giant electromagnet) was more powerful than the force of the servo.  I would have had to "gear-up" many times to have the servo exude enough force---which I did not have room for behind the tube because of the length of wires attached to the electron gun.  I had to abandon the yoke gear/magnet.

At this point I gave up the idea of a single servo moving all the magnets, so I simply constructed two wooden plates attached to servos, with the magnets embedded into the wooden plates.  here is video of the plates turning outside and away from the tube, as well as planned placement of the motors within the TV case and their resulting effect with a simple "blue-screen" image as the TV's input.

 

I was unable to remove the gear around the yoke because I did such a good job securing it in place---the wood was too thick to simply dremel through, and the wood glue bond would not simply snap.

The servos were continuous rotation, so the code was very simple.  I wanted the speed of the two motors to be different, so the magnet placement would go in/out of phase, giving more variance in the image manipulation.  Here is the code, which includes a whole lot of earlier versions of the code (all disabled using "///////////") when I was toying around with the idea of having variable speed control for the motors.  I decided against this.  I found the speeds that I felt gave the best effect to the manipulation, allowing someone to adjust that would only take away from the piece.   

#include <Servo.h>

Servo myservo;  
Servo myservo3;

//int potpin = 1; 
int val;    

//int potpin3 = 3;
int val3;
////////////////////////

//const int relay = 5;

//int potpin2 = 2;
//int val2;
/////////////////////
void setup()
{
  Serial.begin(9600);
  myservo.attach(3);
  myservo3.attach(4);
  //pinMode(relay, OUTPUT); 
}

void loop()
{
  //val = analogRead(potpin);            
  //val = map(val, 0, 1023, 91, 97);     
  val = 96;
  myservo.write(val);                  
  delay(15);                          
 
 // val2 = analogRead(potpin2);
 // val2 = map(val2, 0, 1023, 100, 500);
 // delay(15);
 
  //digitalWrite(relay, HIGH);   //
  //delay(val2);               //
  //digitalWrite(relay, LOW);    //
  //delay(val2);
 
  //val3 = analogRead(potpin3);            
  //val3 = map(val3, 0, 1023, 91, 97);     
  val3 = 95;
  myservo3.write(val3);                  
  delay(15);
 
Serial.print("val = ");
Serial.print(val);
//Serial.print("       ");
//Serial.print("val2 = ");
//Serial.print(val2);
Serial.print("        ");
Serial.print("val3 = ");
Serial.print(val3);
Serial.println("       ");
}



The disabled code also includes the initial relay control coding (the relay was designed to switch back and forth between  disabling and enabling the Vertical Axis positioning of the yoke----when disabled, the image on the screen would change from full image to a single thin line.  An interesting side note = when this is done, all the image information is still present within this thin line, it is just compacted together).  I ran into issues here because of the loop function in the arduino programming---the relay code would cause the motors to stop turning momentarily.  I felt this looked really bad, and unnatural for the piece.  


Thank goodnes for the ATTiny!  I was able to write some very simple code and load it onto the ATTiny IC, to act as a mini-arduino!  The momentary pause in servo motion was avoided.  It was difficult to figure out how to program the ATTiny, the instructions online were a little vague, and it turns out they were missing a very simple but important step.  i also had to use an older version of the Arduino programming interface to make it work properly.  Here is the code for the ATTiny (very simple, almost not worth posting).  The result is simply turning the relay on for 17 seconds, then off for 17 seconds:

 
////////////////////////

const int relay = 0;


int val2;
/////////////////////
void setup()
{

  pinMode(relay, OUTPUT); 
}

void loop()
{

  val2 = 17000
  delay(15);
 
  digitalWrite(relay, HIGH);  
  delay(val2);             
  digitalWrite(relay, LOW);   
  delay(val2);
}


At this point, all I had to do was attach the wooden servo cases into the larger TV case (***I had to use BRASS SCREWS, which are non-magnetic to prevent disruptive force from the powerfull rare-earth magnets) and then make the whole thing a little more pleasing to the eye.  I used re-purposed and scrap wood paneling, which I felt mirrored, as well as added to the aged aesthetic of the piece.  The TV itself was manufactured in the early 1970's, the resulting outer design I feel places this piece as "an object" around that time (if not earlier).  It ended up having an almost Western feel to it, something that was quite popular in the 50's and 70's in home decor.  Here is some video footage of the final piece in action in the kenilworth building (i appologize for the wide angle lense---the only digital video I can shoot right now is on my go-pro):


So there are two things I plan to do with this piece still before I consider it complete:
1) I am going to attach one more servo inside that will turn the Yoke gear.  Attached to that gear will be a very low powered magnet---this will create an additional swirl of color, but not bend the image in any way.

this will add alot to the viewing window on the side.  As it is right now, it's a pretty disappointing sight to see the big gear, but static and unmoving. 

2) I am going to build a signal generator, something that will switch between solid red, blue, and green screens, and yet to be determined video noise signals.  Each solid color screen will cause the magnetic manipulation to react in different ways---different ripples of alternating color.  The video noise signals will cause the magnets to produce more than simple RGB color waves, creating purples and oranges and yellows (secondary colors).
This signal generator may/may not have interactive controls.  If it does, surely it will be accompanied with suggested instructions.


The End.

I really enjoyed this class, and I really value the (minimal) programming knowledge I now have.   It is enough to add a great deal of newness to my work, and I'm excited to see where it leads me in my practice. 








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.


Monday, February 11, 2013

non-class related test - embedding link in text

sorry, this is non-class related.  But i need to remember how to embed public-folder links from Pantherfile into text on blogger for the class I am TA-ing for.

that is embedded in this

the end. hope this works.

Friday, February 8, 2013

LAB#4

sequencing LED's with arduino - I feel like my coding is different than the in-class example.  I couldn't remember how the direction-reversal was set up (i didn't take clear enough notes).  I feel like coding or programming or whatever it is called is starting to make sense though, so I was able to figure it out.  I liked logic... I like this in the same way.


















arduino coding:

hopefully this weekend will allow time for building an RCA sequencer... DPDT relay style, switch audio and video signals simultaneously, automatically.  I've tried building those before using metal plates and slow, heavy-duty motors---failed attempts.  I would have never thought programming such a thing digitally would be so simple.  that makes me happy and hope-full.

Tuesday, February 5, 2013

Lab #3

My first bit of programming with Arduino...  counting, making statements and exclamations about whether or not it is impressive to count.

Lab#3






Sunday, February 3, 2013

lab #2

I need an on/off indicator light for my synthesizer so i don't accidentally wear out the batteries!
I havn't put any LED's on anything in a while, so this was a great refresher!
too bright

too low

  
just right