Thursday, December 11, 2014

These videos show how our nutcracker works.

It generally works but has a few issues. First, our ramp is not steep enough so the walnuts have to be manually pushed down into the nutcracker. In addition, the weight is not heavy enough to crack the nut.

Below is our slide which is designed to feed the nuts into the nutcracker. It is a printed part.

Everyone was at our group meeting this week. The meeting lasted around 3 hours.

/*note: The servo tends to vibrate when at the
extreme positions of 0 and 180 degrees*/

#include<Wire.h>  //motor libraries
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

#include<Servo.h>  //servo library
Servo serv;  //defines "serv" object
Adafruit_MotorShield motor = Adafruit_MotorShield();  //defines motor object

int servpin=9;  //defines servo pin
int buttonpin=2; //defines button pin
Adafruit_DCMotor *myMotor = motor.getMotor(1);  //attaches motor to motor pins 1

int gate_seconds=5;  //defines the gate delay
int gate_mseconds=gate_seconds*1000;

int drop_seconds=2;  //defines the drop delay
int drop_mseconds=drop_seconds*1000;

int lift_seconds=4;  //defines the lift delay
int lift_mseconds=lift_seconds*1000;

void setup()
{
  motor.begin();
  
  serv.attach(servpin);  //attaches serv to servpin
  
 pinMode(buttonpin,INPUT_PULLUP);  //initializes button pin
}

void loop()
{
  
  myMotor->run(RELEASE);  //sets motor to initially be still
  serv.write(33);  //states the initial position of the servo
  
  int button=digitalRead(buttonpin);  //defines the button input variable
  
  if (button==LOW)
  {
  serv.write(160);  //opens the gate
  delay(gate_mseconds);  //holds the gate open
  serv.write(33);  //closes the gate
  
  myMotor->setSpeed(150);  //drops weight
  myMotor->run(FORWARD);
  delay(drop_mseconds);
  
  myMotor->setSpeed(150);  //lifts weight
  myMotor->run(BACKWARD);
  delay(lift_mseconds);  

  myMotor->run(RELEASE);    //holds weight stationary
  }
}

This is an updated code for our nutcracker. We needed to update our code because we needed to use a shield in order for our motor to work. The motor did not work because it requires 12 volts. We burnt out our arduinos and had to replace them by borrowing one from Daniel Sullivan. We also borrowed the shield from him.

We acquired a dumbbell and cut it into an appropriate shape for our nutcracker. We cut the dumbbell with a hacksaw. The dumbbell was too wide so we cut off one of the ends of the dumbbell and cut off a portion of the other end.

This video is a motion study 

Wednesday, December 3, 2014

In today's meeting all members were in attendance. Benjie spent many hours on building the device on his own time. Each member spent 2 hours at the meeting.

/*note: The servo tends to vibrate when at the
extreme positions of 0 and 180 degrees*/

#include<Servo.h>
Servo serv;  //defines "serv" object

int gate_seconds=5;  //defines the gate delay variable
int gate_mseconds=gate_seconds*1000;


int drop_seconds=2;  //defines the drop delay variable
int drop_mseconds=drop_seconds*1000;

int servpin=3;  //defines servo pin
int motormain=11;  //defines motor pins
int motor1=9;
int motor2=5;
int buttonpin=2; //defines button pin

void setup()
{
  serv.attach(servpin);  //attaches servo to servpin
  
 pinMode(buttonpin,INPUT_PULLUP);  //initializes button pin
 pinMode(motormain,OUTPUT);  //initializes motor pins
 pinMode(motor1,OUTPUT);
 pinMode(motor2,OUTPUT);
}

void loop()
{
  digitalWrite(motormain,LOW);  //holds the weight stationary
  digitalWrite(motor1,LOW);
  digitalWrite(motor2,LOW);
  serv.write(3);  //states the initial position of the servo
  
  int button=digitalRead(buttonpin);  //defines the button input variable
  if (button==LOW)
  {
  serv.write(176);  //opens the gate
  delay(gate_mseconds);  //holds the gate open
  serv.write(3);  //closes the gate
  
  digitalWrite(motormain,HIGH);  //drops the weight
  digitalWrite(motor1,HIGH);
  digitalWrite(motor2,LOW);
  delay(drop_mseconds);
  
  digitalWrite(motormain,HIGH);  //lifts the weight
  digitalWrite(motor1,LOW);
  digitalWrite(motor2,HIGH);
  delay(2*drop_mseconds);  

  digitalWrite(motormain,LOW);  //holds the weight stationary
  digitalWrite(motor1,LOW);
  digitalWrite(motor2,LOW);
  }
}

This is a incomplete draft of our code to run the servo and the motor. 
SIDE
 FRONT
 TOP

These are pictures of our nutcracker. The nutcracker has more parts that need to be attached. This is the overall structure of the nutcracker. These blue parts make up the structure of the nutcracker.
 This is a revised version of the base plate. The base plate was revised because the laser cutter could not cut part ways through the material.
 This is a revised version of the front bracket. The new version of the front bracket replaced the rear bracket in the old assembly, so now we are using 2 front brackets. The front bracket was revised to add the jigsaw effect to make it easier to assemble.
 This is the same motor part from the previous version.

 These two parts are a separate revised assembly for the servo. The revised version is a more detailed representation of our servo.
 This is a revised version of our side shield. The side shield was revised to fit the front brackets jigsaw effect to make it easier to assemble.
This is the same slide part from the previous version.

This is the full assembly of our nutcracker.

Wednesday, November 19, 2014

Everyone was in attendance to today's meeting.
We ordered a motor.
We made a CAD design of our project.
We ordered the parts for the laser cutting and 3D printing.






This part is meant to be laser cut and it acts as the base for the tower and it has groves in it so that the walls of the tower can fit and be stable.






These parts are meant to be laser cut and are the walls of the tower and they are going to support our motor, the motor is meant to lift a weight and drop it, so the tower also has to support the extra weight as well.






This part represents the motor and how it will fit into our structure.






This part is meant to be 3D printed and acts as a ramp that feeds the walnut into the device. We roughly measured the sizes of the walnuts which were inconsistently sized and the dimensions of the ramp seemed appropriate.




This part is the servo motor we have in our Arduino kit. This servo motor is meant to act as a blocker to prevent other walnuts from entering the crusher.




Monday, November 10, 2014

Today we went to the metrology lab and dropped our 1 lb weight on a walnut from 1 ft above the walnut. The walnut cracked from which we determined that 1 lb at 1 ft of height is sufficient to crack a walnut. With the guidance of our TA, we determined that 3-4 in*lb of torque is the desired output of our motor. We found a motor of that description on Amazon and requested it on the Google spreadsheet.

HOSSEN&reg; 12V 120RPM Powerful High Torque DC Gear Box Motor Replacement Motor
All three of our group members were in attendance at today's meeting.Each team member has devoted 1.5 hours to the project today.
Hi. It seems that we did not post everything that we were supposed to on the first post so here it goes.

Our team name is Project Awesome.

Our project is a nutcracker that will sense the presence of a nut and crack it for you.

Some Arduino projects that we found interesting include:

tapping shoes
http://www.instructables.com/id/Musical-MIDI-Shoes/

3d display
http://www.instructables.com/id/Led-Cube-8x8x8/

Monday, November 3, 2014

Today we prototyped the nutcracker and the clapper. We selected the nutcracker for our project because there is more to do for it. We also, remade our blog.

All three of our members, Duncan Allen, Benjie Roth and Randy Chea attended our meeting.

Each team member spent approximately 2 hours on the project.