Posts Tagged ‘ PCOMP ’

Max Sonar EZ1 critique

In the Sensor Workshop class, I was paired with Mark Breneman to find, update, edit, and critique a sensor report already posted in the ITP wiki as a guide for the ITP community. We chose the MaxSonar EZ-1 sensor form Maxbotix.

Most of the codes posted are based on PBASIC and must be translated to Arduino C since most of ITP uses the Arduino microntroller for our projects. Will edit the wiki further before Wednesday and add links to pictures and diagrams.

Advertisements

Motor Kits

Tamiya Motor kits

Over the winter break I was able to procure these at a hobby shop in the Bay Area. I’ve worked with Tamiya kits since I was in grade school and have found the quality of their kits reliable and efficient.

Upon coming back to New York for the Spring term I decided to assemble one of these kits.’

Tamiya Motor kits

So I’ve learned that motors are either really easy to use of a pain to live with. You either have too much power or not enough torque. Some solutions vary to either getting a bigger motor or something else completely different like a stepper motor.

The Tamiya 6-Speed Gearbox High efficiency is not like a gear box for a car which you can vary the step by moving the gears. In this kit you can move the gears but it would require the disassembly of the entire apparatus.

So let’s begin. In kit comes a variety og gears, a motor, casing, and various parts to interface the motor to a variety of projects.

Tamiya Motor kits

These particular Tamiya kits comes from the Philippines and Japan.

Tamiya Motor kits

The data sheet comes with steps in English and Japanese on how to assemble the kit to the desired ratios. I selected to assemble option E which turns the gears at 19.9 revolutions per minute.

I’ve assembled the motor and will post pictures soon and where I plan to use the motor.

PCOMP Final final project

After numerous revisions it’s finally finished.

physical computing

More or less. Working with small parts is very difficult especially with 30 gauge wire which is barely a thread and breaks easily which is one of the main problems I encountered with this project.

physical computing

The code is working great. But I may have crossed some wires that make the white array and yellow array stay on all the time. But the effect is there. I’m at a point where I don’t want to touch it anymore for fear that it may not work by noon today. I am honestly not satisfied with my work but the important part is I learned a lot with this project in terms of building and fabrication which I really need to work on.

Right now it’s all packed up in a box for transportation to the ITP floor. Thank you for a wonderful experience in Physical Computing.

physical computing

PCOMP Final final project

After numerous revisions it’s finally finished.

physical computing

More or less. Working with small parts is very difficult especially with 30 gauge wire which is barely a thread and breaks easily which is one of the main problems I encountered with this project.

physical computing

The code is working great. But I may have crossed some wires that make the white array and yellow array stay on all the time. But the effect is there. I’m at a point where I don’t want to touch it anymore for fear that it may not work by noon today. I am honestly not satisfied with my work but the important part is I learned a lot with this project in terms of building and fabrication which I really need to work on.

Right now it’s all packed up in a box for transportation to the ITP floor. Thank you for a wonderful experience in Physical Computing.

physical computing

Transistor Lab

Very last minute, I’ve gotten to the transistor lab while stuck working on my final project.

physical computing

PCOMP Finals update

Dropped Processing. Dropped Temp sensor. Long live the Ultrasonic sensor.

I gave in and picked up the ultrasonic sensor. A quick jab at the library and pasted the same values I had for the temp and got it working.

PCOMP UPDATE

I initially used a central ground to reduce the cabling and copper tape to for the wiring. This was a mess. I switched to a thinner wire which meant re-soldering everything.

PCOMP UPDATE

Disaster strikes! A part of my arcylic falls off. Crazy glue to the rescue.

The good thing is that it works. Sort of.

PCOMP UPDATE

Still a way to go but a lot closer now.

PCOMP UPDATE

PCOMP UPDATE

Pampanga Lantern Weekend update

I decided not to fly out for Thanksgiving and instead work on my Physical Computing final project. I initially started out Thanksgiving by going through the Muppet Show episodes and getting the Open CV code to work.

My classmate Adria Navarro-Lopez suggested to use the OpenCV library instead of the Open Kinect to make things easier but sadly it was not. I got help from Lisa Park on installing the library and went to work. I got the OpenCV library to detect faces using the example of detecting faces and went through the code and send it out to the arduino via serial.

Processing code for face detection for some reason it only works on Processing 2.0a1 and not 2.0a4:

import processing.serial.;
import hypermedia.video.
;
import java.awt.Rectangle;

Serial myPort;
OpenCV opencv;

// contrast/brightness values
int contrastvalue    = 0;
int brightness
value  = 0;
String facesFound [];

void setup() {
  size(320, 240);
  println(Serial.list());
  //  String portName = Serial.list()[0];
  myPort = new Serial(this, Serial.list()[0], 9600);
  opencv = new OpenCV(this);
  opencv.capture(width, height);
  opencv.cascade( OpenCV.CASCADEFRONTALFACEALT );
}

public void stop() {
  opencv.stop();
  super.stop();
}

void draw() {

  // grab a new frame
  // and convert to gray
  opencv.read();
  opencv.convert( GRAY );
  opencv.contrast( contrastvalue );
  opencv.brightness( brightness
value );

  // proceed detection
  Rectangle[] faces = opencv.detect( 1.2, 2, OpenCV.HAARDOCANNY_PRUNING, 40, 40 );

  // display the image
  image( opencv.image(), 0, 0 );

  // draw face area(s)
  noFill();
  stroke(255, 0, 0);

  for ( int i=0; i<faces.length; i++ ) {
    rect( faces[i].x, faces[i].y, faces[i].width, faces[i].height );
  }
  //count number of faces and send to arduino
  println(faces.length);
  //facesFound=faces.length;
  // myPort.write(facesFound);
  myPort.write(faces.length);
}

/*
 
Changes contrast/brigthness values
 */
void mouseDragged() {
  contrastvalue   = (int) map( mouseX, 0, width, -128, 128 );
  brightness
value = (int) map( mouseY, 0, width, -128, 128 );
}

The main problem I encountered was stabilizing the response of the arduino, The LED would flicker in response and not exactly the way I wanted. But the code was running the way I wanted it. It was the same problem my media controller group had encounted with the blue LED.

Arduino code for receiving:

//arduino code for lantern
//Melissa dela Merced mdm532@nyu.edu

const int bluePin=11;
const int greenPin=10;
const int whitePin=9;
const int yellowPin= 6;
const int redPin= 5;

int value = 0;

void setup(){
  Serial.begin(9600);

  pinMode(redPin, OUTPUT); //red LED
  pinMode(yellowPin, OUTPUT); //yellow LED
  pinMode(whitePin,OUTPUT); // white LED
  pinMode(bluePin,OUTPUT); // blue LED
  pinMode(greenPin,OUTPUT);//green LED
}
void loop(){
 // if (Serial.available){
    int input = Serial.read();
  if (input == 0);
  {
    digitalWrite(bluePin, LOW);
    digitalWrite(redPin, LOW);
    digitalWrite(yellowPin, LOW);
    digitalWrite(whitePin, LOW);
    digitalWrite(greenPin,LOW);
  }

  if (input ==1){
    digitalWrite(bluePin, HIGH);
    /   Serial.write(input);
     for(value=0; value <=255; value++){
     analogWrite(bluePin, value);
     delay(10);
     }
/
  }
  /* else{
   digitalWrite(bluePin, LOW);
   digitalWrite(redPin, LOW);
   digitalWrite(yellowPin, LOW);
   digitalWrite(whitePin, LOW);
   digitalWrite(greenPin,LOW);
  
   }/
  if (input ==2){
    digitalWrite(bluePin,HIGH);
    digitalWrite(whitePin,HIGH);
  }
  /
else {
   digitalWrite(redPin, LOW);
   digitalWrite(yellowPin, LOW);
   digitalWrite(whitePin, LOW);
   }*/
}
void establishContact() {
  while (Serial.available() <= 0) {
    Serial.println(“hello”);   // send a starting message
    delay(300);
  }
}

I’ll still work on this code next week. I probably just need a capacitor or something on the LEDs to smooth out the signals.

I took advantage of the O’Reilly book sales, I picked up a number of books, namely Making things Talk by NYU Professor Tom Igoe, Arduino Cookbook and the Making Arduino Bots and Gadgets. In between coding, I would either finish drilling the LED holes in my template and reading the three books. Insert the Steve Jobs bio by Walter Issacson for a little inspiration.

I even went through learning using the matrix if that would help.

pcompLED

I went through figuring the resistor array that I would have to build and found this great web site to even design the array for you.

 

But that didn’t help. So right before the Stanford-Notre Dame game on Saturday night, I went for the temp sensor. Using the temp sensor was stable and works like a charm. But the weather has been great today so the LED remains at the great weather reading.

In this scenario I’m using a RHT03 Humidity and Temperature Sensor from Sparkfun . The RHT03 is similar to the DHT22 sensor so I installed the library made by github user nethoncho and it releases the temperature in celcius.

More to come.

pcompLED