• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

EM4100 RFID Reader (source code and schematic)

    Blog entry posted in 'Uncategorised', April 26, 2010.

    For up-to-date content regarding this post, you can view the original article



    EM4100 readers are somewhat popular because they are cheap, widely available and easy to use. You can pick up an EM4100 RFID reader for ~$40 or less. The module used in this example may not work for every EM Reader out there - though it offers an approach to start with. If you do create a new module for a different device, then please share it!


    What's an EM4100 RFID Card?



    It's a type of RFID Card obviously! They operate on the Low Frequency (LF) band (125KHz). In that frequency band there are several kinds of tags that all communicate differently. The EM family of tags come from a single manufacturer; EM Microelectronic. The EM4100 is simply a type of tag from their line of tags that operates at 125KHz. There are other models such as EM4002, EM4102 and the newer EM4200.

    There are some standards that several RFID chip makers adhere to, but many chip types (like the EM4100) do not conform to any standard, and several reader manufacturers develop hardware to support reading those types of chips.


    Interfacing (Schematic)

    Although I could have made a very simple daughter board for the TAP-28, I was actually joining this project with a Bluetooth module (giving my computer RFID capability!). There were a few too many components, so I made my own development board.

    My Card Reader has an RS232 interface (+/-12V) - Given I was using 3.3V with this design, a MAX3223 handled voltage level switching.

    It may look like there's a lot going on - but consider its just the following:

    * 3.3V Regulator.
    * RFID Reader (powered by 12 volts).
    * MAX3223 for level switching.
    * PIC & PICKit 2 connectors.




    The Result



    The Code

    In the following program, I am calling a sub routine which is a blocking call (will not return until something is received). After that happens, the Card ID is displayed in both ASCII and Raw Hex on the PICKit 2 UART Terminal.

    Code:
    Device = 18F2520
    Clock = 8
    Config MCLRE = Off

    // all includes can be found @ digital-diy.com ("Swordfish - Module Pack")
    Include "InternalOscillator.bas"
    Include "RFID_EM4100.bas"
    Include "USART.bas"
    Include "Convert.bas"


    // display card number in decimal and hex
    Sub DisplayCardNumber()
    Dim i As Byte

    USART.Write("______________________________________",13,10)
    USART.Write("RFID CARD DETECTED!",13,10)
    USART.Write("ASCII : ", CardNumber,13,10)
    USART.Write("RAW HEX: ")
    For i = 0 To 9
    USART.Write(HexToStr(CardNumber(i),2)," ")
    Next
    USART.Write(13,10)
    End Sub

    // main program loop
    While true
    RFID.WaitForCard()
    DisplayCardNumber()
    Wend


    More information and downloads

    The original article has any updated information and downloads (such as the User Module "RFID_EM4100.bas").

    Comments
    oprfid.eva, August 31, 2010
    complete solution of RFID service We offer contact smart cards, contactless cards, UHF products, wristbands, key tags, laundry tags, coin disc tags, animal tags are all our extensive products list. All these items can be modified to suit your makret needs. Welcome to [url=http://www.oprfid.com]RFID Card,RFID Label,RFID tag,Key fob,Contact IC card,RFID reader products and RFID technology products service company[/url] to know about our infromation. Inquire today and we will respond within 24 hours. Eva OPRFID Technologies., LTD 2-603 Room, Hong Feng Jia Yuan , 270# BeiMo Street Chengxiang Putian City, Fujian,P.R ,China Email: [email]OPrfid.Eva@oprfid.com[/email] MSN: [email]OPrfid.Eva@hotmai.com[/email]
 

EE World Online Articles

Loading

 
Top