Shop OBEX P1 Docs P2 Docs Learn Events
Using RFID to limit access to my house by time and user — Parallax Forums

Using RFID to limit access to my house by time and user

Number FiveNumber Five Posts: 3
edited 2011-01-26 09:27 in General Discussion
Moved from RFID Completed Projects forum in a thread titled RFID Reader Software (VB.NET)---
I am a disabled Air Force vet (34 yrs old so you don't think I'm old) and automating my house and putting electronic locks on my doors. Light switches are already in place and controlled by the alarm. I can turn on and off lights and the alarm using a BS2 so if I add the RFID you can see the benefit. I have gone thru this thread and downloaded all the codes and programs and will be going thru each to find the best one. One thing I want to do is add a clock function and time limit RFID Cards so for example the lady that cleans my house will only have access from 4 to 8pm on Tuesday and Saturday and it will log if the card is tried or used before or after that time. I also don't know how to track time on the BS2 and wonder if it can be tracked using the CPU. I have a Dell desktop 1 gig cpu with 256 ram set aside for this one purpose. I appreciate any help.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
v/r
Paul Karber, USAF Ret.
President Altus Robotics Club
"Never could an increase of comfort or security be a sufficient good to be bought at the price of liberty." -- Hilaire Belloc

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-03-07 02:40
    You could use a desktop computer, but be warned that you'll have to learn a new programming language. Something like BASIC would work, as well as C++ and Java. It's a good option if you wish to expand and have a more powerful system, but it will take some work. If you already know one of these languages, so much the better.

    Anyway, what you are proposing is certainly possible, and, if you know how to program adequately, shouldn't be all that difficult. If you go with the BS2 as your main brain, you'll have to add a real time clock (RTC) to keep track of time. Parallax sells a suitable module for this purpose, as does Futurlec (http://www.futurlec.com/Mini_DS1307.shtml). If you use your desktop as the main brain, then whatever language you choose will allow you to access the system clock.

    For logging data, if you go with the desktop it's as simple as creating a file output stream to a text file. With the BS2, it's a little more complicated. You have two choices: log to EEPROM or log to a datalogger. If you choose EEPROM, you'll have to figure out a suitable method to output the data when you want to retrieve it. With the USB datalogger, you can create a txt file that you can then read on your computer.

    More help can be had if you tell us what your programing and electronics skill levels are, and how much time/money you're willing to spend on this.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-07 04:25
    If you're interested in having the BS2 do everything, there are several articles in the Nuts and Volts Columns series on adding a RTC to a Stamp. Go to the main Parallax webpage, click on the Resources tab, then select the Nuts and Volts Columns link and you'll see the index of columns. I don't remember specifically which column, but it would be good for you to browse the index at least once to see the breadth of things covered.
  • bennettdanbennettdan Posts: 614
    edited 2009-03-14 04:29
    Number Five,
    ····I have worked on security systems a little and I like your idea of a more secure home.
    see this article http://www.code-magazine.com/Article.aspx?quickid=0611061
    Wei uses the RFID reader from parrallax and uses VB.Net express to Log the Tags into the Northwind database all of these are free downloads from microsoft.
    I have used the northwind database before but the express version of the server is not as user freindly as the complete version. I would use XML files to track your Tag logs and lookup tables and they can be easily modified with notepad and it is a little faster than the database will be.
    I can help with some code to get you started. But first you need the Visual Basic .net express.
    http://www.microsoft.com/Express/VB/
    This is a link on how to download and install the VB.net express
    Download it and then download Wei Mengs program he wrote his with VB.net 2005 so the new 2008 will convert it for you.
    Let me know when you get it loaded and we can work on the interface I can also show you how to add WIFI network cameras and USB cameras into your VB.net security interface.
  • DooballDooball Posts: 4
    edited 2010-10-19 21:56
    @ Number Five

    Were you successful at setting up your project?
  • skylightskylight Posts: 1,915
    edited 2010-10-20 03:28
    If you are good with excel then the functions within could do all you ask.
    using PLX-DAQ

    reading and writing data to excel you could have formulas that fill trigger cells for allowing access or not dependant of time.
    It will also allow logging.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2010-10-21 13:03
    Environments like MATlab can do the things you want built in. Another good PC side solution is to try 'visual c#.NET' or 'visual basic .net'. You can get either one free from microsoft.
    Keep in mind that you can hook up a real-time clock to the BS2 and also that there are data logging products (I think some are for sale on parallax website).
  • tmart2007tmart2007 Posts: 7
    edited 2011-01-26 09:27
    #1) I use the parallax basic stamp module to read the RFID - no components required -- just connect to power on Basic Stamp Board, and pin 0 to enable and pin 1 to sout

    #2) It takes very little Basic stamp code to read the RFID card

    #3) The read in is then "echoed" by the basic stamp through and to the rs232 port of the Basic stamp through a debug statement.

    #4) VB then read that info into the VB 5 program.

    all code can be provided for the Basic Stamp and VB 5
    tmart2007@GMail.com - ted
    ====
    what is interesting is that you can send code with the debug statement that tells it whether it is door A or B
    for instance:



    Enable pin 0
    RX pin 1
    RT pin 2

    sData Var Byte

    T9600 Con 396

    '
    # SELECT $STAMP
    #CASE BS2, BS2E, BS2PE
    T2400 CON 396
    #CASE BS2SX, BS2P
    T2400 CON 1021
    #CASE BS2PX
    T9600 CON 396
    #ENDSELECT



    buf Var Byte(10) 'reading ten digits
    tagNum var Nib
    idx Var Byte

    '
    Reset:
    HIGH Enable


    Main:
    LOW Enable
    Serin RX T2400, [WAIT($0A), STR buf\10]
    HIGH Enable

    Display _Tag:

    DEBUG "Door A", CR

    For idx=0 to 9
    DEBUG buf(idx)
    Next

    DEBUG CR

    PAUSE 500

    GOTO Main


    =========

    this code sends the tag info read to the buffer and will put it on the screen of the Basic Stamp program

    ====
    Just need to parse it in VB and take out what you want and the 10 digits or part of the 10 digits
    I only use the last three digits of the RFID tag with about 700 tags

    ====

    I then use a VB routine in the visual basic program to set off a relay for door A or B. The relay is set off through the parallel port to an 8 relay board controlled by the parallel port. A or B is parsed out to tell me which door to set off the relay for.

    thanks
    ted
Sign In or Register to comment.