Jerome Williams

 

Project 6

This assignment was creating an architectural setting and implying the robotics to show an understanding of the entire courrse and where it has lead us. Our assignment was creating a window that reponses to sunlight, and then on a grant scale a building with these windows that reponds to sunlight to make a dynamic facade that is always changing.

Code:

int photopowerPin = 2;                  // power to the PHOTOCELL
int photoRead = 3;                      // signal from the PHOTOCELL

int enablePin = 13;                     // H-BRIDGE enable pin
int bridge1Pin = 12;                    // pin for 1A INPUT to H-BRIDGE
int bridge2Pin = 7;                     // pin for 2A INPUT to H-BRIDGE

int curr = 0;                           // PHOTOCELL state in CURRENT loop starting as 'not lit'
int prev = 0;                           // PHOTOCELL state in LAST loop (prev)


void setup() {
  pinMode(photoRead, INPUT);            // declare 1ST PHOTOCELL PIN as INPUT
  pinMode(photopowerPin, OUTPUT);       // declare 2ND PHOTOCELL PIN as OUTPUT
  pinMode(enablePin, OUTPUT);           // declare H-BRIDGE ENABLE PIN as OUTPUT
  pinMode(bridge1Pin, OUTPUT);          // declare 1A INPUT PIN as OUTPUT
  pinMode(bridge2Pin, OUTPUT);          // declare 2A INPUT PIN as OUTPUT
  Serial.begin(9600);                   // enable SERIAL COMMUNICATION
  Serial.println("t\Ready");            // print that the program is ready
}

void loop() {
  digitalWrite(photopowerPin, HIGH);    // give POWER to 1ST PHOTOCELL PIN
  prev = curr;                          // give 'prev' the last value of 'curr'
  curr = digitalRead(photoRead);        // give 'curr' the current value of the PHOTOCELL

  if (curr == 1 && prev == 1) {                      // if the PHOTOCELL is 'lit'
    digitalWrite(enablePin, LOW);      // "turn on" the H-BRIDGE to change inputs
    digitalWrite(bridge1Pin, LOW);
    digitalWrite(bridge2Pin, LOW);
    delay(10000);                         // how long will the MOTOR be ON in one direction
    Serial.println("still UP");        // print current action of the MOTORS
  }

	 else if (curr == 0 && prev == 0) {          
    digitalWrite(enablePin, LOW);     
    digitalWrite(bridge1Pin, LOW);
    digitalWrite(bridge2Pin, LOW);
    delay(10000);                        
    Serial.println("still DOWN");       
  }
	 else if (curr == 1 && prev == 0) {                     
    digitalWrite(enablePin, HIGH);     
    digitalWrite(bridge1Pin, HIGH);
    digitalWrite(bridge2Pin, LOW);
    delay(10000);                       
    Serial.println("moved UP");       
  }

  else if (curr == 0&& prev == 1) {
    digitalWrite(enablePin, HIGH);      
    digitalWrite(bridge1Pin, LOW);
    digitalWrite(bridge2Pin, HIGH);
    delay(10000);                         
    Serial.println("moved DOWN");      
  }
}

 

Ways to make better:

1. Move spindel directly in front of track so that motors do not get stuck or fall off

2. Instead of relying on time for the "window" to open, use another switch (IR) to let the arduino know when to stop the motors

 

Project 5

The assignment for this project was to create a mechanism that would allow a crit panel to be responsive. Some form of wheel bearing that would propel the panel using two motors from car seats. To complete this assignment we designed a simple connection using allan wrenches , washers and a wheel that were welded and epoxyed together. The entire mechanism was then cable tied to the board in a way that would allow it to move the board. To make the panel responsive we added and ir sensor and coding for this so that when the panel got to close to a wall it would stop and go the other direction. This however was not fully affective because the control board was not strong enough to make the motors change direction. So therefor the panel would move and when it got to close to a wall it would stop. The main problem we ran into for this project was trying to mount the wheel onto the panel in a strong way without damaging the panel. The more strength in how the wheel in mounted the more traction that the wheel would get and the more movement that would eventually occur. The best solution that we found was to cable tie the wheel mechanism onto the bottom board bracket in multiple places so that the wheel would become secure. This was an ok solution and the mechanism might be more secure and gain more traction if it was mounted with some sort of bracket. So to improve this project i would research some sort of bracket to use to mount on the wheel mechanism.

Code:

 

this is a view of what the mechanism made from the washers and allan wrench that is welded together and epoxyed to the wheel would look like and how it would be assembled. This first picture is a view of how the entire wheel mechanism would attach to the panel using a system of wood brackets and cable ties to allow for the maximum secure attachment.

above and below are images of the circuit and how the arduino would connect with the control board and the bread board. The bottom image on the left shows how the ir sensor is wired to the ardiuno and the bread board and the bottom right image shows how the control board conects to the motors and the control board as well.

 

 

 

 

Project 4

The project required to simply make something move in an elegant way. After a few initial ideas, which were making a leg stand up or battling robots, we ended up designing a gum ball machine. It might be as simple as it sounds. We decided to incorporate a couple of mechanical elements into the project. Including an Archimedes screw, a conveyer belt.

Materials:

Two large rubber bands

Gum Balls

A DC motor

Push Button

Solenoid

Sticks of varies sizes

Thin plastic strips

Wood for making the apparatus

 

Instructions:

  1. Pushing the pin so the solenoid releases a gumball and falls into the Archimedes screw
  2. The Archimedes screw will bring the gum ball to the conveyor belt powered by the rubber belt that is strapped to the main axle of the screw
  3. The conveyor belt will bring the gum ball to the top of the ramp
  4. The gum ball will travel down the ramp and stopped by the solenoid before starting all over again.

 

 

Ways to Improve

Each of the components works perfectly by itself. But when we connect all the mechanisms together there are just too much friction for the small DC motor to power them all together. They tend to become stuck at times, and then we would have to use our hands to give an assisted start again.

 

Craft really matters when building these mechanics part, because a slightest inaccuracy could cause the entire system to fail.

 

The solenoid should be installed in reverse so that when it is “on” a ball releases, which would solve the problem of leaving solenoid on for a long time to become over heated.

 

Project 3

Lock (Countdown Bomb)

 

Group Members:

JEROME WILLIAMS

DANIEL ZHANG

PATRICK RUSSELL

 

This project required a lot more knowledge of code than the first two projects. In this project, we were required to take a state code and use it to create a more complex "lock". A state code is one in which works just like a lock, it has three states (each having a special input) within the sequence to get to the "open state". If the wrong sequence is entered it restarts the complete sequence over so it has to be completely re-entered. My group created "a detonating bomb" with three wires disconnected from power to put in the correct code to stop it ( the 10 sec timer which runs at the same time, it does not explode). It has two ended situations, one: correct sequence is entered and timer is stopped, or two: timer reaches 0 before correct sequence is entered which stops all reachings for the sequence.

 

CODE:

CLICK HERE FOR CODE

CIRCUITS:

 

WAYS TO IMPROVE:

Make switches less sensitive ( you have to connect and disconnect switch quickly)

Longer timer ( another LED counter to count from a two digit number, only the code would be at least twice as long)

Make it explode (just kidding, but have a better reaction when timer gets to 0)

 

 

 

 

 

Project 2

Music Device (Amplifier)

 

Group Members:

JEROME WILLIAMS

DANIEL ZHANG

PATRICK RUSSELL

 

 

This project takes the thought of a device that creates sounds, notes, and/or music. The project creates a music by using the potentiometers(small green box) to change the pitch, volume, and other aspects of music and amplifies the sounds through the speaker.[ Note: The power it took for this project harmed our Arduino board, I suggest for recreating this project to power the potentiometers using a separate battery system, not through the Arduino]

 

Code:

int servopin = 6;

int servopin = 7;

int minPulse = 500;

int pulse = 0;

 

int lastPulse = 0;

int refreshTime = 20;

 

int analogValue = 0;

int analogPin = 4;

 

void setup()

{

pinMode(analogPin, INPUT);

pinMode(servoPin, OUTPUT);

pinMode(servoPin2, OUTPUT);

pulse = minPulse;

Serial.begin(9600);

}

 

void loop()

{

analogValue = analogRead(analogPin);

Serial.print("Raw Pot value: ");

Serial.println(analogValue);

pulse = (analogValue/30) * 10;

Serial.print("Pot to Pulse: ");

Serial.println(pulse);

Serial.println("***");

 

if (millis() - lastPulse >= refreshTime) {

digitalWrite(servoPin, HIGH);

delayMicroseconds(pulse);

digitalWrite(servoPin, LOW);

lastPulse = millis();

 

if (millis() - lastPulse >= refreshTime) {

digitalWrite(servoPin2, HIGH);

delayMicroseconds(pulse);

digitalWrite(servoPin2, LOW);

lastPulse = millis();

}

 

CIRCUITS:

Part 1: IR Sensor (power) to 9v, IR Sensor (GND) to GND, IR Sensor (Signal) to Analog 4

Part 2: Potentiometer 1 (power) to 9v, Potentiometer 1 (GND) to GND, Potentiometer 1 (Signal) to Digital 6

Part 3: Potentiometer 2 (power) to 9v, Potentiometer 2 (GND) to GND, Potentiometer 2 (Signal) to Digital 7

 

Ways to Improve:

Separate battery for main power supply

Overall creating our own sounds (Not using the other potentiometers-small green box)

 

 

 

 

 

Project 1

Interactive Space (Museum Alarm)

 

Group Members:

ARTHUR AZOULAI

JEROME WILLIAMS

MIKE SILVERSTEIN

PATRICK DONG JO KIM

 

 

This first project takes the thought of an interactive space and demonstrates it in a real-life situation. The project creates a small security alarm for a building (museum), that reacts when the important artwork (small box in the middle) is removed from its stand it causes the alarm to act in the form of a door enclosing the area, an alarming speaker system, and flashing lights.

 

 

The code for this project is amazingly simple.

Code:

Int Alarm = 1;

void setup()

{

pinMode(Alarm, OUTPUT);

}

digitalWrite(Alarm, HIGH);

delay(250);

digitalWrite(Alarm, LOW);

delay(250);

}

 

CIRCUITS:

Part 1: Solenoid positive to 5v(Arduino), Solenoid negative to C15(Bread Board),

Part 2: Mercury Switch positive to E15(Bread Board), Mercury Switch negative to GND(Arduino)

Part 3: Speaker positive to F11(Bread Board), Speaker negative to E12(Bread Board)

Part 4: LED1 positive to C12, LED1 negative to LED2 positive, LED2 negative to D15(Bread Board)

Part 5: Arduino 1 to J11(Bread Board)

 

Ways to Improve:

Working on a larger scale

Door that allows itself to be reset (motor maybe)

Different switch so that once artwork leaves stand it immediately sounds alarm