Tuesday, December 14, 2010

Final Manufacture

I was most involved in the final manufacture of the design as opposed to the electronics or fabrication of parts.  Alex took some great pictures of the step by step way we put each of the pieces together.  Here it is:
Battery Module
This is the MDF base that Alex routed for the battery module.

 This image shows how the lithium ion battery fits snuggly into the frame.  There is a PIR motion detector in the small rectangular compartment on the right.

 All electrical connections, circuit boards, and wires must be shoved into the base before the sandblasted acrylic can be bolted into place.  When all of the sensors were attached this was nearly impossible to close.  We tried to shorten some of the wires and screw extenders would be helpful.  It may also be possible to make the frame thicker or lose some of the sides so that there is a little more room for the wires.

Sensing Modules:
 These are the snapping mechanisms that we used to keep the suction cups on the modules.

 This is the base that is different from the battery module.  The suction cup is below the center.  There are acrylic holders for the servos on each of the three arms.


This shows the servos in place with the bobbins attached.  The bobbins are made of acrylic and have fishing line wound around them.

This is an image of the transmitting/receiving module all assembled.  The fishing line from the bobbins is tied through holes on the top of the face.  Holes were laser cut out of the acrylic for the fishing line to come through.  When the servo turns the bobbin either lets out or takes in some of the fishing line so that the top face will move according to the instructions that the servos are receiving.  Many of the faces have holes laser cut in them so that fiber optics could be threaded through to create interesting effects with the LEDs that were in the face.

Monday, December 6, 2010

Final Project: What Does It Do?

Wrote this almost a month ago but it never got published:

That is a good question.  Our design is such an open platform we couldn't decide.  We couldn't decide what sensors to use.  We couldn't decide what to make it do or how to react.  No one wanted to commit to any one thing.  This is why we decided to make our array of clusters very multifunctional...we decided not to decide, basically.  We will have clusters of 5 modules.  One will be the communicator and house the Arduinos and batteries and the other five will have different sensors detecting light, sound, distance, and motion.  At different times different sensors can be functioning or the strongest signal relative to another can determine the function.  What I would really like to see, though, is a hierarchy of sensors.  Maybe the light sensor realizes that it is day time, so the motion sensor starts working and once it senses motion the little creatures start wiggling around and then stop if someone gets close or makes noise and close up.

Final Project: Sensor Testing

To try and narrow down what we wanted our design to do we tested many different sensors.  Here are some of the codes from the ones that I tested:

PING Ultrasonic Range finder code modified from: http://www.arduino.cc/en/Tutorial/Ping

  

const int pingPin = 7;

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
}

void loop()
{
  // establish variables for duration of the ping,
  // and the distance result in inches and centimeters:
  long duration, inches, cm;

  // The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  // The same pin is used to read the signal from the PING))): a HIGH
  // pulse whose duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);

  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
 
  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();
 
  delay(100);
}

long microsecondsToInches(long microseconds)
{

  // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
  return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{
  // The speed of sound is 340 m/s or 29 microseconds per centimeter.
  // The ping travels out and back, so to find the distance of the
  // object we take half of the distance travelled.
  return microseconds / 29 / 2;
}


 The range finder works well and was put into our final project.


The following sound detector code simply turns an LED on when sound is detected:



int inputPin = 7;
int val = 0;
int ledPin = 13;
void setup() {
  pinMode(inputPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  val = digitalRead(inputPin);
  if (val == HIGH) {
    digitalWrite (ledPin, HIGH);
  } else {
    digitalWrite(ledPin, LOW);
  }
}

The sound detector works well for nearby percussive sounds, but does not pick up voices well.  It should work for footsteps on tile floors like the ones in the NCRC where it will be installed, so it will still be used in the final design.