Monday, December 9, 2013

09DEC2013- Team "ThinkStation" met for 2 hours to assemble the final project. Below are pictures of the completed assembly and a video.
















To make everything work we used the following code that was written by Nick.

//THE USELESS MACHINE
#include <Servo.h> //Including the servor library in the code
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int LED = 8;
// this constant won't change:
const int onoffswitch = 10 ; // the pin that the pushbutton is attached to
// Variables will change:
int switchCounter = 0; // counter for the number of button presses
int switchState = 0; // current state of the button
int lastSwitchState = 0; // previous state of the button
//Set servo as myservo
Servo myservo;
void setup () { //Starting off the code

// initialize the button pin as a input:
pinMode(onoffswitch, INPUT);

//myservo is set to pin 12
myservo.attach(6);

//and is placed at 180 degree
myservo.write(180);

// initialize serial communication:
Serial.begin(9600);

//Start LCD Scrren by clearing and writing "Points ="
lcd.begin(16, 2);
lcd.clear();
lcd.print("THE USELESS GAME");
lcd.setCursor(0,1);
lcd.print("Points =");
int switchCounter = 0;
}

void loop () //Start loop
{

// read the switch input pin:
switchState = digitalRead(onoffswitch);

// compare the switchState to its previous state
if (switchState != lastSwitchState)
{
// if the state has changed, increment the counter
digitalWrite(LED,HIGH);
delay(500);

if (switchState == HIGH) {
// if the current state is HIGH then the button
// went from off to on:
myservo.write (180); //so place servo at 180 degree so that
//the finger will push the switch back to off
switchCounter++;
lcd.setCursor(9,1);
lcd.print(switchCounter); //write out button presses

} //close IF statement


else{
myservo.write (25); //move servo to position 25 degree
digitalWrite(LED,LOW);
delay (100); //then pause for 10th of a second
} //close ELSE statement


} //close IF statement
// save the current state as the last state,
//for next time through the loop
lastSwitchState = switchState;
} //close LOOP

The project summary was written my Matt and reviewed by the other members of team "ThinkStation" before being submitted.

To assemble the "Useless Machine" we gorilla glued all of the acrylic walls together with the exception of the lid that has the hinge on it. The LCD screen was placed on the lid opposite of the hinged lid using 4 nuts and bolts. Along with the LCD screen there is also an LED light and a switch that are mounted on the same lid using bulkhead fittings that Matt supplied. On one of the walls of the box the servo motor is mounted using double sided sticky tape, because the wall with the holes to bolt the motor on that we originally submitted for fabrication was never delivered.

Upon testing of the final project we discovered that everything worked as we originally planned. One issue that arose while troubleshooting was the lack of power from using the LCD screen, servo motor,  and LED light all at the same time. Even though everything worked properly we did however encounter a few issues when it came to assembling the project due to inaccuracies of tolerances while dimensioning.

The best way to improve on the overall quality of the project is to learn more about geometric dimensioning and tolerance (GD&T). This will help eliminate the overlapping of parts and make the assembly process a lot smoother. As for redesigning parts that would be resolved by learning more about  GD&T.

Saturday, December 7, 2013


On Friday the 6th of December all three members off the group met to assemble the final project. However, not all of the parts were fabricated so we were not able to complete the "useless machine". We were able to assemble a fully functional machine that is only missing one side. Feel free to watch the YouTube video on this post of what we were able to assemble! We look forward to presenting the final project to everyone next Friday and are excited to see everyone else's as well.


                                   

Saturday, November 23, 2013

 
23NOV2013- Nick Barceloni and RJ lindsey met at RJ's house to build a working prototype. Below is a video of what was made.
 
 

As you can see the lid is not very rigid and therefore must be forced forward and downward a slight bit to make make it possible for the finger to flip the switch. Once we have the laser cut parts this shouldnot be an issue. Total time spent fabricating the prototype was 2 hours.

26NOV2013-
All three members of the group met in the computer lab to finalize the dimensions of the parts that will be sent to professor Sullivan for fabrication. Below is a link to a google drive with all of the parts that were submitted.

https://drive.google.com/folderview?id=0B-1jZH6PzzOIM09yaFVSeVFpY2M&usp=sharing

Along with the parts are the drawings for each of the parts as well.

Friday, November 22, 2013

Project Update 22NOV2013

22NOV2013-

Team "ThinkStation" met in the computer lab to finalize design of the box, "finger", and discuss building a prototype over the weekend. Below is a picture of the finalized picture of the box along with cut outs for the LCD screen, LED, and switch. The code has also been updated to make it that the top line of the LCD will write “THE USELESS GAME” and on the bottom will write “Points =”. Then whenever the button is pressed the LED will go on until the finger pushes the switch back. For each time you press the button it will display the amount pressed after “points =”.
Once the prototype of the "useless machine" is built a video will be posted on here for your enjoyment!
Arduino Code-
//THE USELESS MACHINE
#include <Servo.h> //Including the servor library in the code
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int LED = 8;
// this constant won't change:
const int onoffswitch = 2; // the pin that the pushbutton is attached to
// Variables will change:
int switchCounter = 0; // counter for the number of button presses
int switchState = 0; // current state of the button
int lastSwitchState = 0; // previous state of the button
//Set servo as myservo
Servo myservo;
void setup () { //Starting off the code

// initialize the button pin as a input:
pinMode(onoffswitch, INPUT);

//myservo is set to pin 12
myservo.attach(12);

//and is placed at 180 degree
myservo.write(180);

// initialize serial communication:
Serial.begin(9600);

//Start LCD Scrren by clearing and writing "Points ="
lcd.begin(16, 2);
lcd.clear();
lcd.print("THE USELESS GAME");
lcd.setCursor(0,1);
lcd.print("Points =");
int switchCounter = 0;
}

void loop () //Start loop
{

// read the switch input pin:
switchState = digitalRead(onoffswitch);

// compare the switchState to its previous state
if (switchState != lastSwitchState)
{
switchCounter++;
// if the state has changed, increment the counter
digitalWrite(LED,HIGH);
delay(500);

if (switchState == HIGH) {
// if the current state is HIGH then the button
// went from off to on:
myservo.write (180); //so place servo at 180 degree so that
//the finger will push the switch back to off
switchCounter++;
lcd.setCursor(9,1);
lcd.print(switchCounter); //write out button presses
}
delay(100); //pause for 10th of a second
if ((switchCounter <= 5) && (switchCounter >= 8))
{
lcd.setCursor(11,1);
lcd.print(">:[");
} //close IF statement
if (switchCounter <= 9)
{
lcd.setCursor(9,1);
lcd.print("XO stop!");
}
else{
myservo.write (25); //move servo to position 25 degree
digitalWrite(LED,LOW);
delay (100); //then pause for 10th of a second
} //close ELSE statement


} //close IF statement
// save the current state as the last state,
//for next time through the loop
lastSwitchState = switchState;
} //close LOOP
The box-

Sunday, November 17, 2013



A quick video of the servo working properly with the switch. This was done using the code below.

//This is the initial code. Code will eventually be modified for a switch instead of a potentiometer.
#include <Servo.h>      //Including the servor library in the code

// this constant won't change:
const int  onoffswitch = 2;    // the pin that the pushbutton is attached to
// Variables will change:
int switchCounter = 0;   // counter for the number of button presses
int switchState = 0;         // current state of the button
int lastSwitchState = 0;     // previous state of the button
//Set servo as myservo
Servo myservo;                    

void setup () {                                  //Starting off the code
  
    // initialize the button pin as a input:
  pinMode(onoffswitch, INPUT);

    //myservo is set to pin 12
  myservo.attach(12);

    //and is placed at 180 degree
  myservo.write(180);
  
    // initialize serial communication:
  Serial.begin(9600);
 }

 void loop ()                                     //Start loop
 {
 // read the switch input pin:
  switchState = digitalRead(onoffswitch);

  // compare the switchState to its previous state
  if (switchState != lastSwitchState)
      {
        // if the state has changed, increment the counter
        if (switchState == HIGH) {
          // if the current state is HIGH then the button
          // went from off to on:
        myservo.write (180);        //so place servo at 180 degree so that
                                    //the finger will push the switch back to off  
      switchCounter++;
      Serial.println("on");
      Serial.print("number of button pushes:  ");
      Serial.println(switchCounter);
        delay(100);                 //pause for 10th of a second
    
      }         //close IF statement
     else{                
        myservo.write (25);         //move servo to position 25 degree
        delay (100);                //then pause for 10th of a second
    
      }        //close ELSE statement
    
  }            //close IF statement
  // save the current state as the last state,
  //for next time through the loop
  lastSwitchState = switchState;
}              //close LOOP

Friday, November 15, 2013

November 12th, 2013-

Team "ThinkStation" consisting of RJ Lindsey, Nicholas Barceloni, and Matt Peddle met in the computer lab on the third floor of perry hall from 0900-1100.
Initial sketches/assembly discussed, initial code written/tested, and additional parts discussed and ordered.

The overall objective of the "useless machine" is for a switch to be activated, then a "finger" to come out of the box via the servo motor and turn the switch off.

The group project will consist of a box made of acrylic that has hinges on the top of one side, to allow the box to open, a switch mounted on the top of the opposite side, and an LED screen mounted in a location that has yet to be determined.We will also incorporate a LED that will light up when the switch is pressed forward and then turn off when the servo motor pushes the switch back. The LCD screen will read "Useless Game" when the servo motor is activated and the swith is pressed back.

The servo motor will be mounted inside of the box and will be controlled via the switch.  The code that we currently have written, and that is posted below, is setup for a potentiometer instead of a switch but will be corrected once we have the switch.

Goals set- Purchase a new servo motor that has more torque, purchase a swich, add a LED, LCD screen, and switch to the current drawing/assembly, and create a working assembly in solidworks.  Also, determine the amount of acrylic that we can use and whether or not it can have holes cut in it.

Code-
Project-Machine
===============

Project 22201
//This is the initial code. Code will eventually be modified for a switch instead of a potentiometer. 

#include <Servo.h>      //Including the servor library in the code
  
 
Servo myservo;          // Sets the servo as myservo
 
int x=0;                
 int potPin = A0;       //Potentiometer is connected to A0 and given an integer
 
void setup () {         //Starting off the code
    myservo.attach(12);  //myservo is set to pin 12
    myservo.write(180);  //and is placed at 180 degree 
 }
  
 void loop ()            //Start loop
 {             
   while (x<1) {
      if(analogRead(potPin) > 150)  //if potpin reads less than 150
      {
        myservo.write (25);         //move servo to position 25 degree
        delay (100);                //then pause for 10th of a second
      }//close if statement
      
     else{                         //if potpin reads greater than 150
        myservo.write (180);        //place servo at 180 degree
        delay(100);                 //pause for 10th of a second
      }//close else statement
      
  }//close while statement
  }//close loop



November 15th, 2013-

Nicholas Barceloni, Matt Peddle and RJ Lindsey discussed the project via email. Nicholas Barceloni made corrections to the code posted above. Matt Peddle bought a switch and a new servo motor and RJ  Lindsey worked on putting the circuits together to make the switch and servo motor interact. 

Nicholas, RJ and Matt all have individual assignments to be completed before the next meeting on Tuesday the 19th of November. 

Friday, November 8, 2013

Team-ThinkStation


November 8th, 2013- RJ Lindsey, Matt Peddle, and Nicolas Barceloni all met in the Perry computer lab at 09:00 AM  to discuss ideas for the group project and narrow it down to 2 final ideas.

A vote took place and the group decided on the "useless machine" idea. Research will be conducted by everyone in the group over the holiday weekend. More to follow on the week of Noveber 11th.