Smart Home NFC

This project enables a generic NFC/RFID capability in our smart home that forms part of its larger 'whole home context'. This is effectively a stand-alone module that can be replicated several times within our smart home, should the need arise. NFC is one of the many objects modelled by our smart home, so making it aware of them is achieved simply by adding an entry to one of our smart home's configuration files.

The focus of this project is not on the technology. It is about providing the best smart home user experience for myself, my family, visiting relatives, friends and guests. We can easily give cheap NFC tags to people and configure them to gain access to our home, control the alarm, etc. The user experience is incredibly simple and intuitive.

To clarify, RFID is the process by which items are uniquely identified using radio waves and NFC is a specialised subset within the family of RFID technology. NFC is a branch of High-Frequency (HF) RFID and operates at 13.56MHz.


In keeping with our modular approach smart home, we are creating a generic, stand-alone NFC module that can be used for several different applications in our smart home. Our initial focus is to use them for:

  • Locking/unlocking our front door lock.
  • Enabling/disabling our smart thome integrated security alarm near the front door.
  • Enabling/disabling our the same security alarm in our main bedroom.

This module uses an IP interface and uses secure messaging to communicate with our Home Control System (HCS).

The NFC reader will simply scan for NFC tags and report any seen to our Home Control System (HCS). Our HCS provides all the intelligence and decision making in our smart home. Each tag is modelled as a key and each key is assigned to an owner. This means that using a tag will provide both occupancy and presence information to our wider smart home. All activity is also logged.

Each NFC module can be simply associated with an object that we wish to control, such as a door lock, a security alarm system, a garage door, to enable/disable an outside power socket, etc. This allows our smart home then know what action to take on seeing a valid tag presented. Because the module developed here is very cheap, we can deploy them in any situation that makes sense. Typically this means something that we wish to toggle on/off or open/closed quickly and easily, providing high security and a great user experience.


As part of our wider smart home, these NFC modules inherit the wider set of capabilities of our smart home, including:

  • Activity logging.
  • Errors and warnings, which can result in alerts or notifications, e.g. an incorrect code was entered.
  • Local and whole home voice announcements.
  • Text messaging.
  • Each NFC module is essentially a slave device and inherits all of the self-monitoring that this brings.
  • Invalid tags can trigger networked security cameras.


These NFC modules also feed into the wider whole home context and provide useful contextual information such as:

Voice Announcements

Our smart home can deliver zone based and whole home contextual voice announcements. Both the entrance hall and the drive (front door) are zones that are covered and it is possible to deliver these based on NFC events. For example, we could deliver an announcement such as "Alarm Enabled.", "The front door is now unlocked.", "You don't have permission to turn on the alarm James." or "Alarm disabled.".



A protected 12V dc power supply is assumed and this feeds into a local dc-dc convertor, which provides the required voltage to the Arduino Uno and Ethernet shield. This ensures that it all keeps working in the event of a mains power failure.


The Arduino Uno Ethernet shield requires a wired IP network connection and this will be connected directly to our smart home Gigabit Ethernet switch with a protected power supply.

Mounting Plate

Acrylic disc
All the components are hidden behind a 100mm or 120mm diameter acrylic disc which is mounted flush to the wall, to provide a very simple and clean interface. We are using both white and dark grey discs depending on where it being installed. In both cases, the LED indicators shine clearly though the 3mm thick disc.

Smoked glass disc
We are also looking at using smoked glass discs, to give a higher quality finish.

NFC Reader/Writer

MFRC-522 RC522 NFC RFID kit
For this project we are initially using a cheap MFRC-522 RC522 NFC RFID kit. Note that this board works with 3.3V dc and NOT 5V. The board measures 60mm × 40mm and costs just £3.50.

For the reader to properly infer presence in our home, the location needs to far enough away from the front door such that the front door in closed before the security alarm is deactivated using NFC. This is in support of our 'wasp in a box' presence algorithm.

Arduino Uno

Arduino and Ethernet shield

We have decided to use an Arduino Uno for this project as they are very cheap and easy to interface via an Ethernet shield. Arduinos are also very much fit and forget, with no regular software updates required. There are also libraries readily available to drive NFC readers/writers, with numerous examples and tutorials available.


  • The NFC module is typically connected using pins 9 to 13, Ground & 3V3.
  • Pin A2 drives a red LED to indicator an error (network, etc.)
  • Pin A3 drives an orange LED indicating invalid code entered.
  • Pin A4 drives green LED indicating valid code entered.
  • Pin A5 drives sounder.

Because we are using an Ethernet Shield (which also uses the SPI bus), we have used pin 6 for NFC_RST (reset) and pin 7 for NFC_SS (slave select).


The NFC mounting plate has green, orange and red LEDs behind it, to keep a simple external appearance. These shine through the mounting plate and are invisible unless lit. The red LED indicates an error, such as a network problem and stays lit until the problem goes away. The orange LED indicates and invalid tag and a green LED indicates a valid tag. The latter two LEDs light up for 2 seconds.

5V sounder
This module also incorporates a low volume 5V dc sounder to provide some audible feedback as well. Since this is on for very short periods of time and uses just 22mA at 5V, it could be directly connected to the Arduino pin. We actually use a 91Ω resistor in series though, to limit the current to 13mA.

Three short beeps indicate a valid code and one long beep indicates an invalid code. The sounder is mounted behind the mounting plate and is also not visible.

NFC Tags

NFC tags come in many forms but most are tiny. Some are really thin and can be stuck to the back of smart phones or hidden inside a Smartphone case. We also have tags that attach to key rings and tags that are credit card sized.

We are not tying NFC tags to specific devices, services or hardware. We can centrally provision and manage one key per person and it will work across all NFC enabled features in our smart home. Each person can also be restricted in what they can do based upon the roles assigned to them.


Our Arduino scans for any tag, meaning we can use it to track who has gained access. This is useful context that can be used by our smart home to adapt it's behaviour accordingly. For example our in-laws could use this control the alarm when we go on holiday.

Another use case might be when guests come to visit. In this case we want to use codes with a limited life time and our smart home supports this concept too :-) We also model 'one time' codes, which can be used just once.

Our software sends the tag ID to our Home Control System (HCS). Our HCS will then check the ID and provide a response indicating whether the code was valid or invalid. The module will then indicate locally whether the code was accepted or not. This will be achieved via the red and green LEDs that light for 2 seconds. For valid codes the local sounder will 'beep' once and for invalid codes it will 'beep' three times. If the user has been 'locked out', the orange LED will flash.

The valid codes are stored as part of our smart home user model. Removing, adding or changing codes is simply a matter of updating a configuration file but this will also be automated.

The Arduino MFRC522 library is described and available here. The chosen microcontroller and card reader uses SPI for communication.


From initial concept to working and test prototype fully integrated into our smart home took less than 5 hours work :-) The video below shows our prototype in operation. The NFC module spots the presented tag and sends off the key data to our smart home for validation. Our smart home responds that this is a valid tag and the module indicates that it was accepted via the green LED and the 3 beeps. It all happens super quickly but our smart home processes several 100,000's of events each day in just a few milliseconds and this is just one more.

The next steps are:

  1. 3D-print a mount for the NFC PCB, sounder and LEDs, to fix them to the face-plate.
  2. Link in our contextual voice announcements.
  3. Test security camera triggering.
  4. Enable local and remote key management via our Artificial Intelligence.
  5. Explore what complex interactions are possible via Smartphones.


NFC tags provide a simple and easy way to provide secure access control to our smart home and the features and services within it. We plan for the same tags to be used to enable and disable our smart home alarm system. They are very cheap to implement and enable a great user experience. The completed module as shown here cost less than £20. Anyone can use them without any real learning.

Because the tags are unique and assigned to individuals, they can be used across all NFC modules in our smart home, regardless of the function it serves. This also means we can track who is using them and this feeds into the wider context of our smart home.

The device is both an NFC reader and writer, so is capable of more complex interactions with tags and even Smartphones. This is an area we are now exploring in more detail.

Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest