Tuesday, May 5, 2009

Meowzers Fan

My Friend Amy sent me the email below and it totally made my day! I am happy to hear that cats round the world are excited about Meowzers.

"So, I checked out your physical computing blog, stepped away to get a drink, and this is what happened..."

Thursday, April 30, 2009

The Final Presentation- Meowzers

Wow! I can't believe this project and semester is over. Time has seriously flown by and I am so proud of this final project. Here's the edited version of our field testing with Tigger set to music, Frankie Valli's & the Fours Seasons "Beggin'". A Warning to viewers: Tigger is FIERCE!


Here's the final video of Meowzers working, you’ll see us operating the device using a sketch that I wrote in Processing that features a cute cat cartoon cat that works as a “cursor” that directs the action of the two servos and triggers the laser pointer we embedded into the mouths of one of the four mouse heads that adorn the cat scratching post we modified. Moving the cat icon vertically activates the servo that controls the movement of a feather teaser, causing it to dip and rise to bait the cat to chase it. Moving the cat icon horizontally activates the servo that spins the crown of the scratching post, causing the mouse heads attached to the four posts emanating from the center post to shake in a wild fashion. Pressing the mouse on the computer triggers the laser pointer we embedded into one of the mouse heads.



Here’s the Processing Code:

import processing.serial.*;

Serial port; //Create object from Serial class.*;

PImage Cat1;
PImage Cat2;
void setup() {
imageMode(CENTER);
size (700,700);
Cat1 = loadImage(”Cat.jpg”);
Cat2 = loadImage (”Cat2.jpg”);
frameRate(30);
//Open the port that the board is connected to and use the same speed (9600bps)
port = new Serial(this, Serial.list()[0], 9600);
}

void draw() {
background (255);

//ellipse (mouseX, mouseY, 10,10);
//change color
float newmouseX = map (mouseX, 0, width, 0, 254);
float newmouseY = map (mouseY, 0, height, 0, 254);
port.write((byte)255); //start byte
port.write((byte)newmouseX);
port.write((byte)newmouseY);
if (mousePressed){
image(Cat2, mouseX, mouseY);
port.write((byte)4);
}
else {
image(Cat1, mouseX, mouseY);
port.write((byte)0);
}
}

And the Arduino code:

#include

Servo servoMotor1;
Servo servoMotor2;

int servo1 = 0; //Data received from the serial port
int servoPin1 = 9; //Set value servoPin to pin 9
int servo2 = 0; //Data received from the serial port
int servoPin2 = 10; //Set value servoPin to pin 9
int button = 0;
int buttonPin = 2;

void setup(){
servoMotor1.attach(servoPin1); //Sets pin as OUTPUT
servoMotor2.attach(servoPin2); //Sets pin as OUTPUT
pinMode(buttonPin, OUTPUT);
Serial.begin(9600); //Start serial communication at 9600bps
}

void loop()
{
if (Serial.available()>= 4){ //If 4 bytes are available to read,
int inByte = Serial.read ();
if (inByte == 255) {

servo1 = Serial.read(); //read serial and store it as val
servo1 = map(servo1, 0, 254, 179, 0);
servo2 = Serial.read(); //read serial and store it as val
servo2 = map(servo2, 0, 254, 179, 0);
button = Serial.read(); //read serial and store it as val

servoMotor1.write (servo1);
servoMotor2.write (servo2);
if (button == 4){
digitalWrite (buttonPin, HIGH);
}
else{
digitalWrite (buttonPin, LOW);
delay(25);
}
}
}
}

We consider this project to be a HUGE success, especially considering the little experience we had with programming prior to this class. We’re extremely grateful to all those who aided us, and our special thanks goes out to:

Jeremy Rotzstain, whose quick tutorial on Processing made our control device possible;

Adam Parrish, who helped us get our feet wet with Processing with his help session;

Todd Holoubek and Rory Nugent, whose suggestions on the P Comp side were invaluable;

Rob Faludi, whose last minute adjustment to our Arduino code literally calmed our jitters by solving the problem of our shaky servos;

Tigger Ryan, who did a wonderful job as our “test cat”;

our classmates, whose creativity, ambition, and brilliance inspired our efforts;

and finally, our teacher Scott Fitzgerald, who is one of the best teachers I've ever had and whose patience, knowledge, generosity, bad jokes and incisive feedback made this class so awesome.

I also have to give props to my PCOMP partner throughout the course, Gordie, whose woodworking/shop skills as well as understanding of electronics far surpass mine. He was great to work with, easygoing and up for any challenge and he always made the learning experience fun.

Monday, April 27, 2009

Meowzers...Make Cats Happy!








Here's a demo of our (almost) final project, Meowzers....Things are still a little shaky with the servos but we have an adorable, user friendly interface for cat owners to easily interact with their cat. Move Meowzers up/down and the Teazer Feather moves up/down, move Meowzers left and right on the screen and activate the spinning mice heads. Click on Meowzers and the lazer pointer activates. Hooray. Click below for a video demo by Gordie.

Sunday, April 26, 2009

Our Final Project....Meowzers!

Things are coming together at this point. We have both of the servos attached to the cat tree and our project is finally working. Here's a video of both servos working independently using a potentiometer. This project works for entertaining not only cats but everyone in the Pcomp lab!



Next we decided to user test the toy with my cat Tigger, apart from almost destroying Meowzers he had a great time playing with it:

We are now working on creating a user-friendly interface in processing so that lazy owners can access the meowzer remotely and bring hours of enjoyment to their cats!


Wednesday, April 15, 2009

Cat Entertainment Center...Final Project Week 2

Right now we're just working on the physical part of the project and this weekend we were able to get some of the elements of our cat amusement center to work.

We started on Saturday by heading over to Petland to buy a cat scratching post. We found a fashionable sky-blue model with mouse heads suspended from four rods situated around the top column of the post. Since the top column detaches from the bottom, we've decided to put a servo on the top column so it could rotate upon activation:



Next we decided to attach a servo to a dowel that we picked up from Home Depot. Our plan is to mount it to the top of the post and attach the feather toy with some string so the servo can mimic the action of pulling the line up and down to draw the cat ’s attention. Here’s the servo with the rod in action:



And finally we're thinking that we'd like to have a glowing LED ball that attracts the cat's attention while NOT electrocuting him/her. I made a protype of the glow ball and here's a video of it working here:

We’re still quite a ways from completion. We’re in the process of building a housing for the servos, and trying to figure out the triggering mechanism for the project. Sadly, it probably won’t be a web-based one, because after looking over the TweetMobile code, we both realized that we just don’t have enough programming experience to figure out how to adapt it for our purposes. Right now we’re looking into activating it through a radio transmitter/receiver set-up.

Wednesday, April 8, 2009

Final Project Observation

Thank you to Gordie for some amazing research on Evil Cat history, I had no ideas these little guys were so devious. Here is our proposal for the final project.

From the assassination of Archduke Franz Ferdinand, triggering the start of the First World War...
cat killing a duke

...to the katzen responsible for the carnage of the Second World War...
HItler Cat

...to the master criminals of today spreading their chaos throughout our society...
BatmanVsJoker

...cats have shown themselves to be the enemy of mankind.

Since idle paws are clearly the devil's workshop, we've decided to build a device that would allow cat owners to keep these devious creatures busy while they are away and their cats are home alone plotting other ways to bring ruin to mankind.

We observed one of these vicious creatures in his natural habitat...

...and since they appear to be distracted by simple movement, we intend to build a combination scratching post/cat amusement device.

The device will have a couple of motor driven arms that will dangle and swing a couple of cat toys to hopefully amuse the cat and keep it from hatching more evil schemes.

At the moment, the plan is to permit the owner to activate the device remotely using their Twitter account. The purpose of the cat play station is to help lonely kitties stave off boredom while their owners are away.

I hope this project helps busy cat owners everywhere.

Sunday, March 15, 2009

Final Project Demo





Ahhhh this project is finally over and we are successful! Here's the demo of the working "mouse pad"

Wednesday, March 11, 2009

OMG It's A Mouse Pad!


This week Gordie, Lina, and I completed our proposed P Comp project of hacking an old PC mouse to design a mouse footpad for the floor.

We met on Canal Street and went shopping for material to use for the footpad. After visiting some amazing plastics stores We went to a fabric store where we found a faux fur mikey mouse print fabric that was perfect for the project. We knew once we saw it that we had to go for this material. It inspired us to build the pad in the shape of a mouse’s head, with the face divided into quadrants holding the sensors controlling the left/right and up/down movement of the mouse, and the right and left ears serving as the right and left click buttons.

The other key was Lina’s decision to use relays to operate the click buttons on the mouse. We had discussed using transistors, but Lina was familiar with relays and they were a lot easier to wire up on the board.


The relays were the right call, as you can see here as we use them to simulate the right/left click action of the mouse.


The next challenge was to simulate the x- and y-axes movement of the cursor on the screen. We initially thought to pull the encoder wheels off the mouse and attach them directly to the axle of the motors, but that didn’t work all that well, as you can see here:



The problem was that the encoders really had to sit in their housing in order to properly activate the movement function of the two axes, but the size of the motors prevented us from allowing them to placed where they normally would be if we left them attached directly to the motor axles as seen in the video.

Eventually, we solved the problem with the motors by taking the parts from another mouse, putting its encoder wheels in the housing provided by the mouse, and then cutting the encoder wheels from the first mouse down and using them as gears to intersect with the now properly housed encoder wheels. Here's a video of us showing Mustafa how the motors work.


The left and right clicks were working, even after we transferred the sensors to the “mouse pad”. We also soddered all the wires to a perf board so that we could ensure all the components could stay in place on the mouse pad.

Here's a video of our prototype working all together. It was 2:30am and we were a little out of it but it was successful


The last challenge was to build the housing for the guts of the mouse to hold the motors. We built a makeshift “Stonehenge” that was not an aesthetic triumph, but it did work!




It was a grueling but fun really fun project but in the end it worked for our PCOMP class. Here's the demo of the final project. Many thanks to everyone who helped us with this mousepad. Special thanks goes to Lina’s husband Andres, Anaid, who provided us with so much help with parts and suggestions (particularly, schooling us on soddering the perf board), Todd, who was constantly around with great suggestions, Oscar, who help us solve the problem of powering the project, Rory, John Dimatos, and of course, Scott, our teacher, who gave generously of his time with extended office hours on Monday!

And now for an update on the project:

Since we had so much trouble getting the mousepad to work right before the presentation, Gordie took the liberty of building a new housing for it out of wood, which can be seen here:


Here's how he did it. "I drilled the top support with two sizes of drill bits (7/8" for the body of the motors; 5/8" for the head) to provide a tighter casing for the two motors, and secured them in their holes with rubber corks. I replaced the encoder wheel "gears", which were sliding up the shaft, with the gears that came with the kit, so they fit the shafts of each motor snugly. I secured the base of the mouse to one block of wood, and then cut up a dowel to form columns to support the top block which houses the motors. While the bottom of the columns are secured with wood screws to the base of the new housing, the top is for now unsecured, which allows us to lift it off to show the inner workings of the project. Thank you SO much for your hardwork Gordie!