Microcontroller and magnetic card reader

Discussion in 'Embedded Systems and Microcontrollers' started by dan_rt30, Oct 21, 2014.

Thread Status:
Not open for further replies.
  1. dan_rt30

    Thread Starter New Member

    Oct 21, 2014
    Hello everybody, I just started a project in which I have to program a microcontroller that is connected to a magnetic card reader( through pins I guess). When a card (ID student card) is swiped, the card reader reads the card information (student name, card number, etc), it sends it to the microcontroller which compares it with a group of data storage in a small-local database (4 students) which is written inside the code. If the card information matches with the data stored in the small database, then it rotates a motor to open a locking mechanism; otherwise, it sends an invalid ID card message in a small LCD screen. I'm not sure sure which microcontroller would be suitable for this type of project as wells as what type of magnetic card reader. I want to make it in C. Any suggestion, idea or link to look at, it is greatly appreciate. Thanks in advance.
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    The display is a common type, needs 6 or 7 I/O lines.

    The card reader is tougher as the really inexpensive ones I've seen (after a 2-3 minute look on EBay) all need a USB master to read them, and that is a tough nut in a micro controller. I've seen some serial based units but they start at $40 and up. A serial reader is again simple and needs 2 lines to interface.

    So just about any micro with 8 or 9 Input/Output lines can do this.

    Microchip gives away a C compiler for their micros, and they are well supported here and other forums. However, the display always drives people batty getting to work the first time.

    Since it seems you are just starting out perhaps you should look into a development board or more broadly something like the Arduino.
    IT_Peter likes this.
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    You don't need to store any personally identifying information on a card - you can just give each card a unique ID that is associated with a particular person and store personal information elsewhere in a central location.

    In addition to Ernie's comments, you may want to look into RFID as the means to get the user IDs. There are rather cheap RFID readers out there that interface more readily with a microcontroller. I have one from Pololu that was obtained for something like $15 and uses UART.
  4. Macjohn Key

    New Member

    Jun 18, 2015
    I have the same project as him. Please tshuck i want to understand more about RFID.

    I think the interphase can manage all the other informations, just need a unique ID. In my case it's the registration number of the student
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    Don't hijack someone else's thread - start your own thread and provide a link to another thread if you think it's appropriate.

    A simple lookup is all that's required to get information from a uniquely identifying code (e.g. the card ID). If each student has a unique card ID, other information can be looked up in a database using the ID as a key.

    In other words, you don't necessarily need the information on the card to be anything other than a uniquely identifying number (which doesn't have to be the student's registration number).
  6. MaxHeadRoom


    Jul 18, 2013
    Macjohn Key likes this.
Thread Status:
Not open for further replies.