Rfid Mobile Payment

download Rfid Mobile Payment

of 33

Transcript of Rfid Mobile Payment

  • 8/2/2019 Rfid Mobile Payment

    1/33

    Skip to main contentCornell UniversitySchool of Electrical and Computer Engineering

    SEARCH:

    Pages Peoplemore options

    Mivo- RFID based mobile payment system

    By Harshvardhan Chamria (hc448) and Harold Beyel (heb47)

    Introduction and Rationale High Level Design Logical Structure RFID Ethernet Results Conclusions Appendix

    Introduction and Rationale

    We used our ECE 4760 final project as a platform to develop a proof of concept for Mivo. Mivois a low-cost, stripped down mobile payment system. Our prototype combines Radio FrequencyIdentification (RFID), Security Pin Authentication and Ethernet Data Transfer to provide aprototype for a low-cost secure payment system that has the potential to change lives in ruralareas of developing countries.

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#contenthttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#contenthttp://www.cornell.edu/http://www.ece.cornell.edu/http://www.ece.cornell.edu/http://www.ece.cornell.edu/http://www.cornell.edu/search/http://www.cornell.edu/search/http://www.cornell.edu/search/http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#introandrationalehttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#introandrationalehttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#high_level_designhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#high_level_designhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#logical_structurehttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#logical_structurehttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#rfidhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#rfidhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#ethernethttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#ethernethttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#resultshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#resultshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#conclusionshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#conclusionshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#appendixhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#appendixhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#appendixhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#conclusionshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#resultshttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#ethernethttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#rfidhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#logical_structurehttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#high_level_designhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#introandrationalehttp://www.cornell.edu/search/http://www.ece.cornell.edu/http://www.cornell.edu/http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/index.html#content
  • 8/2/2019 Rfid Mobile Payment

    2/33

    Harry and Harsh with Mivo (No cash please!)

    The Idea:

    Mivo is a service that aims to securely and conveniently move retail banking and financial

    services to cell-phones. It is a mobile-banking facility for the unbanked. We propose to deliveraccess to financial services to the unbanked, on low-end mobile phones. Worldwide there are 4.1billion cell-phone users compared to just 1.6 billion people with bank accounts; further, researchreveals a potential of $250 billion in micro-finance in the world, yet only $25 billion has beenlent out. Mivo has the potential to bridge both gaps.

    This is an idea targeted at developing countries; as the Internet and ATMs are unavailable inrural areas and penetration is low even in urban areas there are many problems faced (includingaccess to financial services and remittances). The idea is to construct a complete mobile-paymentecosystem comprised of RFID-enabled phones and text message (SMS) transactions to access avirtual account- a simple, fast and safe solution for financial transactions. While Mivo can be a

    life-changer in the developing world, it also has awesome applications in the developed world.As an example application, Mivo users would be able to pay for an airline or movie ticket bytext-messaging an advertised SMS code and then skip the line at the counter by scanning theirRFID-equipped phone at the entry point and entering their authentication details.

    Our Mobile Payment System

  • 8/2/2019 Rfid Mobile Payment

    3/33

    Inside Our Mobile Payment System (without the Ethernet Module)

    High Level Design

    We envisioned that the tasks of a generic technological payment system are:

    1. Identification2. Authentication3. Database access and update

    Identification:

    After considerable contemplation and debate we decided that we would use RFID (RadioFrequency Identification) for Identification. We selected RFID because this standard has a fairlyshort-range connection, a small connection-setup time (both of which make it slightly tougher tohack than some other standards) and also because we knew that our Cornell Cards have RFID

  • 8/2/2019 Rfid Mobile Payment

    4/33

    tags embedded within them. Thus, we would be able to use these cards for identification insteadof investing in RFID tags.

    Authentication:

    We decided to use 4-digit security pin for Authentication because we wanted a system that isquick and convenient while being secure. We had also considered adding a Fingerprint basedauthentication; however, due to the time constraint of 5 weeks we decided that we would add thisfeature later.

    Database access and update:

    Now for the Database access, while we would eventually want to transfer data over airwaves (inorder to exploit the existing telecommunication infrastructure and avoid the hassle of setting upEthernet connections), for the purpose of this project we decided to use Ethernet based datatransfer. We took this decision because neither of us is familiar with 2G or 3G standards and

    implementing this in 5 weeks would have been a stretch.

    Top Level System Architecture (from Project Proposal)

    Going into this project we were both really apprehensive of how much we would be able toachieve, but as advised by Professor Bruce Land and our TA Yuchen Zhang, we divided up our(Goliath-of-a-) project into sub-tasks. Neither of us has taken a course on RFID design; howeverwe researched online to find a host of resources to help us on our circuit and data-analysis. In

    fact we found the documentation onProximity Security System (project by Craig Ross and

    Ricardo Goto, Spring 2006) extremely helpful in selecting our design methodology. Their page

    also linked us to [Jonathan Westhues Proximity website] and the [microID 125kHz RFID

    http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://cq.cx/prox.plhttp://cq.cx/prox.plhttp://cq.cx/prox.plhttp://cq.cx/prox.plhttp://cq.cx/prox.plhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://cq.cx/prox.plhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htm
  • 8/2/2019 Rfid Mobile Payment

    5/33

    System Guide] which provide some solid documentation on designing secure proximity systems.

    We had used the LCD and keypad in previous labs and hence we referred to Prof. Lands code:

    LCD and keypad. Eventually after many hours of research we were lucky to come across Brian

    Bryces website (please refer to theAcknowledgements section) which served as a good

    reference for us while we were designing our Ethernet system. We decided to use the AtmelMega 16 microcontroller (as opposed to the Mega 644 that we had used in all of our labs duringthe semester) simply because we did not need much on-chip memory and the Mega 16 would

    count as afree chip in our budget (of course, we were also comfortably under-budget).

    Overview:

    At the top-level, we wrote a state machine that controls the working of the entire system andintegrates the various subsystems into a single entity. We will go into the details of the state

    machine later in theLogical Structure section of our report. However, it is important to

    understand the top level working of the system. After thecashier enters the amount using

    the 4x4 keypad the state machine transitions to theRFIDInput state, which triggers the

    RFID system. Our system uses an inductive-antenna coil to activate the RFID tag in our CornellID cards and then reads off the response from the card. This response is put through a bandpass

    filter and wave rectification filter and finally some digital logic (more on this in theRFID

    section of our report) before it is fed to the Atmel Mega16 microcontroller, which furtherdecodes the data to extract a unique code that is consistent across multiple tries for each RFIDtag. Then the user is prompted to enter his/her security pin. This data and the user enteredsecurity-pin are transferred to an Ethernet Controller (connected using an SPI interface) whichaccesses a mySQL database through an Ethernet connection (for the detailed implementation

    please look at theEthernet section of our report). A program at the backend server replies

    with a GoodG, or BadB message. All the user-prompts and data output are displayed

    on a 16x2 LCD screen and all input (at Point of Sale, i.e. front-end) is through a 4x4 keypad.

    Logical Structure

    A state machine controls how the entire system works. We decided to use this topology because

    we were going to use a state machine (from Bruces keypad code) to debounce a button-press

    on the keypad and extending this structure to control the various sub-systems of our project

    seemed a logical next step.

    http://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdf
  • 8/2/2019 Rfid Mobile Payment

    6/33

    Our State Machine (Program Control)(Click Here for Full Size)

    Our program starts up in the NoPush state. If a key is pressed it moves to the Debounce state

    (which occurs after an interval of time equal todebounce_interval set to 30 milliseconds).

    We used a 4x4 keypad and we had to debounce the keypad because electrical contacts inmechanical pushbutton switches often break contact multiple times when the button is firstpushed. The debouncing logic removes the resulting ripple signal, and provides a cleantransition. The idea here is that the bouncing of the switch will stop after an interval of 30milliseconds.

    We assign a signal called rfid_ready to determine which state to transition to next. A value ofrfid_ready = 0 means that this is a new transaction and the state machine transitions to theDetectAmount state prompting the cashier to enter the amount. After the cashier types in thedigits using the keypad he/she can confirm by pressing B (corresponding to butnum = 12). Atany time the system can be reset by pressing A (corresponding to butnum = 11).

    Merchant Prompted to Enter Amount

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_3_StateMachine.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_3_StateMachine.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_3_StateMachine.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_3_StateMachine.jpg
  • 8/2/2019 Rfid Mobile Payment

    7/33

    A value of rfid_ready = 1 means that amount has been entered already but there was an error inentering the security-pin (i.e. user entered an incorrect pin and pressed cancel or entered a pinthat is not 4 digits long). In this case the system asks for the authentication details again.

    Next, the RFIDInput state is entered and this triggers the system to get into the RFID tag

    identification state. This is a major subsystem of our project and will be explained in detail in theRFID section of our report. The RFID system outputs the bitstream read off the RFID tag andthe state machine then transitions to the SecurityPin state.

    User Prompted to Wave Tag

    In the SecurityPin state the user is prompted to enter his/her security-pin. The working of thisstate is pretty straightforward. If the user enters a pin that is not 4 digits long and confirms thesystem prompts the user to re-enter his/her authentication details and the system transitions to theRFIDInput state. Else, if the pin is in the correct format the state machine transitions to theSendEthernetData state.

    User Prompted to Enter Security Pin

    The SendEthernetData state transfers (1) the amount, (2) the RFID tag and (3) the user-enteredsecurity pin over the Ethernet to a mySQL database that is queried for the received tag andchecks if the security pin was entered correctly. If the tag is found, the security pin is correct, andthe user has the given amount in his/her account a Good G signal is returned over the Ethernet.Else a Bad B signal is returned. The user is informed about the details of the transaction on theLCD. The actual implementation for Ethernet data transfer is explained in the Ethernet sectionof our report.

  • 8/2/2019 Rfid Mobile Payment

    8/33

    mySQL databsase returning a Success message, after identifying Harry's tag

    A new transaction can now be started by pressing the reset button A, on the keypad.

    Note: The LCD implementation was fairly straightforward because we had used the same LCDin previous labs and used the functions from the libraries that we were provided with. For a

    detailed explanation, please refer to the LCD section of our report. The keypadimplementation was also done in a previous lab and hence we were fairly comfortable with boththe circuitry and software required to include it in our final project. For a detailed explanation,please refer to the Keypad section of our report.

    RFID

    Before we start a detailed explanation of our implementation we will take a step back and talk alittle about the technology in general.

    Excerpts from the microID 125kHz RFID System Guide:

    RFID Introduction:

    Radio Frequency Identification (RFID) systems use radio frequency to identify, locate and trackpeople, assets and animals. Passive RFID systems are composed of three components a reader(interrogator), passive tag and host computer. The tag is composed of an antenna coil and asilicon chip that includes basic modulation circuitry and non-volatile memory. The tag isenergized by a time-varying electromagnetic radio frequency (RF) wave that is transmitted bythe reader. This RF signal is called a carrier signal. When the RF field passes through an antennacoil, there is an AC voltage generated across the coil. This voltage is rectified to result in a DCvoltage for the device operation. The device becomes functional when the DC voltage reaches a

    certain level. The information stored in the device is transmitted back to the reader. This is oftencalled backscattering. By detecting the backscattering signal, the information stored in the devicecan be fully identified.

    RFID Tag:

    Tag consists of a silicon device and antenna circuit. The purpose of the antenna circuit is toinduce an energizing signal and to send a modulated RF signal. The read range of tag largely

  • 8/2/2019 Rfid Mobile Payment

    9/33

    depends upon the antenna circuit and size. The antenna circuit of tag is made of LC resonantcircuit or E-field dipole antenna, depending on the carrier frequency. The LC resonant circuit isused for the frequency of less than 100 MHz. In this frequency band, the communicationbetween the reader and tag takes place with magnetic coupling between the two antennas throughthe magnetic field. The antenna utilizing the inductive coupling is often called magnetic dipole

    antenna. The antenna circuit must be designed such a way to maximize the magnetic couplingbetween them.

    Modulation Protocol:

    The passive RFID tag uses backscattering of the carrier frequency for sending data from the tagto reader. The amplitude of backscattering signal is modulated with modulation data of the tagdevice. The modulation data can be encoded in the form of ASK (NRZ or Manchester), FSK orPSK. Therefore, the modulation signal from the tag is Amplitude-Amplitude, Amplitude-FSKand Amplitude-PSK.

    Carrier:

    Carrier is the transmitting radio frequency of reader (interrogator). This RF carrier providesenergy to the tag device, and is used to detect modulation data from the tag using backscattering.In read/write device, the carrier is also used to deliver interrogators command and data to thetag.

    Frequency Shift Keying:

    This form of modulation uses two different frequencies for data transfer; the most common FSKmode is FC/8/10 (FC is the carrier frequency). In other words, a 0 is transmitted as an

    amplitude-modulated clock cycle with period corresponding to the carrier frequency divided by8, and a 1 is transmitted as an amplitude-modulated clock cycle period corresponding to thecarrier frequency divided by 10. The amplitude modulation of the carrier thus switches fromFC/8 to FC/10 corresponding to 0s and 1s in the bitstream, and the reader has only to countcycles between the peak-detected clock edges to decode the data. FSK allows for a simple readerdesign, provides very strong noise immunity, but suffers from a lower data rate than some otherforms of data modulation.

    Now, we were really lucky for a couple of reasons. (1) Cornell has had RFID tags embedded ineach of the Cornell ID cards since Fall of 2003 so we could simply use these tags (albeit thesetags would not be embedded in our cell-phones, this would be OK for now), (2) Craig andRicardo (from Spring 2006) had already done all the research on Cornells RFID tags (we areextremely grateful to them for their comprehensive report).

    Salient Points:

    1. The tags operated on a 125 [kHz] carrier frequency.2. The modulation method used was FSK (Frequency Shift Keying).

  • 8/2/2019 Rfid Mobile Payment

    10/33

    This information was extremely crucial because we saved a lot of time on research and couldconcentrate on building a robust system instead! Thus, now we knew that 0s corresponded to a(125/8) 15.625[kHz] frequency and 1s corresponded to a (125/10) 12.5[kHz] frequency.

    FSK Modulated Signal

    Before delving into the specifics of the individual parts of the circuit heres a breakdown of thetop-level tasks (referenced from the microID 125kHz RFID System Guide):

    1. Transmission: The transmitting section contains circuitry for a carrier signal (125 kHz),power amplifiers, and a tuned antenna coil. The 125 kHz carrier signal is typicallygenerated by passing a 125 [kHz] square-wave signal from the Mega16 through an RFchoke. The signal is amplified before it is fed into the antenna tuning circuit. Acomplementary power amplifier circuit is typically used to boost the transmitting signallevel. An antenna impedance tuning circuit consisting of capacitors is used to maximizethe signal level at the carrier frequency. This tuning circuit is also needed to form anexact LC resonant circuit for the carrier signal. The tuning compensates the variations inthe component values and the perturbation of coil inductance due to environment effect.

    2. Reception: The receiving section consists of an antenna coil, demodulator, filters,amplifiers, and microcontroller. The FSK reader needs two steps for a full recovery of thedata. The first step is demodulating the backscattering signal, and the second step isdetecting the frequency (or period) of the demodulation signal. The demodulation isaccomplished by detecting the envelope of the carrier signal. A half-wave capacitor-filtered rectifier circuit is used for the demodulation process. A diode detects the peakvoltage of the backscattering signal. The voltage is then fed into an RCcharging/discharging circuit. The RC time constant must be small enough to allow thevoltage across C to fall fast enough to keep in step with the envelope. However, the timeconstant must not be so small as to introduce excessive ripple. The demodulated signalmust then pass through a filter and signal shaping circuit before it is fed to themicrocontroller. The microcontroller performs data decoding after this.

    RFID Hardware:

  • 8/2/2019 Rfid Mobile Payment

    11/33

    Complete RFID Circuit Schematic(Click Here for Full Size)

    Note: We adopted the ATMega32 schematic from Spring 2008 as it fit in better with our design.However, the pin-configuration and external hardware setup are identical in the ATMega32 andATMega16 chips.

    Explanation:

    Transmission- RF Choke and Power Amplifier: The circuit represents a 125 [kHz] square-wave signal fed into an RF choke followed by a current buffer and half-bridge amplifier.

    The RF choke is used to filter majority of the high frequency signals in the square-wave, passingthrough only the fundamental harmonic (sine-wave) of 125 [kHz]. We could have generated asine-wave in the MCU and passed that directly to the power amplifier however this would havebeen much more taxing on the MCU (as we would have had to implement a sine-wave table,etc). Generating a square-wave on the other hand is extremely simple and uses the MCU

    resources to a bare minimum (please see the RFIDSoftware section for details). Diodes are

    used here, in order to remove crossover distortion (transients due to the half-bridge transistorsswitching between on and off states).

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_9_CompleteRFIDCircuitSchematic.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_9_CompleteRFIDCircuitSchematic.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_9_CompleteRFIDCircuitSchematic.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_9_CompleteRFIDCircuitSchematic.jpg
  • 8/2/2019 Rfid Mobile Payment

    12/33

    All of the components in this circuit were found in the ECE 4760 lab apart from the 1 [mH]

    inductor, which we ordered through DigiKey (part numbers can be found in theParts List

    section).

    Reception Antenna: This is definitely one of the most crucial elements of the circuit and we

    made sure to follow the recommendation (by the microID guide) of using a series L-C resonantcircuit, as opposed to a parallel R-C circuit. This topology ensures that maximum current flowoccurs at maximum resonance and also provides for a simpler design.

    The resonance frequency is given by the equation:

    As the ECE 4760 lab had 1nF capacitors in abundance, we decided to use C = 1 [nF]. This, alongwith (resonant frequency) f0 = 125 [kHz] gave us a value for L 1.62 [mH].

    Now, for the construction of the antenna we decided to go for a rectangular shaped antenna asopposed to a circular one because from our preliminary end-product designs (i.e. aesthetic box)we knew that we would need a rectangular antenna. As far as the dimensions of this antenna areconcerned, we decided that we would go with an antenna about the size of our whiteboard (asour box would have to be at least as large as the whiteboard (or solder board).

    The [microID guide] came in handy here as well because we could simply use the equation forcalculating the inductance of a coil. The equation for the inductance of an N-turn rectangularcoil, with multilayer is:

    Here: L- Inductance in [H], {x,y}- {Length, Breadth} of coil in [cms], h- Height of coil in[cms], b- diameter of wire in [cms].

    The values we used: L = 1620[H], {x, y, h} = {4.2, 15.2, 1} [cms], b = 0.32[cms] (AWG28lacquered copper wire from the ECE 4760 lab). Solving this equation for N gave us N 83 turns.Oscilloscope results below show the inductance coil output, both with and without RFID tagsbeing present.

    Reception Circuit: Since the capacitor (in series with the coil) is grounded, the carrier signal(125 kHz) is filtered out to ground after passing the antenna coil. The circuit provides minimumimpedance at the resonance frequency. This results in maximizing the antenna current, andtherefore, the magnetic field strength is maximized.We now need to half-wave rectify and R-C filter the received signal. The inductor, capacitor anddiode (and the other bottom parts in the circuit) form a signal receiving section. The voltage dropin the antenna coil is a summation (superposition) of the transmitting signal and backscatteringsignal. The diode is a demodulator which detects the envelope of the backscattering signal. The

  • 8/2/2019 Rfid Mobile Payment

    13/33

    diode and capacitor (2.2nF) form a half-wave capacitor-filtered rectifier circuit. The detectedenvelope signal is charged into the 2.2nF capacitor. The resistor provides a discharge path for thevoltage charged in the capacitor. This voltage passes active filters and the pulse shapingcircuitry. Finally this signal is passed through a capacitor (1nF) which knocks off the DC offset.

    Filtering Circuit: Next we use active Twin-T and Butterworth filters using the TL084CN (high-speed) Op Amp. The first filter acts as an isolator with bandwidth being 10[Hz]20[Hz], andunity-gain for all frequencies outside the band. The second filter introduces some more gain intothe pass-band. Next, the signal goes into a Butterworth filter with sharp roll-off. This filter getsrid of any high-frequency components in the signal.Finally, the filtered signal is passed through a comparator to generate a square-wave type signal.The final result is that we get very clean 12.5[kHz] and 15.625[kHz] frequencies out of thesystem.One of the major differences in our design from the prev ious years design was that we got nosignal when a tag was not present near the coil. This is great because we didnt need any hack toignore this signal.

    Oscilloscope outputs from comparator (12.5[kHz])

  • 8/2/2019 Rfid Mobile Payment

    14/33

    Oscilloscope outputs from comparator (15.625[kHz])

    Note: We did not simulate any of these circuits simply because we were using a commercialguide (presumably thoroughly tested) and we were lucky to have the Sp 2006 groups simulationresults. In fact, we devoted our time to trying out different values of components in order toachieve the best performance. For further details (such as how to increase the range, etc, pleaserefer to the microID 125kHz RFID System Guide).

    Hardware/Software Tradeoff & Data Creation: We debated whether we could take thefiltered signals and feed them directly to the MCU or if we would need some more hardwaredecoding. However, in order to accurately measure the frequency of the incoming data we wouldhave to sample at a rate of about 125[kHz] and this would take up a lot of the resources of theMCU (at a clock rate of 16[MHz] this would give us 128 cycles to do everything else). Werealized this because Craig and Ricardo had explained this pretty well in their report and alsobecause we knew that it would be much faster to do this in hardware. Now, the microID RFIDguide provided a really smart way that made use of D flip flops and a decade counter. The circuitis designed as follows:

  • 8/2/2019 Rfid Mobile Payment

    15/33

    Digital Component of RFID Circuit(Click Here for Full Size)

    The explanation for this circuit is taken from Craig and Ricardos webpage as they did a great

    job of documenting and explaining the logic: The comparator output serves as the clock for thefirst D flip-flop, which also takes logic 1 as its D value. On the rising edge of the comparatorclock, Q is immediately set to 1. However, simultaneously ~Q goes low and clears the flip-flop.This creates an extremely short pulse which serves as a reset for the decade counter and clock forthe second flip-flop. The decade counter is just a 1-hot counter which takes a 125 KHz clock.

    With every rising edge of this clock, the counter outputs the next pin to logic 1; so typical outputwould look like (if one were looking at output pins 0-9 of the counter) 1000000000 010000000000100000000 etc. However, this counter is being reset with every rising edge of the comparatoroutput. Thus, since we've already determined that 125 KHz/10 = 12.5 KHz is to be our frequencythat represents logical 1, all we have to do is check for the output on pin9 to know whether or notwe see that frequency. If the system is operating at either one of the other possible frequencies,the counter will be reset before pin9 can go active. The pin9 output serves as input to the secondflip-flop and also to the clock inhibitor, which keeps the 9th pin high until the counter is reset.

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_12_RFIDDigital.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_12_RFIDDigital.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Figure_12_RFIDDigital.jpg
  • 8/2/2019 Rfid Mobile Payment

    16/33

    Because of this set-up, the Q output of the second flip-flop will remain logical 1 so long asmodulating frequency is 12.5 KHz and will drop down to 0 if its anything else. Theoretically,this circuit should work perfectly. However, experimentally it did not, and thus required a smallmodification. The 100 KOhm resistor on the first flip-flop serves to lengthen the time it takes forthe ~Q signal to get to CLEAR. Since all transistors have some amount of natural capacitance,

    this forms an RC circuit of sorts with a set RC time constant for the signal to rise or fall. As itturns out, this time was too short for the decade counter. The original design from the referenceguide specified only a 10KOhm resistor between ~Q and CLEAR. With the 10[KOhm] resistor,pulse widths for the reset pulse were a mere 50 [ns] long, while the counter required at least 250[ns]. This caused some very erratic behavior. After many hours of debugging, we finallypinpointed the problem and replaced the resistor with the 100 [KOhm] resistor which increasedthe pulse width long enough for the counter to correctly operate.

    RFID Software: Once the data was converted into a digital Manchester signal by the RFIDcircuit, we then had to process it and convert it into a useful format to the microcontroller. For

    this, we decided to write a library for the RFID, calledrfid.c, which dealt specifically with

    the task of receiving and interpreting an RFID signal. Unlike Ricardo and Craigs design for

    RFID, we did not use a sampling method for Manchester decoding. Instead, we opted for a more

    robust method with less interrupts a timing-based method. This method only interrupts when

    it has to i.e. on a change of logic value, and then the microcontroller interprets the amount of

    time between interrupts in order to determine the value of the Manchester bit. To do this, we gothrough a sequence of events after turning on the external interrupt for any logic change:

    1. Wait until we receive a start sequence (extra long logic high)2. On next interrupt, decode the first Manchester bit: delay by a very short amount to ensure

    steady state, read the logic level.3. If time difference is short, save the read logic level into a data buffer only if it wasnt

    recorded last time. If time difference is long, save the logic level.4. If anything was recorded in the previous step, add to the checksum such that it is sample

    number dependent (we used sample * i % 9, where i is the sample number)5. Repeat steps 2 and 3 until we read an end sequence (extra long logic low)6. Insert a2 at the end of the buffer, so we know where we stopped recording

    The sample number dependent checksum was added as a feature since it is more likely to bewrong in the case of multiple bit errors. If we only added the binary values, we would have

    created a parity check, which may not have been sufficient in cases of a lot of noise. Thisallowed us to cut down on the number of redundancy checks by a factor of three, and still get the

    same reliable results, leading to a faster system. To better explain what we mean byshort,

    long, andextra long: since Manchester encoding has a logic change at every data bit,

    the longest delay we could have would be 0110. That means that during the pair of 1s, it stayslogic high for two half-cycles. The shortest delay we could have would be 0101, where the 1stays high for only one half-cycle. For the RFID system, if we clock it at the same scale as the

  • 8/2/2019 Rfid Mobile Payment

    17/33

    previous two, there is also another state, which is 111110. This is a very long time, easilydetectable, and denotes the start of a data stream. Once we successfully fill the buffer, we ensurethe reliability by checking it multiple times. We checked 20 times, which was way overkill, butwe really wanted to minimize the chance of a wrong ID. In reality, two checks actually issufficient for most of the time, with three checks delivering near perfect results. Since we are

    only reading a 44-bit value from the RFID tag, we can do the 20 checks very quickly(approximately one second in most cases). We saved each data bit as a char in a string, so thenwe just convert it into a long using bin2dec so it can be returned using less space than a string.One cool final note was that by doing Manchester decoding with the timing-based method, wewere able to get the data by only connecting one wire for ground and one wire for data to themicrocontroller!

    Manchester Encoding [from Wikipedia]:

    In telecommunications, Manchester code is a line code in which the encoding of each data bithas at least one transition and occupies the same time. It therefore has no DC component, and is

    self-clocking, which means that it may be inductively or capacitively coupled, and that a clocksignal can be recovered from the encoded data. Essentially Manchester encoding works in the

    following way: A transition from 0 to 1 corresponds to a single1 value and a transition

    from 1 to 0 corresponds to a single0 value. Thus 01 -> 1, 10 -> 0, and the reduced bitstream

    is half as long as the original bitstream.

    Ethernet

    Hardware Overview:

  • 8/2/2019 Rfid Mobile Payment

    18/33

    Master Hardware Circuit Schematic(Click Here for Full Size)

    Ethernet Background:

    Ethernet is the term encompassing the primarily wire-based network protocols and specifications

    in use throughout the world today. It was originally developed in the early 1970s by XeroxPARC in order to facilitate the development of large computer networks. Ethernet uses a packet-frame architecture to transmit data (namely IP), and has methods available to deal with networkcongestion and reliable transport. Specifically, the pieces of the Ethernet that we used directlywere: cat5 twisted-pair cabling, TCP (Transmission Control Protocol), MAC (Media AccessControl), IP (Internet Protocol), HTTP (Hypertext Transport Protocol).

    Connecting these Ethernet devices together physically is twisted-pair cat5e cabling. We used100BASE-TX speed, which can transmit up to 100Mb/s over the line. This IEEE 802.3ustandard provides an efficient physical connection layer utilizing (not surprisingly) twisted pairsof cable to transmit bits. Clients receiving or transmitting using 100BASE-TX are responsible

    for synchronization and encoding bits into4B5B binary encoding.

    In IP, each device gets an IP address that uniquely identifies itself to the local network. Thisnumber is a 32-bit integer, usually organized into 4 bytes separated by periods, for examplex.x.x.x, where x represents a 0-255 number. What is called a subnet mask also exists, whichcreates a bitmask which determines which bits must be fixed during communication.A typicalsubnet mask might be 255.255.255.0 (corresponding to 0xFF.0xFF.0xFF.0x00), meaning that thedevice can only connect to other devices with address x.x.x.y, where y can be anything from0-255.

    Additionally, for device to device communication in IP, each device needs to have a MAC

    address. This 48-bit number (every byte delimited by a :) is a unique identifier for eachEthernet interface, and IP uses it so that packets can find their way to the destination. A MACaddress can be considered like a Social Security Number of a networked device. An exampleMAC address might be: 48:32:AE:4B:18:F6.

    Running on top of IP, we used TCP to provide reliable data transfer. This protocol, which isdesigned to maintain connection state, encapsulates its underlying data with a TCP header of20-60 bytes, which provides all of the information necessary for reliable transmission andcongestion control. Aside from this, we will leave it to the reader to research, since TCP is verywell documented elsewhere and not a significant portion of our project.

    Finally, the most visible method of communicating over Ethernet is via HTTP. Once we are atthe point that we can take the underlying levels previously described for granted, we can transmitdata. HTTP is the incredibly ubiquitous protocol used in the World Wide Web today, andspecifies methods of requesting and receiving text from an IP address. HTTP uses a headerformat that looks like:

    GET /process.php?rfid=491829822&pin=1234&amt=30 HTTP/1.1Host: 10.0.0.100

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Mega16_WIZ812MJ.gifhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Mega16_WIZ812MJ.gifhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Mega16_WIZ812MJ.gifhttp://www.cs.berkeley.edu/~kfall/EE122/lec05/sld014.htmhttp://www.cs.berkeley.edu/~kfall/EE122/lec05/sld014.htmhttp://www.cs.berkeley.edu/~kfall/EE122/lec05/sld014.htmhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.soi.wide.ad.jp/class/20020032/slides/11/15.htmlhttp://www.cs.berkeley.edu/~kfall/EE122/lec05/sld014.htmhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Mega16_WIZ812MJ.gif
  • 8/2/2019 Rfid Mobile Payment

    19/33

    As you can see, HTTP headers can be relatively simple. In reality, though, a typical web pagerequest uses many more optional parameters that give extra information to the server, but this isbeyond the scope of our project. In order to pass context information to the server, which wouldallow it to display dynamic content, HTTP specifies two methods: GET and POST. The latteressentially codes variables, hidden to the user, as part of the HTTP data, while the former simply

    appends the variable names and values to the end of the URL, using a format such as seen in thediagram.

    Our Implementation:

    Our Ethernet Chip: WIZ812MJ

    Luckily for us, we were able to get our hands on a Wiznet WIZ812MJ Ethernet developmentboard, which abstracted the design for every layer except HTTP. The WIZ812MJ board gave uspins and a physical Ethernet port, which was actually connected to a Wiznet W5100 chip, whichdid the actual network processing. So, instead of actually coding the complex state machinesassociated with each protocol, the W5100 chip did that for us, and we just had to communicatewith it via SPI (Serial Peripheral Interface).

    Communicating over HTTP:

    For our application, we sent HTTP GET requests, with our parameters encoded as GETvariables. First, we had to create a library for interfacing with the W5100, which we calledethlib.c. This library was created with a base from Brian Bryces AVR POP3 mail fetcher,which also used the W5100. In essence, this library provided the framework for setting up andconnecting to an Ethernet network. All of the code was modularized and parts that wereunnecessary to us were stripped so that it could be executed from another program, and someadditional features were added. In addition, Bryces code had some connection reliabilityproblems that were diagnosed, debugged, and fixed in the final library. Some of the features we

  • 8/2/2019 Rfid Mobile Payment

    20/33

    added was a connect_defaultTCP method, which just connected the device to predefinedparameters. This helped clean up the code a lot, and also made it easy to change the parameters.We decided against using the EEPROM storage available on the ATMega16 for networkparameter storage as Bryce did. This design decision was simply because we had enough spaceto commit them to data memory, and we did not want to add a whole set of functions dedicated

    to setting up the device from EEPROM. That said, a lot of time was still spent debugging anddocumenting the W5100 until we were satisfied we had an extremely reliable device andconnection established. We used 10.0.0.100 as the IP address of the server, and 10.0.0.101 as theIP address of the W5100.

    For HTTP communication, since the W5100 reports the entire HTTP response back (includingthe header), we needed a way of parsing out the data. The communication standard we designedhad the actual data stream start with a $ character, and end with a ^ character. This allowedus to efficiently discard the HTTP response header in C code, so that we would be left with thedata. The authentication response was also encoded in a specific format: if the authenticationwas not successful, we returned a status code of 0, followed by nothing else. If the

    authentication was successful, but the user did not have sufficient funds for the transaction, wedenoted this with status code 1, followed by the users name. If everything went well, and thetransaction succeeded, we return status code 2, followed by the users name. An examplesuccess, for example, looked like: $2Harry^.

    Ethernet Backend Operations:

    From the point when we had the Ethernet library and a data transfer protocol established, all thatwas left was to use it to transmit the data we collected from our user to the server. As previouslystated, we did this by encoding the data as GET variables: rfid, pin, and amt. rfidcorresponds to the RFID value, converted to a long, read in from the RFID method. pin

    corresponds to the entered pin number, and amt corresponds to the entered payment amount.This data was passed to a PHP script, process.php, which was running on a LAMP (Linux,Apache2, Mysql, PHP) server. The process.php scripts purpose was two-fold: authenticatingthe user and replying with the appropriate status code and authentication data, and also to logevery attempt made to access the system. We made sure to output something every timeprocess.php was accessedauthentication and payment successes were logged to the rfid.logfile, and anything else was logged to fail.log, along with the reason for failure. In addition, ifthere was a successful transaction, we also logged the information about the transaction into thedatabase, in a specific table called transactions. This presents users with a way to view theirtransaction history. Once all has been logged, and the response sent, the microcontroller thenparses the response and displays an appropriate message to the user.

  • 8/2/2019 Rfid Mobile Payment

    21/33

    User Database Snapshot(Click Here for Full Size)

    User Transaction Snapshot(Click Here for Full Size)

    Ethernet Pin Configuration:

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseDetail.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseDetail.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseDetail.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseTransaction.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseTransaction.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseTransaction.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseTransaction.pnghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/DatabaseDetail.png
  • 8/2/2019 Rfid Mobile Payment

    22/33

    J1 J2

    1 -> B.5 1 -> VCC

    2 -> B.6 3 -> B.7

    11 -> GND 4 -> B.4

    12 -> VCC 5 -> GND6 -> GND

    7 -> GND

    20 -> GND

    LCD:

    We decided to use a 16x2 LCD as it was readily available in the ECE 4760 lab. We had used theLCD in multiple labs previously and the documentation for the LCD can be foundhere.Information on how to connect the LCD and code to test the connections can be found in theSpring 2010, ECE 4760, Lab 1 pagehere.

    Keypad:

    We needed a keypad that had all the decimal digits (i.e. 0-9) and a couple of extra keys forReset and Cancel functions. We decided to use the 4x4 keypad as it was easily available inthe ECE 4760 lab. We connected Pins 1-8 on the keypad to Port A pins A.0-A.7. Moreinformation on wiring for the keypad and the code to test the connections can be found in theSpring 2010, ECE 4760, Lab 2 pagehere.

    Microcontroller Operations:

    We decided to use the Atmel Mega 16 microcontroller (as opposed to the Mega 644 that we hadused in all of our labs during the semester) simply because we did not need much on-chipmemory and the Mega 16 would count as a free chip in our budget (of course, we were alsocomfortably under-budget). We would like to extend our gratitude to Professor Land forproviding us with his excellently designed MCU board. We used the Max233CPP for the RS232connection during the debugging phases, but did not need it in the final project demonstration.The documentation for this board can be foundhere.

    http://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/LCD-64.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/LCD-64.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/LCD-64.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab1.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab1.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab1.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab2.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab2.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab2.htmlhttp://www.nbb.cornell.edu/neurobio/land/PROJECTS/Protoboard476/index.htmlhttp://www.nbb.cornell.edu/neurobio/land/PROJECTS/Protoboard476/index.htmlhttp://www.nbb.cornell.edu/neurobio/land/PROJECTS/Protoboard476/index.htmlhttp://www.nbb.cornell.edu/neurobio/land/PROJECTS/Protoboard476/index.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab2.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/lab1.htmlhttp://instruct1.cit.cornell.edu/courses/ee476/labs/s2010/LCD-64.pdf
  • 8/2/2019 Rfid Mobile Payment

    23/33

    Prototpe Board Schematic (Credit Prof. Land)

    Completed Prototpe Board Circuit (Credit Prof. Land)

    Port/Pin Configuration on MCU:

    Pin D.7 - 125[kHz] square wave to generate the RFID carrier frequency.Pin D.3 - External Interrupt 1 to accept filtered data from the RFID reception circuit.Port A - Keypad (Pins [1-8] on keypad correspond to Pins [A.0-A.7]).Port C - LCD (please refer to the LCD section of the report for the setup).Pins [B.4 - B.7] - Ethernet (please refer to the Ethernet section of the report for the setup).

    Standards:

    ISO/IEC 14443 or ISO/IEC 15693:

    The Cornell ID cards we use in this project are developed by HID. Specifically, the Cornell IDis a HID DuoProx II card that is also ISO 7810 compliant (magnetic strip). We did not need touse the magnetic strip feature. The card is also ISO/IEC 15693 compliant; ISO 15693 wasdeveloped in 1999 and has become the standard for contactless payment systems.

    ISO/IEC 18000:

    This is an international standard that describes a series of different RFID technologies. We useISO 18000-2, which describes the air interface communications below 135 [kHz].

    TCP/IP [taken from Wikipedia]:

    The Internet Protocol Suite (commonly known as TCP/IP) is the set of communicationsprotocols used for the Internet and other similar networks. It is named from two of the mostimportant protocols in it: the Transmission Control Protocol (TCP) and the Internet Protocol (IP),which were the first two networking protocols defined in this standard. Today's IP networkingrepresents a synthesis of several developments that began to evolve in the 1960s and 1970s,

  • 8/2/2019 Rfid Mobile Payment

    24/33

    namely the Internet and LANs (Local Area Networks), which emerged in the mid- to late-1980s,together with the advent of the World Wide Web in the early 1990s.

    Ethernet [taken from Wikipedia]:

    Ethernet is a family of frame-based computer networking technologies for local area networks(LANs). It defines a number of wiring and signaling standards for the Physical Layer of the OSInetworking model as well as a common addressing format and Media Access Control at the DataLink Layer. Ethernet is standardized as IEEE 802.3. The combination of the twisted pair versionsof Ethernet for connecting end systems to the network, along with the fiber optic versions for sitebackbones, is the most widespread wired LAN technology.

    mySQL [taken from Wikipedia]:

    MySQL is a relational database management system (RDBMS)[1] that runs as a serverproviding multi-user access to a number of databases.

    Results

    Speed of Execution:

    Our mobile-payment system prototype completed read an RFID tag in about a second, anddatabase access over Ethernet took less than 1 second. In all, the user would be strictly waitingonly for a total of about 2 seconds. Of course, this 2 seconds does not take into account the timethat the cashier takes to enter the amount, or the time that the user takes to enter his/her securitypin. In order to make the RFID reading quicker we would need to reduce the number of times wecheck the tag. We did not want to reduce the number of checks from 20 to say 5, but that would

    also reduce the accuracy of the system.

    Accuracy:

    We had an accuracy of 100%. We had no false positives, as we would check the same tag 20times in order to make sure that the ID is actually the same. However, depending on the angle inwhich the tag is held in front of the coil, or the distance of the angle from the coil, we did have afew false negatives. Now, we could account for this in software but we cant find any hardwaremethod to detect this scenario. In the eventual commercial application, when the tag is used asticker on the users phone, users could simply be prompted to bring their phone within a 1reading distance.

    Safety:

    This device does not pose any safety or health threats to its users. We have an insulating card-board box as the container for the system and the user interacts with the device only through thekeypad, which is made out of insulating plastic. There are power and Ethernet cables that areconnected to the device and these components cannot inflict harm upon a user as the user doesnot interact with these cables.

  • 8/2/2019 Rfid Mobile Payment

    25/33

    Interference:

    This is an issue that any communication medium deals with, however, as this is a Near-Field-Communication system, chances of interference from another 125[kHz] emitter are very slim.Also, if there are two tags on a users phone (say for different applications, both using 125[kHz]

    as the carrier frequency), the system would be unusable. However, in the general case, thissystem does not suffer from any interference issues.

    Usability:

    Our system is usable by most individuals without serious physical ailments. Individuals withcertain disabilities may find our device inconvenient to use, however we are in no waysdiscriminating against anyone. The device may be modified so as to offer auditory feedback forthe blind, Braille key-modification on the keypad and possibly voice recognition forauthentication for individuals who have lost their hands.

    ConclusionsWe feel that we have successfully implemented the first prototype of our mobile-paymentsystem. We achieved every goal that we had defined in our Project Proposal and at the end of afantastic five weeks we are extremely satisfied with our mammoth project! We will be lookingforward to adding all our friends to our database and stress-testing the system to iron out anycreases. Our next step will be to implement data transfer over a 2G network, after which, we willbe aim to add levels of encryption to make the system hack-proof.

    Relief, Satisfaction, Happiness!

    Ethical Considerations:

  • 8/2/2019 Rfid Mobile Payment

    26/33

    We ensured that our project properly follows the IEEE Code of Ethics and our project does notpose any ethical problems. We believe that all the decisions we made were fully ethical andfollowed the code of ethics guidelines. While working in lab we ensured that we met with thehighest safety and health standards, and made sure that we were not adversely affecting thewelfare of the public. Moreover, this device does not pose any safety or health threats to its

    users. We have an insulating card-board box as the container for the system and the user interactswith the device only through the keypad, which is made out of insulating plastic. There arepower and Ethernet cables that are connected to the device and these components cannot inflictharm upon a user as the user does not interact with these cables.While developing this project we did not come across any situations that involved perceivedconflicts of interest. In fact, as is expected in the ECE 4760 lab we were always willing to helpour fellow classmates whenever they asked for assistance in their projects. To our knowledge wehave been fully honest in making any claims or stating any estimates based on measured data.There was never any instance of bribery that we encountered. Also, as we have mentionedbefore, neither of us were experts in the fields of the various components we used in our project,and our goal was to improve the understanding of technology, its potential applications and

    eventual consequences. We hoped to use existing technologies to develop a device that can trulyserve as a proof-of-concept for a mobile-payment system. We had intended to maintain andimprove our technical competence and understand that we can undertake technological tasks forothers only if we are qualified by training, or after the full disclosure of pertinent limitations.

    We are open to advice, criticism and essentially any comments on our technical work. We willbe willing to acknowledge and pleased to correct any errors, and have made sure to creditproperly the contributions of others. Our device does not discriminate against any race, religion,gender, age or national origin. Individuals with certain disabilities may find our deviceinconvenient to use, however we are in no ways discriminating against anyone. The device maybe modified so as to offer auditory feedback for the blind, Braille key-modification on thekeypad and possibly voice recognition for authentication for individuals who have lost theirhands. During the course of our project, we made sure to avoid injuring any fellow classmates,their property or reputation by malicious action. On the contrary, we were always glad to helpour classmates out whenever we could be of assistance.

    Intellectual Property Considerations:

    As mentioned before, neither my partner nor I have taken courses in RFID design and in fact thiswas our first experience in working with the standard. We have made sure to cite any and alldesigns that we referenced (in our Acknowledgements section) and locally while describingthe module. There are many patents filed by the HID corporation itself on methods to read theircards (an example can be foundhere. Similarly there are many patents filed under mobilepayments (an example can be foundhere. However, we have violated no patents while workingon our project as (1) we have a specific concept for our final system (and this prototype is justthe first step in getting there), (2) this is an academic project that is following all FCC standards .We are very grateful to WIZNET for sampling us their WIZ812MJ module. They did not requireus to sign any non-disclosure as no code came with the device.

    Legal Considerations:

    http://www.google.com/patents?id=40ALAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=40ALAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=40ALAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=k0EZAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=k0EZAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=k0EZAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=k0EZAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=falsehttp://www.google.com/patents?id=40ALAAAAEBAJ&printsec=abstract&zoom=4#v=onepage&q&f=false
  • 8/2/2019 Rfid Mobile Payment

    27/33

    [From RFID Gazette] Part 15 of the FCCs rules for low-powered devices deals with RFIDregulations. RFID devices are referred to as intentional radiators. These low-powered devicesdo not raise a serious threat of interference with other devices and hence can be operated withouta license. All the same, RFID devices have to meet the RF emissions limitations and powerrestrictions as laid down by the FCC.

    Societal Impact:

    As Internet and ATM machines are unavailable in rural areas and penetration is low even inurban areas, the following problems exist:

    1. Individuals who have opened bank accounts in the cities have a problem accessing theirbank-services

    2. Individuals without bank-accounts who would like to avail of convenient services such asATM debit cards have to resort to cash for all their financial needs

    3. Migrants working in places elsewhere in the country have difficulties sending theirremittances home4. Financial institutions find it unviable to setup station in remote locations in the country

    5. Micro-finance lenders have trouble connecting with viable recipients6. Average Revenues Per User and margins for telecomm operators have been declining and

    the field needs Value Added Services if it is to sustain healthy growth

    An idea such as Mivo has the potential to solve these issues. We see many problems in todayspayment systems in developed countries- security and convenience (of say, peer-to-peerpayments) being the important ones. No system is perfect but the system we envision couldpotentially solve these issues.

    Acknowledgements:

    First and foremost we would like to extend our gratitude to Professor Bruce Land for preparingus to develop our Final Project through the course of the semester, have the lab open endlesshours for our projects and for helping us debug our problems. We want to thank Bruce for hiscode for the LCD libraries. We would also like to thank all the TAs for all their help andparticularly our Friday lab TA, Yuchen Zhang.We are extremely grateful toWIZNETfor donating us theirWIZ812MJmodule. We wouldrecommend any future ECE 4760 students to approach WIZNET for their networkingconsiderations!Finally, we are grateful to Craig Ross and Ricardo Goto (Spring 2006), whose comprehensivereport made it possible for us to complete our project in the given time, even though we had somany varied components to integrate into a single microcontroller chip. Their project can befound at:http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htm. Wefound the microID 125[kHz] reference guide through them which turned out to be the mosthelpful resource. The datasheet can be found at:http://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdf.

    http://www.wiznet.co.kr/en/http://www.wiznet.co.kr/en/http://www.wiznet.co.kr/en/ftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfhttp://www.wiznet.co.kr/en/
  • 8/2/2019 Rfid Mobile Payment

    28/33

    We would also like to thank Brian A. Bryce for his Ethernet code. Brian wrote POP3 Emailclient using W5100 and his code can be found at:http://babryce.com/w5100/emailV010.c. It isquite a co-incidence that Brian is actually a Cornell alumni (we found out from his stellar CV).

    Division of Work:

    Harsh Harry

    RFID Circuit RFID Receive Code

    RFID Transmit Code Ethernet Code

    State Machine Code State Machine Code

    System Integration System Integration

    Final Report Final Report

    Website Design

    Appendix

    Parts List

    PartManufacturer/

    SupplierDigiKey Part Number

    UnitCost

    Quantity Total

    RF ChokeJW Miller A BournsCompany

    5800-102-RC $1.33 1 $1.33

    Op Amp Texas Instruments TL084CN $0.63 1 $0.63

    DecadeCounter

    Texas Instruments CD4017BE $0.50 1 $0.50

    Dual DFlip Flop

    ECE 4760 Lab SN74HC74N $0.00 1 $0.00

    Diodes ECE 4760 Lab 1N4001 $0.00 1 $0.00

    Transistors ECE 4760 Lab 2N3906. 2N3904 $0.00 2 $0.00

    EthernetController

    WIZNET WIZ812MJ $0.00 1 $0.00

    LCD ECE 4760 Lab - $8.00 1 $8.00Keypad ECE 4760 Lab - $6.00 1 $6.00

    Breadoard ECE 4760 Lab - $6.00 1 $6.00

    PowerSupply

    ECE 4760 Lab - $5.00 1 $5.00

    CustomPC Board

    ECE 4760 Lab - $4.00 1 $4.00

    http://babryce.com/w5100/emailV010.chttp://babryce.com/w5100/emailV010.chttp://babryce.com/w5100/emailV010.chttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=M8301-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=M8301-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-1784-5-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-1784-5-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-2037-5-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-2037-5-NDhttp://www.wiznet.co.kr/en/http://www.wiznet.co.kr/en/ftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfhttp://www.wiznet.co.kr/en/http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-2037-5-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-1784-5-NDhttp://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=M8301-NDhttp://babryce.com/w5100/emailV010.c
  • 8/2/2019 Rfid Mobile Payment

    29/33

    PartManufacturer/

    SupplierDigiKey Part Number

    UnitCost

    Quantity Total

    Mega16 ECE 4760 Lab - $0.00 1 $0.00

    DIPsockets

    ECE 4760 Lab - $0.50 2 $1.00

    HeaderPins

    ECE 4760 Lab - $0.05 60 $3.00

    Misc:Caps/Resistors/Regulators

    ECE 4760 Lab - $0.00 1 $0.00

    Total $35.46

    Code Listings:

    Main Program Files:state_machine.cethlib.crfid.c

    HTTP Backend Files:eth_setup_476.shmysql_close.inc.phpmysql_connect.inc.phpprocess.php

    Libary and Header Files:ethlib.hrfid.hlcd_lib.clcd_lib.huart.cuart.h

    References

    MicroID 125[kHz] Reference GuideRicardo and Craigs websiteBryan Bryces websiteWIZ812MJ datasheetATMega16 datasheet

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/state_machine.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/state_machine.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/eth_setup_476.shhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/eth_setup_476.shhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_close.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_close.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_connect.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_connect.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/process.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/process.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.hhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://babryce.com/w5100/http://babryce.com/w5100/ftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfftp://ftp.efo.ru/pub/wiznet/WIZ812MJ%20Datasheet_V_1.0.pdfhttp://babryce.com/w5100/http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2006/cjr37/Website/index.htmhttp://ww1.microchip.com/downloads/en/DeviceDoc/51115F.pdfhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/uart.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/lcd_lib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.hhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/process.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_connect.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/mysql_close.inc.phphttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/eth_setup_476.shhttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/rfid.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/ethlib.chttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/state_machine.c
  • 8/2/2019 Rfid Mobile Payment

    30/33

    Contact Information

    Harsh [email protected]

    Harry [email protected]

    Related Resources

    Cornell University College of Engineering School of Electrical and Computer Engineering ECE 4760 Course Page Assignment Description

    Protoboard with Atmel Mega 16. This brings our project together.

    mailto:[email protected]:[email protected]:[email protected]:[email protected]://www.cornell.edu/http://www.cornell.edu/http://www.engineering.cornell.edu/http://www.engineering.cornell.edu/http://www.ece.cornell.edu/http://www.ece.cornell.edu/http://courses.cit.cornell.edu/ee476/http://courses.cit.cornell.edu/ee476/http://courses.cit.cornell.edu/ee476/labs/s2010/lab5.htmlhttp://courses.cit.cornell.edu/ee476/labs/s2010/lab5.htmlhttp://courses.cit.cornell.edu/ee476/labs/s2010/lab5.htmlhttp://courses.cit.cornell.edu/ee476/http://www.ece.cornell.edu/http://www.engineering.cornell.edu/http://www.cornell.edu/mailto:[email protected]:[email protected]
  • 8/2/2019 Rfid Mobile Payment

    31/33

    Our RFID Antenna - made of lacquered copper wire

    WIZ812MJ - connects our system to the Internet

  • 8/2/2019 Rfid Mobile Payment

    32/33

    Our 2-Line 16-Character LCD

    Our 4x4 Keypad

    Our 125[kHz] carrier wave(Click Here for Full Size)

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/125kHz_square_wave.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/125kHz_square_wave.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/125kHz_square_wave.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/125kHz_square_wave.jpg
  • 8/2/2019 Rfid Mobile Payment

    33/33

    RFID tag datastream to MCU(Click Here for Full Size)

    2010Cornell University

    http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Output_from_D_Flip_Flops.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Output_from_D_Flip_Flops.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Output_from_D_Flip_Flops.jpghttp://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Output_from_D_Flip_Flops.jpghttp://www.cornell.edu/http://www.cornell.edu/http://www.cornell.edu/http://www.cornell.edu/http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/hc448_heb47/hc448_heb47/images/photos/Output_from_D_Flip_Flops.jpg