FINAL PROJECT: OMNI

 

OMNI tries to answer the following question:

 

What if we could bring the vision of the ultimate interactive apartment to the conventional homes of today?

 

The answer is ÒyesÓ, if we could design a device that was so cheap and simple that it could, not only bring that experience, but also make it scalable to thousands, millions of homes.

 

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:OMNI.png

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:Bed.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:Office.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:CoffeeTable.jpg

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:Kitchen.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:Skype.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Pics_Demo:TVcontroller.jpg

 

 

This is how it all started: http://fab.cba.mit.edu/classes/863.13/people/Hasier/Week1.html

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week1:Week1_files:image007.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.49.02.png

 

And this is how it evolved, subsystem by susbsystem:

 

Inspiration

 

I was inspired by slot car technology, that is both simple and cheap. I bought an analog scalextric start track ($150) to understand better how the system works. I decided to keep the standard track for my project (with the 15V power supply) and focus on the carriage system. Even the car chassis had to be redesigned because slot cars can only go in one direction, and of course, they are not thought to accommodate a pan/tilt moving head either. At least, I salvaged the drive wheels, gears and motors to use in my system.

 

Description: Macintosh HD:Users:hasierlarrea:Desktop:Captura de pantalla 2013-12-17 a la(s) 00.05.11.png

 

Even though I was keeping the track, I decided to cut it in half, in order to make it more aesthetically pleasing. I used the vertical saw for that.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Track.jpg

 

Carriage = 3D design + 3D printing

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.49.53.png

 

First iterations were based on using the caliper and making sense of the key dimensions. I used the Makerbot for quick iterations (orange and blue in the photos) and the Dimension for the last version (white). I used solidworks for the 3D design.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:3D4.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:3D5.jpg

 

Some technical problems with the makerbot (at least I got to learn the innards of the machine):

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:3D2.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:3D3.jpg

 

I mounted in the chassis the parts I salvaged from the original car:

-       Wheels

-       Drivetrain

-       Guidance connector. I used two (the two that come with the two slot cars in the set), so that the car could go in both directions

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:3D6.jpg

 

As it can be seen in the picture, I«m using standard Neodymium magnets to fake gravity.

 

 

Pan/Tilt Bracket = 2D design  + Waterjet + Bending

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.51.22.png

 

For the pan/tilt bracket I was inspired by an old pan/tilt bracket I found in my lab space.

 

Process:

 

-       2D design in solidworks

-       Cutting in the waterjet

-       Bending

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:2D2.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:2D3.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:2D4.jpg

 

 

Hasiduino = Electronics Design + Fabrication

 

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.52.59.png

 

The electronics has been an ongoing project during the whole semester. Check:

http://fab.cba.mit.edu/classes/863.13/people/Hasier/Week11.html

http://fab.cba.mit.edu/classes/863.13/people/Hasier/Week12.html

 

The summary:

 

The design is based on Neil«s fabduino, but I added the h bridge, dc motor connector, servo connectors, regulator and headers for the pins. I«m getting decent with eagle and I managed to create a pretty small board.

 

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week12:4.jpg

 

My debugging skills are also improving: check the h bridge bottom pad touching one of the pins and shorting one of the control pins to ground.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Electronics1.jpg

 

DC motor + Servos = Output Devices

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.55.44.png

 

The DC motor came with the original car and the servos are from Spakfun: https://www.sparkfun.com/products/9065

 

 

The Hasiduino controls both the DC motor and the two servos (I«m attaching the code to see how they are controlled at the end). I mounted them to the chassis. Time constraints led me to use Velcro tape (probably too much), which I call Òmagic tapeÓ. You can use it for Òalmost Òanything.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests3.jpg

 

I had to make some adjustments to the connectors of the hasiduino, so that the pan/tilt bracket would not hit it. Quick hack using ftdi pins.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests4.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests5.jpg

 

Mounting motors. I used a lego block as a hack to adjust to the chassis width.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests6.jpg

 

 

Input devices = RFID reader / Reed Switch

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.56.33.png

 

 

https://www.sparkfun.com/products/11827

I bought an rfid for  specifying the location of the car. Unfortunately, even though I had the rfid reader working, the car was too fast to recognize the tags when moving.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Input1.jpg

 

So, due to time constraints I decided to use some Reed switches temporarily to stop the car in specific locations:

https://www.sparkfun.com/products/8642

 

They seem faster than the rfid. I had to adjust the code though (attached at the end), as sometimes the car was still too fast to see it and go to the subroutine that stops the motor.

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Input2.jpg

 

This is something I would like to rethink for the next version, as it is extremely important to have a good location system for the application.

 

Communications = Bluetooth Terminal

 

 

Description: Macintosh HD:Users:hasierlarrea:Documents:OMNI:Captura de pantalla 2013-12-03 a la(s) 21.54.07.png

 

I found a Sparkfun Bluetooth terminal that was extremely easy to interface using the arduino serial.

https://www.sparkfun.com/products/10269

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests2.jpg

 

 

More details in week 12:

http://fab.cba.mit.edu/classes/863.13/people/Hasier/Week12.html

 

Integration

 

Adding all subsystems

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests7.jpg

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests8.jpg

 

Trying to minimize consequences of possible accidents under the table (car falling from track):

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Tests1.jpg

 

Accidents

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Accidents1.jpgDescription: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Accidents3.jpg

 

Fatal accidents (the worst so far):

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Accidents4.jpg

 

Testing new system after fatal crash:

 

Description: Macintosh HD:Users:hasierlarrea:Documents:MAS_FALL:HTMAA:Week14:Captura de pantalla 2013-12-17 a la(s) 00.53.42.png

 

Final tests before open house:

http://www.youtube.com/watch?v=P7liMzWv3YE

 

I had a very few accidents so far, but when there is one it is a tragedy, as this ÒtoyÓ falls from 3 meters high.

 

Code

 

Using Arduin:o

 

#include <Servo.h>

int servo = 5;

int servo2=6;  

//#define rxPin 1

//#define txPin 0

 

 

// Pins for H-bridge

 

int h1 = 9;

int h2 = 10;

 

Servo ser;

Servo ser2;

 

int magnet1=8;

int magnet2=7;

int led=13;

int magnet1enable;

int magnet2enable;

 

void setup() {               

  Serial.begin(115200);  // Start bluetooth serial at 9600

 

  ser.attach(servo);

  ser2.attach(servo2);

  // initialize the digital pin as an output.

 

  pinMode(magnet1, INPUT);

  digitalWrite(magnet1, HIGH);

  pinMode(magnet2, INPUT);

  digitalWrite(magnet2, HIGH);

  pinMode(led,OUTPUT);

  digitalWrite(led, LOW);

  magnet1enable=0;

  magnet2enable=0;    

  pinMode(h1, OUTPUT);

  pinMode(h2, OUTPUT);

  Serial.println("Enter -1 to move the car backwards, 1 to move the car forwards, 0 to stop it");

 

}

 

// the loop routine runs over and over again forever:

void loop() {

  

  if (Serial.available() > 0) {

    int input = Serial.parseInt();

    if (input == 0) { // stop

      stop();

    } else if (input == 1) { // forwards

    

      setDir(true);

      delay(1000);

     

      while(digitalRead(magnet1)==HIGH){

      }

     

      stop();

      digitalWrite(led, HIGH);

      delay(500);

      digitalWrite(led, LOW);

     

      ser.write(160);

      delay(500);

      ser2.write(110);

     

    }

   

    else if (input == 2){

    ser.write(130);

    }

    else if (input == 3){

    ser.write(160);

    }

    else if (input == 4){

    ser2.write(170);

    }

    else if (input == 5){

    ser2.write(100);

    }

    else if (input == 6){

    ser2.write(50);

    }

    else if (input == 7){

    setDir(true);

    delay (1000);

    stop();

    }

    else if (input == 8){

    setDir(false);

    delay (1000);

    stop();

    }

     else{

        

      setDir(false);

      delay(1000);

     

      while(digitalRead(magnet2)==HIGH){

      }

     

      stop();

      digitalWrite(led, HIGH);

      delay(500);

      digitalWrite(led, LOW);

     

      ser.write(120);

      delay(500);

      ser2.write(170);     

    }

  }

}

 

// Sets the motor direction to be forward if forward is true,

// backwards otherwise

void setDir(boolean forward) {

  digitalWrite(h1, !forward);

  digitalWrite(h2, forward);

}

 

void stop(){

  digitalWrite(h1, true);

  digitalWrite(h2, true);

}