Recent Changes - Search:

Main
Intro to PComp Home
Weekly Topics & Assignments
Wednesday Class Dates

Links:

Final Projects


Midterm Projects

PmWiki

edit SideBar

Group6

Group Members
Marc
Nick Hasty
Kyveli Vezani
Bryan Wall


Proposal
For our midterm project, we have come up with a unique way to remind someone that they may be leaving their apartment without their keys. The idea is that there will be a motion detector of some sort located near the exit of the apartment. This could also just be a sensor attached to the door or the doorknob. If the user crosses this field (or opens the door) and does not have their keys on them, a small signal (either light, sound, or a combination of both) will go off to let them know. The plan is for the signal to be small enough that it will not be a nuisance, but distinctive enough that the user will notice it when it goes off.

Week 1: Observation
We will observe people exiting their apartment buildings, hopefully without being noticed. We will post our findings on our personal pages.


Week 2: Prototyping
We've have a basic plan set up for our ciruit, we'll come up with a complete schematic within the next few days. We purchased a a magnetic door switch to turn the system on when the door is opened, but we'll have to wait a few days for our RF transponder and reader. We're going to use low frequency RFID for the proximity detection of the keychain. The parts we're currently looking at buying are both from Texas Instruments: The Keyring Tag and the Micro Reader


Demonstration of the magnet switch
switch off


switch on

click here to see the magnet switch in action!

Week 3: More Prototyping
We're having a lot more trouble than we anticipated getting the RFID reader to function correctly. As it turns out, RS232 sends and receives in 12v pulses, and the RFID reader sends and receives 5v pulses. This means we need a MAX232 chip to have them communicate. It's also unfortunate that we're going to need to use a computer at all for our project, but there doesn't appear to be any other way to process the signal at the moment.


After several days spent in frustration and almost losing our minds, we have a reasonably functional prototype now completed. We could not get our Texas Instruments RFID reader to function correctly, no matter how hard we tried, but we did manage to get a nicely working prototype completed using the Parallax RFID reader. It is not entirely realistic, as the Parallax reader has a much smaller range (2"-3"), but it is at least working. Everything is hooked up, including our door switch, so the concept is clear.


Demonstration of our prototype
Door closed: LED is off


Door open, no key present: LED turns on


Door open, key present: LED turns off


Arduino code
int rfidIn = 0; int doorIn = 5; int speaker = 9;

void setup() {

  Serial.begin( 9600 );

//pinMode(rfidIn, INPUT);

  pinMode(doorIn, INPUT);
  pinMode(speaker, OUTPUT);

}

void loop() {

  Serial.print(analogRead(doorIn));
  Serial.print(", ");

Serial.println(analogRead(rfidIn));

  if((analogRead(doorIn) < 1) && (analogRead(rfidIn)  == 0))
  {
    digitalWrite(speaker, HIGH);

  }
  else digitalWrite(speaker, LOW);

}


Week 4
Much progress has been made!
We switched back to the TI rfid reader (after having discovered that our own was just defective or damaged, and that this borrowed one works fine).

latest Arduino code
int rfidIn = 0; int doorIn = 5; int speaker = 9;

int interval = 2000; long lastTime = 0;

int tag = 0; int maxtag = 0; int maxdoorvolt = 1023; void setup() {

  Serial.begin( 9600 );

  //pinMode(rfidIn, INPUT);

  pinMode(doorIn, INPUT);
  pinMode(speaker, OUTPUT);

}

void loop() {

  Serial.println(analogRead(rfidIn));
  Serial.print("door: ");
  Serial.println(analogRead(doorIn));
  Serial.println(millis());
  Serial.println(lastTime);
  if((maxdoorvolt - analogRead(doorIn)) >900){
    lastTime = millis();
  }

  if(analogRead(doorIn) < 50){
    maxdoorvolt = 0;
    tag = analogRead(rfidIn);
    if (tag > maxtag){
      maxtag = tag;
    }
    if(maxtag > 400){
      analogWrite(speaker,0); 
    }
    else if (millis() - lastTime > interval)
    {
      lastTime = millis(); 
      analogWrite(speaker,500);
    }
  }
  else {
    maxtag = 0;
    maxdoorvolt = 1023;
    analogWrite(speaker,0);      
  }

}
In our prototype, the alarm goes off 2 seconds after the door has been opened, if the keytag has not been detected. When the keytag is detected or when the door is closed (whichever comes first), the alarm stops.
click here to see the prototype demo!

Group Resources

Edit - History - Print - Recent Changes - Search
Page last modified on October 24, 2006, at 02:37 PM