Silent Sharktopus 5/20/14

PROJECT NAME: Gap-Assist

DESIGN TEAM:

Zainab, Peizhu, Avishek, Eugene, Carlos, Abraham, Mentor: Nelson

BLUEPRINT:

Image

PARTS LIST:

ImageImageImage

IMPLEMENTATION TUTORIAL:

Tutorial:

1. Gather Materials (Plexiglass; use carbon fiber if you wish to have a stronger and lighter prototype)

2. Cut the pieces to your desired measurements (2 pieces of 11.75” X 8” for platform, 8 pieces for scissor-lever)

3. 3D print or laser-cut the plexiglass into 4 pieces for the side pieces

4. Drill the holes for the joints on the scissor levers and the side pieces if not 3D printed with hole

5. Attach scissor levers with side pieces with shafts in place

6. Put the wheels and threads together on a metal piece

7. Attach the thread+wheels to one of the platform pieces

8. Attach Arduino with joystick on breadboard

9. Program the motors (Arduino UNO)

10. Attaching Linear Actuator to the base, then program it

CODE:

#include <Servo.h>
#define CW 0
#define CCW 1
#define MOTOR_B 1

const byte PWMB = 11; // PWM control (speed) for motor B
const byte DIRB = 13; // Direction control for motor B

 

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
Servo myservo2;
int sensorValue=0;

int bin;
int bout;
void setup() {
setupArdumoto(); // Set all pins as outputs
/////////////////////////////////////////
pinMode(6, INPUT);
pinMode(3, INPUT);
digitalWrite(3, HIGH);
digitalWrite(6, HIGH);
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo2.attach(10);
Serial.begin(9600);
myservo.write(0);
myservo2.write(0);
}

void loop() {
// read the value from the sensor:
sensorValue = analogRead(0);
bin = digitalRead(6);
bout = digitalRead(3);

if(bin == 0)
{
//Serial.println(“in”);
driveArdumoto(MOTOR_B, CCW, 255); // Set motor B to CCW at max
driveArdumoto(MOTOR_B, CW, 255); // Motor B at max speed.
// delay(1000); // Motor B will spin as set for 1 second

}
if(bout == 0)
{
driveArdumoto(MOTOR_B, CW, 255); // Set motor B to CW at half
driveArdumoto(MOTOR_B, CCW, 255); // Motor B at max speed.
//delay(1000); // Motor B will keep trucking for 1 second

//Serial.print(“out”);
}
if(bout == 1 && bin == 1)
{

stopArdumoto(MOTOR_B); // STOP motor B
// delay(1000); // Drive forward for a second
}
//Serial.print(sensorValue);
// Now spin
// Now go backwards at half that speed:

 

if(sensorValue < 508){
myservo.write(45);
myservo2.write(45);

}
else if(sensorValue == 508){
myservo.write(0);
myservo2.write(0);
}
else if(sensorValue > 508){
myservo.write(135);
myservo2.write(135);
}

}

void driveArdumoto(byte motor, byte dir, byte spd)
{
if (motor == MOTOR_B)
{
digitalWrite(DIRB, dir);
analogWrite(PWMB, spd);
}
}

void stopArdumoto(byte motor)
{
driveArdumoto(motor, 0, 0);
}

void setupArdumoto()
{
// All pins should be setup as outputs:
pinMode(PWMB, OUTPUT);
pinMode(DIRB, OUTPUT);

// Initialize all pins as low:
digitalWrite(PWMB, LOW);
digitalWrite(DIRB, LOW);
}

Future prototyping stages:

1. Split base for when the user wants to fold their chair

2. Add safety wheel to back of wheelchair

 

DEMO: <https://www.youtube.com/watch?v=-_jCnyq9V4w&gt;

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s