Friday, 27 November 2015

27.11.15 Getting there now !!

Thesis: I am now at the proof reading stage and I will be spending the next week or so doing this. I also have to show my thesis to my tutor as a requirement of submission to make sure I have covered everything and met the requirements set out by the university. 

Model: The robot is about finished structurally. I need to finish off the right hand as you can see in the picture but I have kept all the forms I used for the left hand so technically if I just flip them upside down I should be able to get a workable frame for the right hand. The arm is rigged with all the required servos and they are terminated into the splitters, switches and servo shield. I have tested this system and it works in parallel which is a bit of a relief as anything that goes wrong at this stage is going to have a massive knock on affect. 

I am going to be taking the robot over to uni this week so I need to break him down into transportable parts and make sure that he can be assembled easily at uni as I will be carrying a lot with just the body of the robot along without adding tools ect into the equation. 


Feelings: I am very happy with how things have turned out this session, the robot is looking great if not a little bit terrifying but I think that is all part of his charm.

Evaluation: The other thing I need to mention is the neck mechanism, this is the same type of aluminium rotational base that I used in my earlier project. The bonus of using this base is that I know how to put it together and strip it down at the drop of a hat as I had to lean to do this in my last project as the kit came with only chinese instructions. The other good thing about the unit is that it has all the holes pre drilled to match the standard hole dimensions on the other brackets. Is is also the same colour and material so it keeps in with the aesthetics of the piece. I have ordered some small portable speakers that I can place into the body form of the robot. I went for wire connections instead of bluetooth as I think it will be simpler when connection it up to the audio trigger. It would of been nice to have a couple less wires hanging from the robot but I do not have time to test if the bluetooth idea would work so with time ticking this is the safer option of the two.

Analysis: The current situation of the project makes sense to me, I now had a massive 7ft tall robot standing in my living room which of course scares the hell out of guests. However, my children seem to have fallen in love with him and are sad about him having to go away and spend some time at uni.

Conclusion: In conclusion this has been a massively important session, the robot not stands as an almost complete structure (right hand) but just seeing it standing in its full form is amazing. I really think he has a ton of personality and I think this is shown by how much my kids have become attached to him. I have decided to call him ALDOUS after the English Philosopher Aldous Huxely, I have been steadily reading 'The doors of perception - heaven and hell' over the past couple of week in my spare time and I really think Aldous was onto something with his work. The idea that we are conditioned to see only superficial, surfacial fragments or what we call reality is in all a coping mechanism. Aldous through drug experimentation managed, in his own way to see behind the curtains as it was, and what he saw was more akin to computer code or patterns. This underlying mechanism is what Aldous perceived as structuring the universe, the real REAL behind the perceived real... It has a big impact on me

Action Plan: Get the robot over to uni and start programming asap. Deadline is only a couple of weeks away, everyone is massively busy with Christmas so its time to knuckle down and get this done !!!

Friday, 6 November 2015

Prototype Control System: Complete

This is the documentation for the custom animatronic control system:

Hardware:

Arduino
Wires
Servo
R.C Control
2 x Relay
Potentiometer

Script:

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created

int pos = 0;    // variable to store the servo position
int sensorValue = analogRead(A2);

int mouthmode=1; //this is remote control      2 will be auto control
int targpositionservosensor=0;
int currentpositionservosensor=0;


int outcount=0;

void setup()

{
  Serial.begin(9600);
  myservo.attach(A0);  // attaches the servo on pin 9 to the servo object
  pinMode(10,OUTPUT);  //turn OFF for user control --- remember to turn the other off (first)
  pinMode(11,OUTPUT); //turn OFF for arduino control  --- remember to turn the other off (first)
  myservo.write(90);

   digitalWrite(11,HIGH);
     digitalWrite(10,HIGH);
     delay(50);
}

//insert old script for mouth controls in mode 1. Use I pod output for audio trigger instead of laptop. set time for interval
//between audio off to relay back to mode 2.  
//  

void loop()
{
  if(mouthmode==1){
    digitalWrite(11,HIGH);
     digitalWrite(10,LOW);
 
   currentpositionservosensor=analogRead(A2);
   targpositionservosensor=analogRead(A2);
   outcount++;
   if(outcount>20000){
     Serial.println("going into mouthmode 2");
    mouthmode=2;
    outcount=0;
     digitalWrite(11,HIGH);
     digitalWrite(10,HIGH);
  }
  }

  if(mouthmode==3){
     digitalWrite(11,LOW);
     digitalWrite(10,HIGH);
      Serial.print("Targ:");
     Serial.print(targpositionservosensor);
      Serial.print(" Current:");
       Serial.println(currentpositionservosensor);
    if(targpositionservosensor>currentpositionservosensor){
   
      pos=pos-1;
       currentpositionservosensor=analogRead(A2);
   
    }
 
     if(targpositionservosensor<currentpositionservosensor){
   
      pos=pos+1;
       currentpositionservosensor=analogRead(A2);
   
    }
 
    //use audio trigger
     if(targpositionservosensor==currentpositionservosensor){
      Serial.println("going into mouthmode 1 - user control");
     mouthmode=1;
   
    }
 
    myservo.write(pos);
    delay(5);
 
  }

  if(mouthmode==2){
   // outcount=0;
     digitalWrite(11,LOW);
     digitalWrite(10,HIGH);
 
  Serial.println(sensorValue);
  delay(1);

  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);
sensorValue = analogRead(A2);
 currentpositionservosensor=analogRead(A2);
 //long r=random(1000);
 outcount++;
  if(outcount>1000){

     Serial.println("going into mouthmode 1");
    mouthmode=1;
    outcount=0;
     digitalWrite(11,HIGH);
     digitalWrite(10,HIGH);
  }


Serial.print("Angle");
Serial.print(pos);
Serial.print(" Sensor:");
Serial.println(+sensorValue);

// tell servo to go to position in variable 'pos'
    delay(70);                       // waits 15ms for the servo to reach the position
  }
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees
  {

 //long r=random(1000);
 outcount++;
  if(outcount>1000){
     Serial.println("going into mouthmode 1");
    mouthmode=1;
    outcount=0;
    digitalWrite(11,HIGH);
     digitalWrite(10,HIGH);
  }


    myservo.write(pos);              // tell servo to go to position in variable 'pos'
 
   sensorValue = analogRead(2);
    currentpositionservosensor=analogRead(2);
Serial.print("Angle");
Serial.print(pos);
Serial.print(" Sensor:");
Serial.println(+sensorValue);
 
 
    delay(50);                       // waits 15ms for the servo to reach the position
  }
  }


}

Treatment:

The concept of this control system was to develop a framework that would allow seamless transition between automated control (Arduino programmed control) and manned operation (r.c). The problem that needed to be addressed concerned measuring the angle of the servo in Arduino when the R.C control was initiated as this disconnected the signal from the Arduino control (Relay 1= Arduino Control; Relay 2 = R.C) The operation of the relay system is as a switch between the two control methods however the potentiometer mounted on the servo allows for constant measurement of the servo angle in Arduino. The position of the potentiometer  can then be set as the signal point for the Arduino (auto) control meaning that transition would be smooth between the two control methods, to test this I used a simple 'judder' for the automation and the r.c would then have to switch seamlessly between the quick movements.

This system addresses the issue of seamless transition between automative and manned control frameworks.


(The operation of the system in this format is to recreate autonomous functions associated with human physical/cognitive disorders in this case facial ticks - as outlined in my chapter on embodiment)

Map

There is no icon for r.c transmitter..so I used a joystick symbol instead.



Feelings: I am really happy with how this control system works, it has taken a good while to get it running exactly how I described it in my theoretical work. That said it was certainly worth the effort and will hopefully add further depth to the character. 

Evaluation: It has taken me a while to get in to uni and document this element of the project but everything sort of hit me at once and I needed to attend to more pressing matters as they came into focus. I really think there is a future for high variable systems such as this example in the future of animatronic characters. I think with further refinement and testing a framework can be developed that will bring a whole new dimension to the idea of automation and puppetry. The idea of creating a system that incorporates improvisational elements also gives the character a greater sense of personality and life. I would eventually like to further this system by incorporating more expressional factors into the program loop, this would allow for unpredictability similar to that of working with an animal. 

Analysis: the current situation of the project makes sense, it is nice to be back in uni and working on a few pieces in a study environment. One of the issue I have found doing a masters via research is that it can be a very singular and personal experience. This approach is all very well for concentration and structure but it can become very lonely at times and been back in uni and getting to chat with other pgr students is really nice. 

Conclusion: In conclusion I am really happy with how the control system performs and I think the video makes it really easy to see how the different parts function as a whole. 

Action Plan: The action plan is to new get the project over to uni and take things from there. Once the mechanical parts are secured at uni I will be able to program and adapt things from there. I think doing all this in uni is the best way of going about this process as I also have access to work books and my tutor is close by if I get stuck at any stage. Doing this at home would be a little more difficult as at times it can be hard to sort of explain what I am trying to achieve with the scripture over email in comparison to in person. Plus it is a lot simpler to deal with any errors when you have a second pair of eyes looking over what you are typing. 

Thursday, 5 November 2015

05.11.15

Thesis: I am currently working on my contents pages, this part of the thesis is proving the most difficult to format. I have tried various techniques in order to align my page numbers and titles but I am still having problems getting it to align correctly. I am starting to think that as long as my page number all light up the titles can just go wherever. I have seen examples where people have used a cascading effect and it dose not look to bad but its still not brilliant. I cannot understand why they have made such a simple format procedure so difficult. 

Robot: I have now rigged up all the fingers to their corresponding touch sensor they work really well and it feels great to operate as each finger matches the placement on the sensor on the back of the robot. Doing things this way makes it feel like the hand is an extension of your own and hopefully adds to the concept of embodiment via physical control. This whole section of the robot now runs off its own portable power source, I have used a 6amp 2500v speed battery for this as it seems to give everything enough power while at the same time. The charge time of the battery is around 5 hours but this gives the operator around 2 hours worth of usage. I think this is in part down to the quality of the spektrum servos as they have a very low stand-by power requirement. 


Final test of the touch reactive sensors

This system is now complete, it runs off its own power source and micro controller. The action of the fingers is very smooth and the hand can perform simple tasks like gripping and dropping objects.  

Feelings

I feel very happy with how things have turned out in this session, the programming framework I put together for the arduino side of things has worked really well in this instance and it was very simple to measure the angles of the servos using my servo tester and then just input the data into the scripture.   

Evaluation

I have enjoyed this session in part down to seeing this element come to life via the touch sensors. It has a better operational feel in comparison to using the r.c remote. I am really glad that I included this control format in the model as it was not something I would have considered at the start. This is how important my theoretical work is in consideration of the physical build as it really outlines the direction of the practical elements of the project. Giving this element of the robot its own power supply as gives it in many ways independence from the other parts of the system, what I mean by this is its really easy to demonstrate to people how the hands work as it does not require booting up a pc or setting up several wires into different ports on a computer. I think this is a really nice way of going about things as its quick, simple and it gives everyone access as the flick of a switch. 

Analysis

The current situation of the project makes sense, both elements of the project are starting to enter their final stages and its just a case of making sure everything goes smoothly during this period. I also feel that the practical side of things is catching up with the theoretical side of the project now I am reaching the end of things. This is more or less how I wanted things to run as the written side of things has always led the project up till this point. 

Conclusion

In conclusion this session has been very useful in terms of perceiving how the rest of the project will run. I have still got a fair bit to go on the practical side of things but so far I am really please with how things have turned out. I need to start replicating all the elements I used for the left hand of the robot to construct the right hand. I plan to run both of these elements from the same controller. I am going to use a set of switches to control the functionality of each of the hands. I think this will provide a unique way of operating the system and it will also allow me to run everything from the same power source as I will just be using splitter cables instead of individuals powering each servo from the main source. The only issue I can see by doing things in this manor is I will have to have the same scripture for both hands. This means I need to position the servo arms on the left manually and not a programmatic level. This should not cause too many problems as the right hand will function exactly the same as the left in terms of operational 

Action Plan

The plan for the next few days is to start putting the different parts of the robot together and finish of constructing the other hand. I am becoming aware of the looming deadline but I really feel that things are moving on at such a rate that I should either finish right on the deadline or a little bit before.