Introduction: RFIDuino Logger

In this instructable we will use the RFIDuino Logger Program to log basic data from the RFIDuino/Geekduino. This sort of system is useful for Time Clocks and Access Doors. When an RFID tag is swiped, Record of the Tag ID, Date, and Time is taken. This can be exported as a .csv and opened with any spreadsheet program, such as Microsoft Excel or LibreOffice. Let's get started!

Step 1: Project Parts List

These are the parts we used to build this project. You can use any flavor of Arduino UNO/Duemilanove, and most RFID tags are compatible with the system, but we recommend using the RFIDunio Shield, because the code is written with the RFIDuino Library in mind!

Step 2: Hardware Setup

  • If you haven't checked out the RFIDuino Getting Started Guide, now would be a good time to do so.
  • Make sure to grab and install the RFIDuino Library and Tools.
  • Connect your components as shown above.
  • Open RFIDuino_csv_logger onto your board. You can find this sketch under
    File>Examples>RFIDuino>RFIDuino_csv_logger
  • You will need to make sure the code is adjusted for your RFIduino hardware. By default RFIDuino_csv_logger is setup for the newest version of the RFIDuino shield (1.2).
    v1.2 shields (2 pin antenna, 'REV 1.2' printed on the board) will need the following code
    RFIDuino myRFIDuino(1.2);     //initialize an RFIDuino object for hardware version 1.2
    v1.1 shields (4-pin antenna, no version number printed on the board) will need the following code
    RFIDuino myRFIDuino(1.1);     //initialize an RFIDuino object for hardware version 1.1

    Both lines of code are available in the RFIDuino_csv_logger sketch, simply uncomment the one you don't need.

    If you are still unsure about what hardware you are using, see this page. The RFID Experimenter's Kit comes with the version 1.2 shield.

  • Swipe any of the 'key' tags across the RFIDuino antenna. The green light will light up and your buzzer turn on for 100 milliseconds, then turn off.
  • You can test your code further by opening the Serial Monitor
    File -> Serial Monitor

    And setting the baud rate to 38400. Now scan your tag and you should see a number come up on the screen. This is the 4-byte version of your tag ID.

  • Step 3: Software Setup


    1. If you don't already have the Chrome Browser installed on your computer, Go Here to install it
    2. In Chrome, go to this page on the Chrome Webstore.
    3. Click + Add To Chrome to install the RobotGeek RFIDuino Logger
    4. Allow Access for the Chrome App to your system
    5. You can always type
      chrome://apps/

      in your browser to get to your Chrome App launcher page. From This page just Click the RobotGeek icon to launch the program

    6. From the Drop-Down menu, pick the serial port that you used to program your Geekduino.
    7. Click 'Connect' to open a connection
    8. Every time you swipe a tag, the computer will record the tag ID and append the current time
    9. Click Clear Log to clear the records
    10. Click Export to Disk to save the records as a .csv file. You can open this file in Excel / other spreadsheet programs.

    Step 4: Code Overview

    This code is a modified version of the RFIDuino_helloworld code. This time however, instead of displaying tag IDs as the 5-bytes that make up the tag ID, we're only using the lower 4 bytes of the Tag ID. This is for two reasons:

    1. The first byte, the 'Vendor ID' is often ignored as similar cards usually have the same first byte
    2. Using a 4-byte number allows us to store the tag id in a single long variable.

    This code uses the << (Bitshift Left) operator to move shift the higher 3 bytes, and then adds all of the bytes together into a single longvariable.

    Step 5: Future Improvements

    The source code for the Chrome App can be found here. You can modify the look and function of the app to suit your needs. The App is very simple, but you could add features like database functionality (to associate names to ID numbers) or live updates to online data storage (dropbox, google sheets)

    You can also use a RFIduino Wireless Upgrade Kit to wirelessly send data from the RFIduino to your computer.

    It is also possible to make the RFIduino a standalone logger, and then save the logs back to the computer at a later time. For storing the data you can use EEPROM for small logs (~100 ID/Timestamp entries) or an SD card for larger entries.

    One of the biggest difficulties with standalone loggers is an effective timestamp. The Geekduino can count time since the beginning of its operation using the millis() function. But the Geekduino doesn't have a true idea of when it started in time. Also, the crystal in the Geekduino will lose a few seconds over a week. This problem is usually overcome with a piece of hardware called a Real Time Clock(RTC). This device is battery operated and keeps track of time very accurately. The Geekduino can query the RTC to get a time to associate with the log.

    Step 6: You're All Set!

    Now that you have the logger functioning, maybe you could add it to your RFID Door Lock, Garage Door Opener, or Lockbox! Can you think of other projects that might benefit from RFID Logging? Let us know what you come up with!

    Comments

    author
    Stan1y (author)2016-07-18

    I'll have to re read this it may answer my forum post can you log what cats are coming through a cat flap

    author

    If you rigged the cat up with a large RFID tag on their back and set the antenna on the door flap in such a way that they couldn't get through it without pressing their back against the antenna, it could work. Some of the implanted chips (about 20% of them) will work with the RFIDuino reader, but either way, the chip doesn't have a good read range on it.
    A more reliable way to track cats coming through a doorway might be more akin to rigging the door with a switch and taking a picture or short video with a webcam. That way you get visual confirmation of cats that are allowed in, as well as confirmation of cats or wildlife that aren't supposed to get in.

    author
    DIY Hacks and How Tos (author)2016-07-18

    Cool project.

    About This Instructable

    713views

    19favorites

    License:

    Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
    More by robotgeek_official:Voice Control Chip-E With Google HomeRock'em Sock'em Literal Robots3D Printed Automatic Small Fish Feeder (Single Servo and Arduino)
    Add instructable to: