San José State University
College of Engineering/Electrical Engineering
EE174: Analog Peripheral for Embedded Systems
Section 01, Fall 2016
LAB5 Near Field Communication
Goals:
- The goal of the experiment is to program NFC tags with basic functionalities using an Android phone and a NFC tag.
- Understand basic principle and knowledge of NFC.
Required Equipment:
- An android phone
- NFC tags (cheaply available online)
- NFC Tools: This is used to read and write NFC tags.
( and
NFC Tasks: This is used to respond the tag i.e. perform the specific sets of instructions that we did using the NFC tools app.
(
application should be installed on your phone. Go to google play store, search for the applications and install it.
References:
What is NFC?
Near Field Communication (NFC) is a standards-based short-range wireless connectivity technology that makes life easier and more convenient for consumers around the world by making it simpler to make transactions, exchange digital content, and connect electronic devices with a touch. NFC is compatible with hundreds of millions of contactless cards and readers already deployed worldwide.
Figure 1: NFC Tech
Figure 2: Inside NFC Tag
NFC tags are considered passive devices, which means that they operate without a power supply of their own and are reliant on an active device to come into range before they are activated. The trade-off here is that these devices can’t really do any processing of their own, instead they are simply used to transfer information to an active device, such as a smartphone.In order to power these NFC tags, electromagnetic induction is used to create a current in the passive device. The basic principle is that coils of wire can be used to produce electromagnetic waves, which can then be picked up and turned back into current by another coil of wire. The active devices, such as your smartphone, are responsible for generating the magnetic field. This is done with a simple coil of wire, which produces magnetic fields perpendicular to the flow of the alternating current in the wire. The strength of the magnetic field can be adjusted by varying the number of turns in the wire coil, or increasing the current flowing through the wire. However, more current obviously requires more energy, and very high power requirements would not be desirable for use in battery powered mobile technologies. Hence why NFC operates over just a few inches, rather than the many meters that we’re used to with other types of wireless communication.
Experiment:
Note: The NFC tags are only compatible with android phones. The NFC tags should be compatible with Windows Phone OS (Lumia etc.) and Blackberry phones though I haven’t tested their compatibility with them. You can easily check your phone’s compatibility by going online and entering your model. Apple iPhone 6 and iPhone 6 plus and above have nfc antennas, but their use is strictly limited by Apple. They are used for Apple Pay and the NFC chip cannot be used by the public.
- STEPS TO IDENTIFY THE TAGS:
Here we are going to simply identify the tags that we will be using throughout the experiment.
- Open the NFC tools application on your android phone.
- Place the NFC tag behind the back of the phone. Your phone should make a beep sound which states that the phone has read your tag.
- Once the phone reads your tag, it will display all the information regarding the tag or any previous information stored on the tag.
- Identifying the tag helps us to find details regarding the type of tag that we would be using, the memory information of the tag, Is the tag password protected?etc.
- STEPS TO WRITE ON THE TAGS:
Here we would be writing data on to NFC tags to perform simple operations
- Open the NFC tools applications on your android phone
- Click on the “write” tab and select “Add a record” from the list of options specified.
- “Add a record” allows you to do number of things once you select the option.
Some options are:
- Text: This allows you to add custom text.
- URL: This allows you to add URL link.
- Social networks: This options allows you to select a social networking site from a number of different social networking sites. Once you enter the desired username, the profile of that person will open up.
There are various other options you can select. We will be sticking to writing a text on to NFC tags.
- After clicking on text options, enter the text in the text box and click OK.
- Then click on the “write” option and place the tag behind the phone.
- Once your screen displays “write complete” option, it means that we have successfully written data on the NFC tag.
- STEPS TO PERFORM OPERATIONS:
- Open the NFC tasks application on the android phone.
- Place the tag behind the phone.
- The phone will read the data from the phone, process it, and perform the desired operation. In our case it will display the text that we entered in the above step.
In this way we can simple read, write and perform operations using NFC tags.