Door RFID Reader

From HackPittsburgh Wiki
Jump to navigation Jump to search

Deprecated Message

The following information is regarding the previous door RFID system and is deprecated.

Resume Old Information

If you're having issues with the system, check Door Troubleshooting

Project Status

Steps to be done, many can be done in parallel.

  • Weather proof case for reader card - Gabe/Sarita
  • Work out power and mount for reader. - Sarita - DONE
  • Work out power and mount for Arduino controller card - Sarita - DONE
  • Find the existing code for the Arduino board - Doug -DONE
  • Find the existing code for the wireless router - Friar's code is AWOL, we're putting this on hold for now.
  • Establish wiring situation and harden the board (find a case for the arduino and ancillary control circuitry) - DONE
  • Inside testing of new case to make sure that its functioning (one or two weeks in January of having members swipe cards)
  • Update the list of RFID card numbers
  • Issue cards to members without them
    • Cards ordered and arrived. - Doug
      • Cards already dispersed were to folks mostly no longer members are were unretrievable.
  • INSTALL!
  • Get Combo locks for the outer grate/door - Decided to go with locks where we can change the core - DONE

Software

Git repo: https://github.com/stevenjowens/erras

Arduino Code

The arduino hardware is connected to the parallax RFID reader via a software serial port. The reader sends a 10 byte string consisting of a start byte, eight ascii digits (the card number), and an end byte. We have seen that as a card is brought near the reader, several invalid reads may occur. In order to validate a proper read, you must satisfy the following conditions:

  • Begin with start byte 0x0A
  • Have 10 data bytes, in ASCII from [ '0' - '9', 'A' - 'F' ]
  • And end with byte 0x0D

If any part of this validation fails, you must skip and wait to you read the next valid start byte.

We also found out that you may read multiple valid cards in a row, for this you must latch on to a valid card and continue to read the buffer clear. Good card reads shall be notified by toggling the status light green for the duration of the opening of the latch.

Bad card IDs, NOT BAD READS, shall be notified by a toggling status led. Note that a bad card read does not as a bad card ID.

As far as storage goes, we can start by encoding these numbers in a header file that will store the data in program memory. Each number will require 5 bytes, each character in the 10 byte message consumes a knibble. Each card registered to the system will require 5 bytes of program memory.

Card Database

We should develop a card database entrusted to the council to manage card IDs and track who they are assigned to. This can be tied to the member database to include locking out of cards. Either if they are lost, or the council determines access must be removed.

The database must need a way to update the door access list. For now, the plan is to have a static list loaded into the code for the arduino. Codes can be stored into a separate include file. This include file can be generated automatically from the database.

Future integration may allow the management database direct access to the door, although this presents further complications including loss of power.

Ideas

  • Loss of power? Obviously we can use a spare key in the lock box. Could we build in a battery backup?
  • Install hall effect sensor to test when to re-lock latch. Can also use this for security tracking if we tie this into card access DB.
  • Tie into card access database. Run an embedded server, with web interface for administration. Could run this on a raspberry pi, on a battery back to track even when power is off. Beagle board, wireless router, etc.