designing a food spoilage monitoring device that uses near field

97
ECE 4600 Group Design Project Designing a Food Spoilage Monitoring Device that uses Near Field Communication Techniques by Group 04 Adam Dueck Bozhou Du Damilola Odunsi Darlington Ogundu Shucheng Zheng Final report submitted in partial satisfaction of the requirements for the degree of Bachelor of Science in Electrical and Computer Engineering in the Faculty of Engineering of the University of Manitoba Academic Supervisor(s) Dr. Gregory Bridges, Ph.D., P.Eng., Sharmistha Bhadra, M.Sc. Department of Electrical and Computer Engineering University of Manitoba Date of Submission March 10, 2014 Copyright 2014 Adam Dueck, Bozhou Du, Damilola Odunsi, Darlington Ogundu, Shucheng Zheng

Upload: dinhnguyet

Post on 11-Feb-2017

221 views

Category:

Documents


2 download

TRANSCRIPT

  • ECE 4600 Group Design Project

    Designing a Food Spoilage Monitoring Device thatuses Near Field Communication Techniques

    byGroup 04

    Adam DueckBozhou Du

    Damilola OdunsiDarlington Ogundu

    Shucheng Zheng

    Final report submitted in partial satisfaction of the requirements for the degree of

    Bachelor of Science in Electrical and Computer Engineering in the

    Faculty of Engineering of the University of Manitoba

    Academic Supervisor(s)

    Dr. Gregory Bridges, Ph.D., P.Eng., Sharmistha Bhadra, M.Sc.Department of Electrical and Computer Engineering

    University of Manitoba

    Date of Submission

    March 10, 2014

    Copyright 2014 Adam Dueck, Bozhou Du, Damilola Odunsi, Darlington Ogundu,Shucheng Zheng

  • NFC Food Spoilage Monitoring Device

    Abstract

    Food spoilage has detrimental effects both in terms of health risks for consumers as well

    as increased costs for producers. This prompted the development of a system for detecting

    food spoilage that was compact, low-maintenance, and simple to manufacture. The design

    of said system is discussed in this report. The above-mentioned requirements were met

    by creating a battery-less, chip-less, NFC-based sensor capable of detecting gases that are

    released by spoiling food through changes in pH.

    The pH sensor can be broken down into two main components: a pair of electrodes

    and an LC resonant circuit. The electrodes comprise a sensing electrode and a reference

    electrode, both of which are coated with hydrogel. The resonant circuit contains a variable

    capacitor and an inductive coil. The gases that are released by the decaying food are

    absorbed by the hydrogel, causing a change in its pH. These changes in pH are marked by

    the resulting change in the natural frequency of the resonant circuit. A method for wirelessly

    measuring these changes in frequency using NFC was also developed. A measured change in

    the resonant frequency can therefore be used to determine if a change in pH has occurred,

    thereby marking food spoilage.

    The values of the pH sensor electronic components were calculated and the circuit was

    simulated in Multisim. The schematic was developed into a PCB design using Ultiboard,

    and the pH sensor tag was manufactured. The sensor was tested by applying a DC voltage

    in place of the electrodes, and a linear change of frequency with voltage was determined

    using an impedance analyzer. The electrodes were then fabricated, and connected to the

    tag, completing the pH sensor. Meanwhile the components for controlling and powering

    the interrogator were designed, simulated in Multisim, and soldered to a prototype board.

    During final testing, readings were taken with both the interrogator and an impedance

    analyzer. We were unable to obtain the expected results with the interrogator. However,

    the tests performed with the impedance analyzer showed a clear linear relationship between

    the resonant frequency of the sensor and pH, proving that our NFC-based pH sensor works.

    - i -

  • NFC Food Spoilage Monitoring Device

    Contributions

    Ad

    amD

    uec

    k

    Boz

    hou

    Du

    Dam

    ilol

    aO

    du

    nsi

    Dar

    lin

    gton

    Ogu

    nd

    u

    Shu

    chen

    gZ

    hen

    g

    Fabrication of the Electrodes Testing of the Electrodes Design of Glass Chamber Design build and test hand wound coil Design and test printed spiral coil Design build and test resonant circuit with hand wound coil Design build and test resonant circuit with printed spiral coil Designing the Switch Controller (Interrogator) Building the Switch Controller (Interrogator) Designing the Data Acquisition System (Interrogator) Testing the Interrogator Setup

    Legend: Lead task Contributed

    - ii -

  • NFC Food Spoilage Monitoring Device

    Acknowledgements

    We would like to thank our supervisors, Dr. Bridges and Sharmistha Bhadra, for their

    advice and support throughout the course of this project. We would also like to thank Tao

    Chen for milling our PCB, Sinija Janjic for ordering our materials, Cory Smit for fabricating

    our glass chamber and Daniel Card for helping us with our design.

    - iii -

  • NFC Food Spoilage Monitoring Device TABLE OF CONTENTS

    Table of Contents

    Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i

    Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii

    Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

    List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

    List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

    Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x

    1 Introduction 1

    1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.2 Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.3 Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    1.4 Report Organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    2 Background 4

    2.1 Food Spoilage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    2.2 pH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.3 Electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.4 NFC Technololgy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.4.1 NFC System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.5 Time Domain Gating Interrogation . . . . . . . . . . . . . . . . . . . . . . . 10

    2.5.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    2.5.2 Amplitude-Based Approach . . . . . . . . . . . . . . . . . . . . . . . 12

    2.5.3 Frequency-Based Approach . . . . . . . . . . . . . . . . . . . . . . . 12

    3 Design Methodology 13

    3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    3.2 Electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    - iv -

  • NFC Food Spoilage Monitoring Device TABLE OF CONTENTS

    3.2.1 Fabrication of Solid-State Reference Electrode . . . . . . . . . . . . 14

    3.2.2 Interfacing Electrodes to the Tag . . . . . . . . . . . . . . . . . . . . 14

    3.3 NFC Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.3.1 Varactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.3.2 Sensor Coil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    3.3.3 Resonant Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    3.4 Interrogator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    3.4.1 Portable Interrogator . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    3.4.2 Stationary Interrogator . . . . . . . . . . . . . . . . . . . . . . . . . 25

    4 Testing Procedure and Results 37

    4.1 Test Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    4.1.1 DC Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    4.1.2 Impedance Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    4.1.3 Function Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    4.1.4 Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    4.1.5 Pulse Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    4.1.6 Digital Multimeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    4.2 Individual Component Testing . . . . . . . . . . . . . . . . . . . . . . . . . 39

    4.2.1 Electrodes testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    4.2.2 Sensor Coil testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    4.2.3 NFC Tag Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    4.2.4 TDG Interrogator Coil Testing . . . . . . . . . . . . . . . . . . . . . 55

    4.2.5 Testing of Interrogator Timings . . . . . . . . . . . . . . . . . . . . . 56

    4.2.6 Switch Controller Testing . . . . . . . . . . . . . . . . . . . . . . . . 59

    4.2.7 Data Acquisition System Testing . . . . . . . . . . . . . . . . . . . . 65

    4.3 Final Design Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    4.3.1 Interrogator and NFC Tag Testing . . . . . . . . . . . . . . . . . . . 66

    4.3.2 pH Sensor and Impedance Analyzer Testing . . . . . . . . . . . . . . 70

    5 Conclusions 76

    References 78

    Appendix A Appendix A 78

    Appendix B Appendix B 79

    - v -

  • NFC Food Spoilage Monitoring Device TABLE OF CONTENTS

    Appendix C Curriculum Vitae 83

    - vi -

  • NFC Food Spoilage Monitoring Device LIST OF FIGURES

    List of Figures

    2.1 The Logarithmic pH Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.2 NFC Tag Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.3 Time domain gating-based interrogator block diagram . . . . . . . . . . . . 11

    2.4 Time domain gating timing diagram . . . . . . . . . . . . . . . . . . . . . . 11

    3.1 Electrodes immersed in hydrogel . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.2 Varactor capacitance vs reverse bias voltage curve . . . . . . . . . . . . . . 16

    3.3 Inductance value of the sensor coil measured by the impedance analyzer . . 17

    3.4 Single layer planar square spiral coil . . . . . . . . . . . . . . . . . . . . . . 20

    3.5 An equivalent circuit diagram of the PH sensor and coupled interrogator coil 21

    3.6 Portable Interrogator Receiver - design 1 block diagram . . . . . . . . . . . 24

    3.7 Portable Interrogator Receiver design 2 block diagram . . . . . . . . . . . . 25

    3.8 Stationary interrogator setup block diagram . . . . . . . . . . . . . . . . . . 27

    3.9 Simulation of 555 timers in astable configuration . . . . . . . . . . . . . . . 29

    3.10 Simulation of 555 timers in monostable configuration . . . . . . . . . . . . . 30

    3.11 Configuration of the Delay Chip . . . . . . . . . . . . . . . . . . . . . . . . 31

    3.12 Simulation Results of the Delay Chip . . . . . . . . . . . . . . . . . . . . . . 32

    3.13 A: 10 Hz sine wave with noise in time domain . . . . . . . . . . . . . . . . . 35

    3.14 B: 10 Hz sine wave with noise in frequency domain . . . . . . . . . . . . . . 35

    3.15 Schematic of the +5 V voltage regulator . . . . . . . . . . . . . . . . . . . . 36

    3.16 Schematic of the -5 V voltage regulator . . . . . . . . . . . . . . . . . . . . 36

    4.1 Complete test setup with multimeter attached (voltage shown is still changing) 40

    4.2 pH level vs. voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    4.3 Setup of the testing of the hand wound air cored coil . . . . . . . . . . . . . 43

    4.4 Hand wound air core coil . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    - vii -

  • NFC Food Spoilage Monitoring Device LIST OF FIGURES

    4.5 Inductive value of the hand wound coil . . . . . . . . . . . . . . . . . . . . . 46

    4.6 Self-resonant frequency of the hand wound coil . . . . . . . . . . . . . . . . 46

    4.7 Milled PCB coil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    4.8 Top view NFC tag testing set up . . . . . . . . . . . . . . . . . . . . . . . . 49

    4.9 Front view NFC tag testing set up . . . . . . . . . . . . . . . . . . . . . . . 49

    4.10 Top view of the resonant circuit . . . . . . . . . . . . . . . . . . . . . . . . . 51

    4.11 Front View of the resonant circuit . . . . . . . . . . . . . . . . . . . . . . . 51

    4.12 Resonant frequency when bias voltage is 0 V . . . . . . . . . . . . . . . . . 53

    4.13 Resonant frequency when bias voltage is 0.4 V . . . . . . . . . . . . . . . . 53

    4.14 Resonant frequency versus voltage applied to NFC tag . . . . . . . . . . . . 54

    4.15 Largest operational distance for sensor coil and interrogator coil . . . . . . . 55

    4.16 Testing substitute resonator with impedance analyzer . . . . . . . . . . . . 57

    4.17 Input (blue) and output (pink) of the first flip flop . . . . . . . . . . . . . . 60

    4.18 Input (blue) and output (pink) of the first 555 timer . . . . . . . . . . . . . 61

    4.19 Input (pink) and output(blue) of the programmable delay chip . . . . . . . 62

    4.20 Output 1 (pink) and output 2(blue) to the switches . . . . . . . . . . . . . . 63

    4.21 Unit test of output 1 and a switch . . . . . . . . . . . . . . . . . . . . . . . 64

    4.22 Unit test of output 2 and a switch . . . . . . . . . . . . . . . . . . . . . . . 65

    4.23 Natural frequency obtained when voltage is 0 V . . . . . . . . . . . . . . . . 67

    4.24 Natural frequency obtained when voltage is 0.1 V . . . . . . . . . . . . . . . 68

    4.25 Natural frequency obtained when voltage is 0.2 V . . . . . . . . . . . . . . . 69

    4.26 Estimated pH vs natural frequency . . . . . . . . . . . . . . . . . . . . . . . 70

    4.27 Final test setup with the impedance Analyzer . . . . . . . . . . . . . . . . . 71

    4.28 Test result with ammonia . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    4.29 Test result with deionized water . . . . . . . . . . . . . . . . . . . . . . . . . 73

    4.30 Test result with acetic acid . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    4.31 Plot of pH vs resonant frequency . . . . . . . . . . . . . . . . . . . . . . . . 75

    A.1 The Built Switch Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    - viii -

  • NFC Food Spoilage Monitoring Device LIST OF TABLES

    List of Tables

    1.1 Device Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    3.1 Core Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    4.1 Voltage responses of the electrodes to varied pH levels . . . . . . . . . . . . 41

    4.2 Dimensions of the Air Core Coils . . . . . . . . . . . . . . . . . . . . . . . . 44

    4.3 Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    B.1 Budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    - ix -

  • NFC Food Spoilage Monitoring Device LIST OF TABLES

    Nomenclature

    - x -

  • NFC Food Spoilage Monitoring Device LIST OF TABLES

    Abbreviations Description

    ADC Analog to Digital.

    Ag/AgCl Silver/Silver Chloride.

    CW Continuous Wave.

    DC Direct Current.

    NFC Near Field Communication.

    IC Integrated Circuit.

    ISM Industrial, Scientific, Medical.

    KCl Potassium Chloride.

    LC Inductor-capacitor.

    LCD Liquid-crystal Display.

    M Molar Concentration.

    MMO Mixed-metal Oxide.

    NaCl Sodium Chloride.

    NH4OH Ammonium Hydroxide.

    PCB Printed Circuit Board.

    pH Power of Hydrogen.

    PVC Polyvinyl Chloride.

    Q Factor Quality Factor.

    RF Radio Frequency.

    RFID Radio Frequency Identification.

    TDG Time Domain Gating.

    THF Tetrahydrofuran.

    TMAO Trimethylamine-N-oxide.

    TTL Transistor-transistor Logic.

    VCXO Voltage Controlled Crystal Oscillator.

    Vpp Peak-to-peak Voltage.

    - xi -

  • NFC Food Spoilage Monitoring Device LIST OF TABLES

    Term Definition

    Anode Electrode that is oxidized.

    Bias Voltage An applied voltage used to set the operating point

    of an electronic component.

    Cathode Electrode that is reduced.

    Cutoff Frequency The frequency that marks the division between the

    pass band and the stop band of a filter. For a low

    pass filter, frequencies less than the cutoff will be

    passed while higher frequencies will be blocked.

    Continuous Wave An electromagnetic wave of constant frequency

    and amplitude.

    Hydrogel A hydrophilic polymer; gel with a high water content.

    ISM band Industrial, scientific and medical band; An

    unregulated frequency band that is often used for

    low-power, short-range communication technologies,

    including NFC.

    Resonant Frequency The frequency at which impedance is maximum

    when plotting the frequency response of an resonator.

    As Q increases, the resonant frequency approaches

    the natural frequency.

    Natural Frequency The frequency at which a resonator will tend to

    oscillate under zero input conditions. As Q

    increases, the resonant frequency approaches the

    natural frequency.

    Resonator A system that naturally oscillates at a certain

    frequency with greater amplitude than other

    frequencies.

    Reduction When one chemical species gains electrons in a

    chemical reaction.

    LC Resonator A resonator that is composed of an inductor

    and a capacitor.

    Lipolysis The chemical breakdown of lipids.

    Power of hydrogen A logarithmic scale of the concentration of

    hydrogen ions in an aqueous solution.

    - xii -

  • NFC Food Spoilage Monitoring Device LIST OF TABLES

    Term Definition

    Time Domain Gating An approach to wireless interrogation;

    transmit and receive operation are separated into

    discrete phases, with a short time delay in between

    the two.

    Molar Concentration The concentration of a solution in moles of solute

    per liter of solvent

    Near Field Communication A form of communication based on magnetic

    coupling between inductive coils

    Oxidation When one chemical species loses electrons in a

    chemical reaction.

    Printed circuit board Acts as a platform for electronic components, with

    copper traces acting as interconnects and a

    non-conductive substrate providing mechanical

    support.

    Proteolysis The chemical breakdown of proteins.

    Syneresis When liquid is extracted or expelled from a gel

    Transistor-transistor Logic A type of digital circuit based on bipolar junction

    transistors. Typical TTL circuits are powered with

    a 5V supply, with logic low between 0V and 0.8V

    and logic high between 2.2V and 5V.

    Varactor A special purpose diode that acts as a variable

    capacitor controlled by a DC reverse bias voltage.

    - xiii -

  • NFC Food Spoilage Monitoring Device 1. Introduction

    Chapter 1

    Introduction

    1.1 Motivation

    Every year, food spoilage leads to wastage and millions of food poisoning cases worldwide.

    The absence of adequate food monitoring technology could compromise the quality of food

    products during transit. The ability to wirelessly monitor the quality of food produce

    reduces costs for producers and ensures consumers health and safety hence making food

    quality measurement an indispensable requirement. Current means of monitoring food

    quality are through the use of sensors which observe changes in temperature, release of

    gases (such as ammonia) and secretion of enzymes. These methods are not entirely practical

    due to cost-constraints, bulky proportions, complex fabrication processes and the need for

    regular maintenance. Due to the aforementioned reasons, we were motivated to develop a

    simple and cost-effective wireless food monitoring device.

    1.2 Design Overview

    This device employs Near Field Communication (NFC) and comprises a pH sensor and an

    external interrogator that interact to provide information on the quality of food products.

    - 1 -

  • NFC Food Spoilage Monitoring Device 1.3 Specification

    The pH sensor is further divided into electrodes and resonant circuit. The electrodes of

    the sensor are coated with hydrogel; a hydrophilic polymer which acts as an electrolytic

    solution where the electrodes interact. The resonant circuit consists of an inductive coil

    and sensor electronics. The interrogator consists of an inductive coil, discrete components,

    a switch controller and a data acquisition system. The interrogator uses a time-domain

    gating method to interact with the pH sensor through inductive coupling.

    In this project, the goal was to detect food spoilage through pH change. The change

    in pH of the food being tested causes a change in the voltage across the electrodes and this

    voltage change varies the capacitance of the NFC tag. The NFC tag will therefore resonate

    at a different frequency as pH changes. The interrogator will obtain this new frequency

    through inductive coupling which will be used to detect pH changes. This will enable the

    user to determine whether or not food spoilage has occurred.

    1.3 Specification

    The table below shows the specifications of the entire food spoilage monitoring device. They

    have been revised based on the results obtained from our final testing.

    Table 1.1: Device Specifications

    Parameter Value

    Minimum Interrogation Distance 3 cm

    Resonant Frequency 12.37 - 13.48 MHz

    Resonance shift due to pH 1 MHz

    pH Operating Range 2-12 pH

    pH Sensing Accuracy 0.5 pH

    Maximum Sensor Length 9 cm

    Maximum Sensor Width 5 cm

    Maximum Sensor Thickness 0.3 cm

    - 2 -

  • NFC Food Spoilage Monitoring Device 1.4 Report Organisation

    1.4 Report Organisation

    This report is organised in order to provide the reader with an understanding of the design

    and implementation of the food spoilage monitoring device. Chapter 2 is an overview of the

    concepts used in our design and Chapter 3 provides reasons for our design choices. Chapter

    4 deals with the testing procedure and results obtained from our design and Chapter 5

    discusses the conclusions made from our project.

    - 3 -

  • NFC Food Spoilage Monitoring Device 2. Background

    Chapter 2

    Background

    2.1 Food Spoilage

    Food spoilage is the process in which food deteriorates over time. It is characterised by any

    change in the food product that renders it unattractive and unsuitable for consumption [1].

    This process leads to food becoming inedible and sometimes poisonous. Spoilt food is unfit

    for human consumption and if consumed, can lead to serious illness and sometimes death.

    Due to the negative effects of food spoilage, there are a number of preservation techniques

    in place to prevent food spoilage [1]. Traditional methods of preserving food like drying,

    heating and fermentation are aimed at deactivating the spoiling microorganisms and they

    work to an extent because microbial spoilage is the most common cause of food spoilage [1].

    There are various specific causes of food deterioration and they differ depending on the

    food. Specifically in perishable food products like fish, their unique chemical composition

    makes them prone to enzymatic degradation of proteins, lipids and trimethylamine-N-oxide

    (TMAO) [2]. From the time the fish is caught, chemical processes begin to occur that could

    eventually lead to food spoilage. The fish begins to degrade using its own enzymes and

    then its proteins start to decompose. There is also significant bacterial deterioration that

    - 4 -

  • NFC Food Spoilage Monitoring Device 2.2 pH

    begins right after death. However, the effect of this bacterial growth is noticed only after

    a particular point. As the microbial activities of the fish increase, the enzymes in the fish

    cause it to soften [2].

    In milk, a similar chemical process is experienced. Specifically oxidation, lipolysis,

    proteolysis and syneresis occur during the food spoilage process. Generally, food spoilage

    encourages the growth of microbes and yeast. The growth of these substances changes the

    chemical composition of the food being tested making them more acidic or basic depending

    on the food. Due to the change in the acidity of the food and the general occurrence of

    microbial activities in food as spoilage occurs, pH could be used to monitor food spoilage [3].

    2.2 pH

    pH is a measure of the hydrogen ion concentration in a substance. It is the measure of

    the acidity or alkalinity of a solution. Based on the definition by Bronsted and Lowry, an

    acid is a substance capable of donating protons to other molecules or ions while a base is

    a substance that is capable of accepting such protons [4]. All acid base reactions can be

    written as follows:

    HA+B BH+ +A (2.1)

    Acid + base = conjugate acid of base B + conjugate base of acid HA+

    pH can be measured in both aqueous and non-aqueous solutions using different scales.

    pH measurements are very important in a multitude of applications and in our specific

    case, it will be used to measure the level of food spoilage. Specifically, the pH of an aqueous

    solution can be calculated using the following equation:

    pH = log[H+] (2.2)

    - 5 -

  • NFC Food Spoilage Monitoring Device 2.2 pH

    Where [H+] is the concentration of hydrogen ions in mol/L.

    In order to measure the pH of a solution, very precise pH meters or pH indicators could

    be used. These pH meters give very specific results regarding the pH of the solution being

    tested. They usually include a silver chloride reference electrode and a glass pH electrode.

    Details about the electrodes will be covered later on in section 2.3. pH indicators on the

    other hand give a visual determination of the pH of the material under test. pH indicators

    undergo the following reaction:

    HInd+H2O H3O+ + Ind (2.3)

    Where HInd represents the acid form of the indicator and the Ind represents the

    conjugate base of the indicator. The ratio of the conjugate base of the indicator to the acid

    form of the indicator determines the colour of the solution and the eventual colour of the

    solution determines its pH. There are various pH indicators that have varying transitional

    pH levels. They can be used to detect varying levels of acidity or alkalinity of a substance.

    The logarithmic pH scale used for measuring pH in aqueous solutions is shown below:

    Fig. 2.1: The Logarithmic pH Scale

    As shown in Figure 2.1, aqueous solutions with pH values below 7 are considered acidic

    and those above 7 are considered basic. The higher the pH value of a substance, the more

    basic it is and the lower the pH value of a substance, the more acidic it is. For example,

    acidic items like apple juice have a pH of 2.9 while neutral liquids like distilled water have

    - 6 -

  • NFC Food Spoilage Monitoring Device 2.3 Electrodes

    a pH of 7.

    2.3 Electrodes

    Electrodes are solid conductors used in electrochemical measurements to obtain information

    on the induced potential of an electrolyte [5]. They are used in cathode and anode pairs.

    The silver/silver chloride electrode used in this design is a cathode and it acts as a reference

    electrode that undergoes reduction in an electrolyte. The mixed-metal oxide electrode is

    an anode and it acts as a sensing electrode, which undergoes oxidation. The following

    expression is used to calculate the potential measured by electrodes:

    E =RT

    Fln(

    aH+

    (pH2/p0)1/2) =2.303RT

    FpH RT

    2Fln(

    pH2p0

    ) (2.4)

    Where E is the measured potential

    R is the universal gas constant

    T is the temperature (Kelvin)

    F is the Faraday constant

    aH+ is the activity of hydrogen ions

    pH2 is the partial pressure of the hydrogen gas

    p0 is the standard pressure.

    A solid-state reference electrode and a mixed-metal oxide (MMO) sensing electrode are

    used in this design. The mixed-metal oxide electrode is used for detection since the potential

    across its terminal changes in response to fluctuations in pH level. The solid-state reference

    electrode does not respond to changes in pH and acts as a reference for the MMO electrode.

    A hydrophilic polymer called hydrogel is used to coat the electrodes. Hydrogel absorbs

    gases that are released during food spoilage. It also acts as an electrolytic solution where

    - 7 -

  • NFC Food Spoilage Monitoring Device 2.4 NFC Technololgy

    ions are exchanged between the reference and mixed-metal electrodes to provide voltage

    changes.

    2.4 NFC Technololgy

    Near Field Communication (NFC) is a wireless communication technology that is used to

    exchange data in a short range. The NFC technology implemented in the food spoilage

    monitoring device is based on inductive coupling. It comprises a transmitter coil and a

    receiver coil. The alternating current in the transmitter coil generates a magnetic field

    which couples to the receiver coil.

    The amount of energy transferred through inductive coupling from the transmitter to

    the receiver depends on the coupling factor between the two coils. The coupling factor

    depends on the size of the coils and their relative positions, and is inversely proportional to

    the cube of the distance between the coils [6] [7].

    The quality of the coupling is also determined by the Q factor of the system. A higher Q

    factor indicates that the amount of energy dissipated by resistive elements is small relative

    to the amount stored by the reactive elements. The higher the Q factor, the more efficiently

    energy is transferred to the receiver [6].

    At greater distances less energy is coupled to the receiver, meaning that the energy

    transfer must be more efficient in order for the same amount of energy to be stored. There-

    fore the minimum operating distance between the coils depends on the Q factor. For our

    purposes, the minimum distance between the transmitter coil and the receiver coil for guar-

    anteed operation will be 3 cm.

    2.4.1 NFC System

    This food spoilage monitoring device comprises the following main components: the inter-

    rogator and the NFC tag. The transmitter coil is part of the interrogator, and the receiver

    - 8 -

  • NFC Food Spoilage Monitoring Device 2.4 NFC Technololgy

    coil is one of the components of the tag. There are two approaches for establishing near

    field communication that were considered.

    One approach is to use an impedance analyzer which generates a sine wave that is

    swept over a specified frequency range. The impedance analyzer accurately measures the

    impedance of the circuit connected to its terminals. The interrogator coil is connected to

    the impedance analyzer and the tag is placed nearby. The interrogator coil and the tag coil

    couple thereby allowing the frequency response of the tag to be determined.

    The other approach is to use time domain gating method, which is discussed in Section

    2.5.

    The resonant frequency of the NFC tag responds to voltage changes across the elec-

    trodes. As seen in Figure 2.2, the NFC tag comprises a sensor coil, a varactor (C), and a

    low pass filter.

    Fig. 2.2: NFC Tag Diagram

    The sensor and interrogator coils can establish Near Field Communication through

    inductive coupling. The sensor coil can either be hand wound or milled on a printed circuit

    board. When the sensor coil is in parallel with the voltage controlled capacitor (varactor),

    a resonant circuit is formed and the resonant frequency can be determined using Equation

    2.5.

    - 9 -

  • NFC Food Spoilage Monitoring Device 2.5 Time Domain Gating Interrogation

    f0 =1

    2LC

    (2.5)

    Where f0 is the resonant frequency of the circuit,

    L is the inductance of the coil and

    C is the capacitance of the varactor.

    A varactor is a voltage controlled capacitor that changes its capacitance in response to

    changes in the bias voltage. In the NFC Tag, when the capacitance of the varactor changes,

    the resonant frequency of the circuit changes as well. The interrogator coil interacts with

    the sensor coil. The low pass filter consists of a resistor in series with a capacitor. The filter

    prevents the electrodes from being affected by the output signal of the interrogator. The

    cutoff frequency of low pass RC circuit is calculated based on the following equation.

    fc =1

    2RC(2.6)

    Where fc is the cut-off frequency,

    R represents the resistance and

    C represents the capacitance.

    2.5 Time Domain Gating Interrogation

    Time Domain Gating (TDG) is a method of interrogation, used to obtain information from

    sensors in wireless systems that employ technologies such as RFID or NFC. In systems

    based on electrical resonance, TDG allows for the natural frequency of the sensor to be

    determined. The main components of a TDG-based interrogator are a signal generator, a

    switch, a switch controller, as well as an inductive coil in the case of NFC-based systems.

    It also includes either an oscilloscope or lock-in amplifier, depending on the specific mode

    of operation. The configuration of these components can be seen in Figure 2.3.

    - 10 -

  • NFC Food Spoilage Monitoring Device 2.5 Time Domain Gating Interrogation

    Fig. 2.3: Time domain gating-based interrogator block diagram

    2.5.1 Operation

    TDG-based interrogation has 3 phases: a transmit phase, a receive phase, and a short delay

    phase in between transmitting and receiving. The timing of these phases is set by the switch

    controller. Figure 2.4 shows a timing diagram of these 3 phases.

    Fig. 2.4: Time domain gating timing diagram

    During the transmit phase the signal generator is connected to the interrogator coil

    via the switch. The energy sent from the interrogator coil couples to the sensor coil, and

    the sensor coil begins to resonate. The interrogator then exits the transmit phase, and the

    signal generator is disconnected from the interrogator coil. In the case of NFC systems,

    the delay phase allows for energy stored in the coil, due self-resonance, to dissipate. For

    RFID systems, the delay phase allows for any waves that are reflected by the environment

    - 11 -

  • NFC Food Spoilage Monitoring Device 2.5 Time Domain Gating Interrogation

    to pass by and not interfere with the interrogation. The interrogator then transitions to the

    receive phase, and the energy stored in the resonant circuit of the sensor couples back to

    the interrogator in the form of an exponentially decaying sine wave. There are two methods

    of analyzing the received signal in order to obtain the resonant frequency: measuring the

    amplitude and measuring the frequency.

    2.5.2 Amplitude-Based Approach

    The amplitude of the received signal depends on the frequency of the signal used to energize

    the sensor. The closer the frequency of the wave generated by the interrogator is to the

    resonant frequency of the sensor, the greater the amplitude of the received signal [7]. By

    sweeping the interrogation frequency and determining which frequency results in the great-

    est amplitude of the received signal, the resonant frequency of the sensor can be determined.

    The amplitude is measured by feeding signal to a lock-in amplifier during the receive phase,

    which outputs a DC voltage based on the amplitude.

    2.5.3 Frequency-Based Approach

    The frequency of the received signal is equal to the natural frequency of the sensor [7].

    The interrogator operates at a fixed frequency, chosen to be close to the expected natural

    frequency. The coil is connected to an oscilloscope during the receive phase, which allows

    the frequency of the received signal to be measured. This frequency-based approach was

    employed in this project.

    - 12 -

  • NFC Food Spoilage Monitoring Device 3. Design Methodology

    Chapter 3

    Design Methodology

    The following chapter details the design process of the NFC food monitoring system. In the

    first section is a short description of how the various concepts introduced in Chapter 2 were

    combined to create a wireless system for measuring pH. The subsequent sections discuss

    the design and implementation of the different components of our project. The rationale

    behind the decisions we made is provided, along with the results of the calculations and

    simulations that were performed.

    3.1 Introduction

    In this project, the goal was to detect food spoilage through pH change. The gases that are

    released by spoiling food will be absorbed by hydrogel, causing a shift in its pH. The voltage

    generated across electrodes immersed in hydrogel will change, varying the bias voltage of

    a varactor which results in a change in its capacitance. This change in capacitance alters

    the natural frequency of the resonator formed by the varactor and the inductive coil of

    the sensor. The natural frequency is determined by communicating with the sensor using

    an interrogator employing NFC technology. Through interrogation, changes in the natural

    frequency can be measured, allowing food spoilage to be detected.

    - 13 -

  • NFC Food Spoilage Monitoring Device 3.2 Electrodes

    3.2 Electrodes

    3.2.1 Fabrication of Solid-State Reference Electrode

    The solid state reference and the mixed-metal oxide electrodes were fabricated in the chem-

    istry department at the University of Manitoba. The process began with the tip and sides

    of silver wire being polished with fine grit sandpaper to ensure a clean silver surface. Then

    +0.5 V was applied to the silver wire for 50 s in a 0.1 M potassium chloride (KCl) solution,

    which formed a layer of silver chloride on the wire. Before coating the wire with some

    immobilized electrolyte, its potential was measured in 3 M NaCl to check for accuracy and

    determine if the wire is suitable for fabrication. An immobilized electrolyte was prepared by

    saturating 12 mL of tetrahydrofuran (THF) with NaCl and then adding 0.4 g of polyvinyl

    chloride (PVC). The silver-silver-chloride (Ag/AgCl) wire was dip-coated in the immobilized

    electrolyte solution and then dried in a desiccator for 48 hours to evaporate the solvent.

    After drying, the electrode was dip-coated with a protective polymer layer, three times,

    to prevent leakage of chloride ions. The polymer used in this process was Nafion since it

    provides increased reproducibility and stability compared to alternatives like polyurethane.

    Next, the electrode was cured at 120 deg C for 1 hour, stored in a desiccator overnight and

    then placed in 18 M water for 24 hours. The water was tested for chloride leakage, and

    the electrode was stored in a desiccator [8].

    3.2.2 Interfacing Electrodes to the Tag

    Copper wires were attached to the electrodes, but conventional soldering presented a chal-

    lenge, since heat generated by soldering irons (an average of 350 deg C) could damage the

    temperature-sensitive electrodes. Conducting epoxy was used to attach wires to each elec-

    trode since it provided the required stability and the process only required moderate baking

    at about 65 deg C. Since the electrodes were designed to work in an acidic environment,

    - 14 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    exposed silver joints and conducting epoxy were prone to corrode. To prevent this from

    happening, the exposed silver parts on the electrodes, and conducting epoxy were isolated

    with an insulating epoxy coating. Finally a hydrophilic polymer called hydrogel was used

    to coat the electrodes. The thickness of the coating was about 0.5 cm. Hydrogel was used

    because it acts as an electrolytic solution where ions are exchanged between the reference

    and mixed-metal electrodes to provide voltage changes. The hydrogel-coated electrodes can

    be seen in Figure 3.1.

    Fig. 3.1: Electrodes immersed in hydrogel

    3.3 NFC Tag

    3.3.1 Varactor

    The varactor is one of the main components in the resonant circuit of the NFC tag. The

    shift of the resonant frequency in the resonator depends on the change of capacitance

    in the varactor. The electrodes in used in this design were expected to produce the a

    bias voltage between 0 V to 0.4 V. Therefore the capacitance of the varactor needs to be

    sensitive to changes in the bias voltage in this range. This will ensure that changes in the

    electrode voltage cause distinguishable changes in the resonant frequency. The Philips BB2

    low-voltage variable capacitance diode was selected because it satisfies the aforementioned

    requirement as it provides 32.5 pF at 0.1 V bias voltage to 20 pF at 1 V bias voltage.

    - 15 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    The graph of the varactor capacitance as a function of the bias voltage from Philips BB2

    datasheet is shown in Figure 3.2.

    Fig. 3.2: Varactor capacitance vs reverse bias voltage curve

    3.3.2 Sensor Coil

    Another main component of the NFC tag is the sensor coil. This coil establishes near field

    communication with the interrogator, and behaves as an inductor which combined with the

    varactor acts as an LC resonant circuit. However, there are no perfect inductors and there

    is a turn-to-turn distributed capacitance called parasitic capacitance which exists in the

    sensor coil. This parasitic capacitance makes the coil resonate at a self-resonant frequency

    without being connected to the varactor. This self-resonant frequency is an important design

    parameter because the desired sensing resonant frequency cannot be above the self-resonant

    frequency. If the desired sensing resonant frequency is above the self-resonant frequency,

    the sensor coil will act as a capacitor [9].

    Figure 3.3 shows the inductance of a coil measured by the Agilent 4294A Precision

    Impedance Analyzer. The inductive value rises sharply around 33 MHz and then abruptly

    switches to a large negative value. Thus 33 MHz is the self-resonant frequency of the coil.

    When the operating frequency is below self-resonant frequency, the coil acts as inductor

    (positive L). When the operating frequency is beyond self-resonant frequency, the coil acts

    - 16 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    Fig. 3.3: Inductance value of the sensor coil measured by the impedance analyzer

    as capacitor (negative L). At the self-resonant frequency, the coil acts as a pure resistor.

    We decided to build the coil with the self-resonant frequency about 30 MHz - 50 MHz

    so the sensing resonant frequency of the resonant circuit in the design has to be much less

    than this self-resonant frequency. We chose the desired sensing resonant frequency to be

    13.56 MHz because it is in the ISM band. This frequency selection is also much lower than

    the self-resonant frequency range of the sensor coil.

    Based on the varactor selected and the specified sensing resonant frequency, the induc-

    tance of the coil can be determined by Equation 3.1 below.

    f =1

    2LC

    (3.1)

    Where f is the sensing resonant frequency of the resonator (13.56 MHz),

    C is average capacitance of the varactor (30 pF), and

    L is the inductance of the sensor coil.

    - 17 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    This results in a inductance value of 4.6 H, which is the important reference parameter

    used to build the sensor coil.

    Hand wound coil

    In order to construct the sensor coil in the design, we decided to first build a hand wound

    coil and then mill the final coil on the PCB afterwards. We decided to build the hand wound

    coil as it was impractical to mill the initial testing PCB more than once, due to budget

    limitations. The hand wound coil was relatively easy to construct and had no impact on our

    budget. The purpose of building the first hand wound coil was to experimentally observe

    the behaviour of the NFC tag and to confirm the implementation of our calculation above.

    Finally, a printed spiral coil was implemented in the final design.

    In order to build the hand wound coil however, we had to select a suitable core. The

    most important considerations in core selection are summarized in Table 3.1.

    Table 3.1: Core Selection

    Min L Max L Type of Core Adjustable High Current Frequency Limit

    20 nH 1 uH Air cored, self supporting Y Y 1 GHz

    20 nH 100 uH Air cored, on former N Y 500 MHz

    100 nH 1 mH slug tuned open winding Y N 500 MHz

    10 uH 20 mH Ferrite ring N N 500 MHz

    20 uH 0.3H RM Ferrite Core Y N 1 MHz

    50 uH 1 H EC or ETD Ferrite Core N Y 500 MHz

    1 H 50 H Iron N Y 10 KHz

    These parameters were key design constraints throughout the core type selection. Due

    to the specified sensing resonant frequency 13.56 MHz and the inductance of the sensor coil

    4.6 H, the Table 3.1 above proves that the air core coil is best for our design.

    Compared to a ferromagnetic core coil, the air core coil has a better Q-factor, greater

    efficiency, greater power handling, and less distortion [10]. A copper wire was used to

    - 18 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    construct the air core coil. The inductance value of the coil was determined by several

    physical parameters such as the wire radius, the number of turns in the coil, cross-sectional

    area of the coil and the influence of skin effect. The formula used to determine the initial

    parameters in order to achieve the specified inductance value of 4.6 H is shown below.

    L = 0.001N2r2/(228r + 254l) (3.2)

    Where L is the inductance of the coil

    N is the number of turns of the coil

    l is the coil length in metres

    r is the coil radius in metres

    However, the coil, like all non-theoretical electrical components, is imperfect and due to

    this imperfection, there are some typical errors in the formula. The best way to identify these

    physical parameters is through trial and error after determining a starting point from the

    formula. The desired dimensions were thus determined through repeated experimentation.

    The details of these tests and the experimental results are found in Chapter 4.

    Once the performance of the hand wound coil prototype met our design specifications,

    we moved on to finding the physical parameters of the spiral coil that was eventually milled

    on the PCB.

    Printed Spiral Coil

    The single layer planar spiral coil inductor was selected as the sensor coil that was eventually

    milled on the PCB. The planar coil was chosen because it is mostly used in high frequency

    applications and designed as traces on a circuit board [11]. The PCB used in this design

    is copper clad and uncoated. Its dimensions are 114.4 mm by 76.2 mm and its thickness is

    0.79 mm. The equation used to obtain the planar spiral coil is shown in Equation 3.3.

    - 19 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    Lmw = K10n2davg

    1 +K2(3.3)

    where Lmw is the inductance of the planar spiral coil,

    n is the number of turns,

    is the fill ratio = (dout din) + (dout + din)

    K1 and K2 are constants for a square layout and equal to 2.34 and 2.75 respectively

    davg is the average diameter defined by davg = 0.5( dout + din).

    This equation is called the modified Wheeler expression which is simple and provides

    good accuracy. This expression, which has errors of 1 to 2%, represents a great improvement

    over previously published expressions, which have typical errors of around 20% or more [12].

    From the specification, we defined the dout = 5 cm and din = 1 cm. Solving Equation 3.3

    with L = 4.6 H, we obtained the number of turns, 12. After the physical parameters of the

    planar spiral coil were determined, Utiliboard software was used to create the schematic

    layout of the PCB. The layout design was then exported to a Gerber file and sent for

    manufacturing. Figure 3.4 shows the layout of the single layer planar square spiral coil.

    Fig. 3.4: Single layer planar square spiral coil

    - 20 -

  • NFC Food Spoilage Monitoring Device 3.3 NFC Tag

    3.3.3 Resonant Circuit

    Fig. 3.5: An equivalent circuit diagram of the PH sensor and coupled interrogator coil

    An equivalent circuit diagram of the pH sensor and coupled interrogator coil is shown

    in Figure 3.5. The sensor coil is in parallel with a voltage controlled capacitor and the pH

    sensor electrode. Ls is the series inductance of the sensor coil and Rs is the series resistance

    of the sensor coil. C1 is the series capacitor capable of increasing the sensitivity to the

    voltage changes. Cv is the voltage controlled capacitor (varactor) in the resonant circuit.

    In the reverse bias state,

    Cv = C0

    (1 Vc

    )(3.4)

    Where C0 is the junction capacitance at zero bias,

    is the junction built in potential,

    is the doping dependent exponent,

    Vc is the bias voltage across the varactor [7].

    In order to minimize the effect of the resonant circuit on the varactor, we chose a

    capacitor C1 = 1 nF which is much larger than Cv. Since this capacitor C1 is much

    larger than the varactor capacitance, the equivalent input capacitance of the pH sensor

    - 21 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    is approximately equal to the varactor capacitance thereby maximising the effect of the

    varactor capacitance on the resonant frequency. R1 is the high impedance resistor which

    ensures that most of the voltage change by the electrode is across the varactor. Therefore,

    we chose R1= 10 G. R2 and C2 work together as a low pass filter which prevents the

    signal generated by the interrogator from affecting the electrodes. We chose the cut-off

    frequency to be 1.6 kHz which is much lower than our operational frequency. Thus, R2 =

    1 M and C2 = 100 pF, according to Equation 2.6. R3 is the resistance developed by the

    two electrodes, and V1 is the voltage across the two electrodes.

    For

    R3 (R2 +R1) (3.5)

    Vc = V1 (3.6)

    C1 C2 (3.7)

    and a small interrogator source oscillation amplitude, the potential change across the elec-

    trode can be monitored by obtaining the resonant frequency of the pH sensor circuit.

    3.4 Interrogator

    This section goes into details of the options considered in designing the interrogator seen in

    Figure 2.3. We looked into designing a portable interrogator but eventually chose to design

    a stationary interrogator. The design process is explained below.

    3.4.1 Portable Interrogator

    Bulky time domain gating-based interrogator setups already exist so we decided to start

    our design by attempting to design a hand held device to perform the same function. In

    order to do this, we needed to find smaller alternatives for the various components involved

    - 22 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    in time domain gating that are described in Section 2.5. We began the design by breaking

    down the interrogator section into two distinct parts: a transmitter and a receiver.

    Transmitter

    The transmitter was intended to replace the function generator in the current interrogator

    setup. The goal of the interrogator was to produce a variable frequency sine wave specifically

    in the range of 13 MHz to 14.5 MHz because our desired resonant frequency at the time was

    13.56 MHz. For this purpose we considered a Voltage Controlled Crystal Oscillator (VCXO)

    because its output frequency can be varied based on an applied control voltage. This would

    allow us to adjust the frequency to ensure that it is close to resonant frequency of the sensor.

    This would also enable us to begin constructing the interrogator immediately, rather than

    waiting until the sensor had been fabricated and its exact resonant frequency determined.

    In order to be able to implement the transmitter, the oscillator needs an accurate variable

    voltage supply to obtain the required oscillation frequency.

    Receiver

    The next step in designing a portable interrogator was designing a device capable of mea-

    suring the frequency of an incoming decaying sine wave received from the NFC tag. Several

    approaches were considered in order to accomplish this. In the first method, the received

    signal would initially be amplified, in order to increase its otherwise small amplitude. The

    signal would then be passed through a high pass filter, which would cause the signal to

    be attenuated by an amount related to its frequency. Next the signal would pass through

    a diode to a capacitor, which would act as a peak detector and be charged to a voltage

    proportional to the amplitude of the signal. This voltage would be recorded by an Analog

    to Digital Converter (ADC). The recorded voltage reading could then be used to calculate

    the frequency value of the received signal. A block diagram of this design can be seen in

    - 23 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    the Figure 3.6.

    Fig. 3.6: Portable Interrogator Receiver - design 1 block diagram

    However, we realized that this method would be ineffective, as it requires the signal

    received to always have the same initial amplitude. In reality the initial amplitude of the

    received signal would depend on the distance and orientation of the sensor and interrogator

    coils. It would be difficult to ensure that these two parameters were exactly the same for

    every reading, making this method impractical.

    The second method involved measuring the frequency directly. As in the first method,

    the signal would first be amplified. It would then be fed to a comparator. The comparator

    would convert the sine wave into a square wave signal by comparing the sine wave received

    to ground. The square wave produced should have the same frequency as the sine wave

    received if the signal received contains very little noise. The output of the comparator would

    be connected to a digital counter Integrated Circuit (IC), which would record the number

    of cycles the signal goes through. Knowing the number of cycles and the duration of the

    interrogation allows the frequency to be calculated, which would be converted to a pH value

    and displayed on an LCD. A block diagram of this method is shown in Figure 3.7.

    - 24 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    Fig. 3.7: Portable Interrogator Receiver design 2 block diagram

    We simulated this design using an exponentially decaying sine wave to model the in-

    coming signal. Based on a discussion we had with Dr. Bridges, we set the initial amplitude

    to be 100mV and the rate of decay to be 106 s1. However, due to the small amplitude

    and rapid decay, the our circuit was only able to track the number of cycle for 3.6 us. The

    precision with which we can calculate the frequency depends on the duration over which

    we can count cycles, and we were concerned whether or not we would able to achieve the

    precision necessary for our application.

    Ultimately neither of these designs were implemented. After consulting with Daniel

    Card and our supervisor, Professor Bridges, we determined that designing a portable inter-

    rogator would take longer than the time we had and was outside the scope of our project

    as outlined in our proposal. We moved on to implement a stationary interrogator.

    3.4.2 Stationary Interrogator

    The approach to the stationary interrogator involved using a time domain gating response.

    It involves using a CW source to send out a single frequency as a pulse. The tag will pick up

    the signal, couple to the resonator and start transmitting back. Since some energy is stored

    in the resonator, the signal sent back would die down at the natural frequency. The rate at

    which the frequency dies down depends on how much energy leaks out to the antenna and

    how much energy goes to losses i.e. the Q factor of the resonator. Specifically, the Q factor

    - 25 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    is related to the decay rate using the equation below:

    Q =n

    2 (3.8)

    Where is the decay rate in s1 and

    n is the natural frequency

    Therefore, a reasonably large Q factor is needed for the NFC tag and a much smaller

    frequency is required for the interrogator coil.The time domain gating method could be

    achieved by energizing the NFC tag first, turning off the source and then looking at the

    received response on an oscilloscope continuously. Once this has been repeated a few times,

    the resonant frequency of the tag could be obtained using the average of the received signals.

    By doing this, the noise from the surroundings would be considerably reduced because the

    resonant circuit of the NFC tag slowly releases its energy as it returns to the interrogator

    coil. Since the surroundings do not store energy like a resonant circuit does, noise would

    be reduced drastically.

    Once we decided to implement the time domain gating method, we began our design by

    analyzing the built-in interrogator in the RF Lab. We wanted to understand how exactly

    the setup worked and how to go about designing a similar device to perform the same

    function. The interrogator setup is shown in Figure 3.8. It includes switches, a switch

    controller, an inductive coil, a function generator and an oscilloscope.

    - 26 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    Fig. 3.8: Stationary interrogator setup block diagram

    The ZYSWA-2-50DR switches were used in this project because they were readily avail-

    able and met our requirements. These switches require a +/-5 V DC supply and have a

    wide bandwidth of 5 GHz which is much higher than our operating frequency range of 12.37

    MHz - 13.48 MHz. They also have a low insertion loss of 1.1 dB at our operating frequency

    range.

    The implementation of a stationary interrogator required the design of a switch con-

    troller, the use of a voltage regulator and some code for data acquisition. All the other

    necessary components were provided by the university, as described in our proposal.

    - 27 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    Switch Controller

    The switch controller was built using 555 timers, a delay chip and a crystal oscillator. In

    order to implement the switch controller we considered using a variety of techniques but

    we eventually chose to use 555 timers to implement the switch. We chose to use 555 timers

    because we could easily change the duty cycle of our waveforms and also because they are

    cheap and available. Our goal was to achieve a 50% duty cycle waveform and a 20% duty

    cycle waveform with a frequency of 25 kHz and a delay of about 1us between them. We

    wanted to achieve these specific waveforms because these timings had been used in the

    existing TDG interrogator setup in the RF lab which had been confirmed to work in our

    application (see Section 4.2.5).

    However, one issue is that, in their typical configurations, these chips cannot generate

    signals with a duty cycle less than 50%. We overcame this by instead generating an 80%

    duty cycle signal and passing it through an inverter. We began by considering the operation

    of the timers in astable configuration, where the oscillation is controlled by the values of 2

    external resistors and a capacitor: RA, RB and C. The frequency of oscillation is determined

    according to Equation 3.9 .

    f =1.44

    (RA + 2RB)C(3.9)

    The duty cycle is determined according to Equation 3.10.

    D = 0.693f [(RA +RB)C] (3.10)

    With these two equations, we were able to calculate the values of RA, RB and C required

    for the desired operation for both of the timers. For the 80% duty cycle timer, the values

    of RA, RB, and C were 3.47 k, 1.15 k, and 10 nF, respectively. For the 50% duty cycle

    timer the values were calculated to be 100 , 2.45 k, and 11.5 nF, respectively. A circuit

    - 28 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    containing two 555 timers configured with the components listed above was simulated using

    Multisim. The output of this circuit can be seen in Figure 3.9.

    Fig. 3.9: Simulation of 555 timers in astable configuration

    The frequency and duty cycle of the two waveforms met our requirements. However, the

    phase relation between the two signals was constantly changing, due to a slight frequency

    mismatch. This mismatch was a result of the component values not being precise enough

    to ensure an exact frequency for both timers. This effect would be even more pronounced

    in a real-world implementation, as there would be a degree of error in the values of the

    components used.

    To overcome this problem, a second design was considered. The timers would instead

    be operated in the monostable mode. In this configuration the duty cycle is determined

    the values of a resistor and a capacitor, RA and C, while the frequency is controlled by an

    external clock signal. The duty cycle is determined by Equation [3.3]

    D = 1.1RACf (3.11)

    Where f is the clock signal frequency.

    For the 80% signal RA and C were calculated to be 2.91 k and 10 nF, respectively.

    The values calculated for the 50% duty cycle signal were 1.82 k and 10 nF, respectively.For

    the role of the external clock signal, a crystal oscillator was chosen, due to their accuracy

    - 29 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    and stability. However, a 25 kHz crystal oscillator was not available, so we instead chose

    a higher frequency that would be divided using D flip-flops. Each flip-flop in series divides

    the frequency in half, so with 8 flip-flops and a 6.144 MHz oscillator, a 24 kHz signal was

    obtained, which was sufficiently close to our target frequency of 25 kHz.

    This new design was simulated in Multisim, and the output can be seen in Figure 3.10.

    Fig. 3.10: Simulation of 555 timers in monostable configuration

    This configuration resulted in the production of synchronized 24 kHz frequency 50%

    and 20% duty cycles, thereby eliminating the problem of frequency mismatch associated

    with the previous design. Therefore we decided to use monostable configuration described

    above in our design of the switch controller.

    Now that we had obtained the required waveforms, we looked into the delay portion of

    the switch controller. To obtain the delay between the two waveforms, we first considered

    using 555 timers. However, the delays produced by 555 timers start from the order of 10

    ms and the delay we wanted to obtain was in the order of 1 s. Next, we looked into

    programmable delay chips and we found the Linear Technology chip LTC6994-1 chip that

    enabled us to program the exact delay we wanted using excel. The program defined the

    delay as the amount of time you wanted the rising edge of the waveform to be shifted by

    - 30 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    without affecting the falling edge.

    Once we realized how the delay chip functioned, we revisited the design of the syn-

    chronous waveform design of the 50% and 80% designs and decided to use the square wave

    output of the 8 flipflops as our 50% duty cycle. We also chose to generate a rectangular

    waveform that is high for 30.27 s instead of 80%(33.33 s). This dropped our duty cycle

    to 73.728%. We chose to reduce the duty cycle so that we could move the rising edge of

    the new 73.728% duty cycle waveform to be about 1 s after the square waveform therefore

    we chose to delay the rising edge by 21 s. Using a simulation program called LTspice

    IV, We were able to simulate the function of the chip and verify that the results of the

    chip matched the required specification. The diagram of the delay chip with the resistor

    and capacitor values selected are shown below in Figure 3.11. This diagram also shows the

    resulting waveforms.

    Fig. 3.11: Configuration of the Delay Chip

    By combining the delay chip, crystal oscillator and 555 timers, we built the switch

    controller on two prototype boards. The built switch controller is shown in Appendix A.

    - 31 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    Fig. 3.12: Simulation Results of the Delay Chip

    Sensor Resonator Substitute

    In order to successfully design and test the interrogator, we would need to observe how

    it functioned in conjunction with a resonator. However, due to the fact that work on the

    interrogator was being performed concurrently with the work on the sensor, we could not

    rely on the sensor resonator being completed beforehand. To overcome this, we designed a

    resonator that would act as a stand-in for the final sensor resonator. An inductive coil was

    made by winding wire into a 5 cm diameter, 5 turn circular loop. The inductance of this

    coil as measured by the impedance analyzer was 3.14 H. This coil was soldered to a 43 pF

    capacitor in order to achieve a nominal resonant frequency of 13.7 MHz, in order to obtain

    a resonator that would be suitable to use as a substitute for the resonant circuit of the pH

    sensor. The parameters of the substitute resonator were later verified experimentally, as

    seen in Section 4.2.5.

    Data Acquisition System

    The first step in developing a system to record and analyze the data received from the

    interrogator was to find a method of capturing the signal displayed on the oscilloscope and

    save it to a computer. To do this we utilized a piece of software called Openchoice, which

    - 32 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    is made available online by the manufacturers of the oscilloscope, Tektronix. Openchoice

    enables a computer to interface with the oscilloscope via USB, allowing the user to capture

    and save a waveform as a table of data points, plotting voltage vs. time. The saved file also

    includes the frequency at which the signal was sampled.

    Next, a method for analyzing the obtained data was required. We chose to use a

    program called MATLAB for this purpose, as the group had experience using it for signal

    processing applications in prior courses. We then needed to write code in MATLAB that

    would import the data saved from the oscilloscope, determine the frequency of the signal,

    and then output the value.

    The first method for determining the frequency was to count the number of times the

    signal crossed the x-axis, which is equivalent to the number of times the signal voltage is

    equal to zero. Because a sine wave is equal to zero twice per cycle, the number of cycles can

    be calculated by dividing the number of zero-crossings by two. The duration over which

    the signal was sampled can be calculated by dividing the number of data points by the

    sampling frequency. The frequency of the signal can then be calculated based on Equation

    3.12 .

    f = N/Ts (3.12)

    Where f is the frequency,

    N is the number of cycles, and

    Ts is the sampling duration.

    When attempting to count the zero-crossings, we discovered it does not work to simply

    count the number of data points at which the voltage is equal to zero. This is because

    it is unlikely that a sample will occur at precisely the moment that the signal is equal to

    zero, and instead will most likely sample the signal when it is just above or below zero.

    Instead, the number of zero-crossings was determined by counting the number of time the

    - 33 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    voltage changed from positive to negative, or vice versa. However, we realized that the

    zero-crossing method would not be suitable for our application. The reason for this is that

    in real-world situations there will always be some noise in the signal. Noise causes spurious

    zero-crossings, which in turn results in an incorrect measure of frequency.

    The next attempt involved a Fourier transform, which converts a time-domain signal

    into the frequency domain, resulting in a function of amplitude versus frequency. The

    frequency is then determined by finding the maximum of this function and outputting the

    corresponding frequency value. This approach grants immunity to noise, so long as its

    amplitude is less than the amplitude of the received signal. It also allows for the possibility

    of implementing simple digital filtering by removing parts of the frequency-domain function

    that lie outside of our frequency range of interest. This kind of filtering would allow the

    data acquisition system to function even in the presence of noise with an amplitude greater

    than that of the signal, provided that the noise was outside of the frequency range we are

    working in.

    The operation of the Fourier transform-based method was simulated by using a computer-

    generated sine wave in the place of signal received by the interrogator. This generated sine

    wave had an arbitrary frequency of 10 Hz and amplitude of 1 unit. Random noise with an

    amplitude equivalent to 25% of the sine wave amplitude was then added. A graph of the

    input sine wave can be seen in Figure 3.13, along with the same signal converted to the

    frequency domain in Figure 3.14. The program correctly identified the frequency value as

    being 10 Hz.

    - 34 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    Fig. 3.13: A: 10 Hz sine wave with noise in time domain

    Fig. 3.14: B: 10 Hz sine wave with noise in frequency domain

    Power Supply

    In order to power the switches and the switch controller circuits used in this design, we

    needed to provide precise +5 V , -5 V and ground supplies. To obtain these values, we

    decided to use the variable +-15 V supplies on a bread board connected to voltage regulators.

    We chose to use the LM7805C +5 V voltage regulator and the MC7905C -5 V voltage

    regulator because they were available at the University. The schematics used in building

    - 35 -

  • NFC Food Spoilage Monitoring Device 3.4 Interrogator

    the voltage regulators are shown in Figures 3.15 and 3.16.

    Fig. 3.15: Schematic of the +5 V voltage regulator

    Fig. 3.16: Schematic of the -5 V voltage regulator

    - 36 -

  • NFC Food Spoilage Monitoring Device 4. Testing Procedure and Results

    Chapter 4

    Testing Procedure and Results

    In this chapter we explain the testing that was performed in order to verify the operation

    of our design. We begin by providing a list of the different pieces of equipment that were

    used, along with a brief description of each. We then move on to the testing performed on

    the various components that comprise our system. We conclude with the tests performed

    on the system as a whole, with all the sub-components having been integrated. Within each

    test entry we start by outlining the reason for why the test was performed, as well as the

    necessary preparation. We then proceed to describe the steps taken in the test procedure,

    followed by the results that were obtained. Finally, each entry ends with a discussion of

    what conclusions were drawn based on the outcome of the experiment.

    4.1 Test Equipment

    4.1.1 DC Generator

    A DC generator was used to emulate the biased voltage produced by the set of electrodes.

    The power supply model that was used was the Hewlett-Packard 6115A Precision Power

    Supply.

    - 37 -

  • NFC Food Spoilage Monitoring Device 4.1 Test Equipment

    4.1.2 Impedance Analyzer

    An impedance analyzer is capable of obtaining the resonant frequency of the resonant

    circuit by finding the frequency at which impedance is maximum, as well as measuring the

    inductance and resistance of the coil. The impedance analyzer model that we used was the

    Agilent 4294A Precision Impedance Analyzer, which had an operational frequency range of

    40 Hz to 110 MHz. This range covered our desired operating frequency. The impedance

    analyzer is also capable of generating an equivalent circuit model to fit the data obtained.

    4.1.3 Function Generator

    A Function Generator was used to send small voltage sinusoidal signals to the interrogator

    coil. The model of the function generator is Stanford Research Systems Model DS345. The

    DS345 generates sine waves up to 30.2 MHz which covers our desired operating frequency.

    4.1.4 Oscilloscope

    An oscilloscope was used to display the signal received by the interrogator coil, and the

    screen capture obtained was further analyzed. The model of the oscilloscope used is the

    Tektronix TDS 2024B. The oscilloscope has a USB host and device ports that enable re-

    movable data storage and PC connectivity.

    4.1.5 Pulse Generator

    A pulse generator was used to generate the TTL rectangular waves for the switches during

    initial testing. The model of pulse generator is Quantum Composers Model 9618. The pulse

    generator has 8 independent output and multi-channel capability.

    - 38 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    4.1.6 Digital Multimeter

    An Agilent 3401A digital multimeter was used to measure voltage changes between the

    mixed metal oxide and reference electrodes. Most common multimeters have an input

    resistance of 10 M and the electrodes used in this design have a resistance of about 2

    M. Since the both resistances are comparable, a phenomenon called loading effect occurs,

    which causes inaccurate voltage readings when measurements are taken. The Agilent 3401A

    multimeter was chosen because its input resistance can be changed to a relatively high 10

    G.

    4.2 Individual Component Testing

    In this section we discuss the testing that was performed on the individual components that

    together make up our final system design. These tests were undertaken in order to confirm

    the operation of the various elements, allowing us proceed with combining the components

    into the complete food spoilage monitoring device.

    4.2.1 Electrodes testing

    Purpose

    The purpose of this test was to determine the response of the electrodes to gases of differing

    pH levels. The voltages across the electrodes were recorded for an acidic gas, a basic gas

    and neutral pH environment.

    Setup

    The setup for the testing process is shown in Figure 4.1. The electrodes were enclosed in a

    glass chamber containing an aqueous solution. The MMO electrode was connected to the

    high impedance input of an Agilent 3401A digital multimeter and the Ag/AgCl reference

    - 39 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Fig. 4.1: Complete test setup with multimeter attached (voltage shown is still changing)

    electrode was connected to the ground input.

    Procedure

    De-ionized Water and Acetic Acid

    The hydrogel-coated electrodes were enclosed in a glass chamber containing deionized

    water and left for three days. This was done to allow the voltage between the electrodes

    stabilize before any further testing. White vinegar contains 5% acetic acid, (as indicated on

    the commercial vinegar used in this test) so it was used as the pH solution in this experiment.

    After the voltage between the electrodes stabilized, deionized water was quickly replaced

    with vinegar. Replacing deionized water with vinegar was done quickly to prevent acetic

    acid from escaping. The voltage between the electrodes was monitored with a multimeter.

    Ammonia

    After the voltage between the electrodes settled at a value corresponding to the pH of

    acetic acid, measurements were taken and the setup was taken down. The hydrogel coating

    was removed and the electrodes were washed with de-ionized water, and left to dry. The

    electrodes were recoated with hydrogel and isolated in the glass chamber containing deion-

    ized water. After three days of stabilization, deionized water was quickly replaced with

    - 40 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Ammonium Hydroxide (NH4OH). Ammonium Hydroxide was used in this experiment be-

    cause it contains 1% ammonia. The voltage changes between the electrodes were monitored

    afterwards.

    Results

    The following results were obtained after testing:

    Table 4.1: Voltage responses of the electrodes to varied pH levels

    Substance pH Level (in aqueous solution) Voltage (mV)

    Acetic acid 2.4 240

    De-ionized water 7 104

    Ammonia 11.6 -29.4

    Using the data shown in Table 4.1, the following plot was generated:

    Fig. 4.2: pH level vs. voltage

    From Figure 4.2 above, we obtained V0, the voltage at 0 pH value, to be 309.84 mV.

    The slope of the regression line was found to be -29.283 mV/pH, which gives equation 4.1

    shown below:

    V (mV ) = 29.283(pH) + 309.84 (4.1)

    - 41 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    The operating pH range of the electrodes is approximately 2.4 to 11.6 and with this

    information we determined the operating voltage range to be -29.84 to 239.56 mV.

    Conclusion

    This experiment examined the response of the electrodes to acidic, neutral and basic gases.

    The electrodes showed a linear voltage response to varied pH levels, and this conformed

    to our expectations. The operating voltage range we determined is wide enough to cause

    a corresponding change in the tags resonant frequency that can be detected by the inter-

    rogator.

    4.2.2 Sensor Coil testing

    Hand Wound Coil Testing

    Purpose

    The purpose of this test was to determine the physical parameters and dimension of the

    hand wound air core coil in order to achieve the specified inductance value of 4.6 H and a

    high Q factor. This coil was used to build the NFC tag prototype.

    Setup

    The inductive coil was plugged into the test fixture which was attached to the Agilent 4294A

    Precision Impedance Analyzer. Figure 4.3 illustrates the basic setup for the testing of the

    hand wound air core coil.

    - 42 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Fig. 4.3: Setup of the testing of the hand wound air cored coil

    Procedure

    The impedance analyzer is designed to measured the complex impedance Z and or R+jX

    instead of measuring inductance L and capacitance C directly. Where Z is the complex

    impedance, is the associated phase angle, R is the real part of Z, and X is the imaginary

    part of Z. If the impedance analyzer is set to display L, the value of L will be calculated by

    equation 4.2.

    L = X/ (4.2)

    where is the angular frequency in radians/sec. X can be positive or negative. When

    X is positive, X is considered as inductive reactance. When X is negative, X is considered as

    capacitive reactance. In other words, from equation 4.2, capacitance is negative inductance.

    When the operating frequency is below the self-resonant frequency, the inductive coil

    appears to be inductive. When the operating frequency is above the self-resonant frequency,

    the inductive coil appears to be capacitive. At the self-resonant frequency, the impedance

    - 43 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    reaches a maximum and is purely resistive. If the impedance analyzer is set to display

    R, the position of the peak value of the resistance (the real part of Z) corresponds to the

    self-resonant frequency of the inductive coil. This is the main principle used to obtain the

    resonant frequency of the inductive coil from the impedance analyzer.

    In the first setup, we wound the copper wires with 11 turns and a 4 cm diameter.

    Frequency sweeps were done from 10 MHz to 20 MHz. The impedance analyzer was set to

    display Ls-Q model. We checked the value of L that corresponded to the specified sensing

    resonant frequency 13.56 MHz. This test was then repeated by adjusting the number of

    turns and the cross sectional area of the air core coil until the value of L was closed to 4.6

    H at the specified sensing resonant frequency 13.56 MHz. The Q factor of the air core coil

    was also measured with the impedance analyzer.

    Results

    After testing the hand wound air core coil, we found that increasing the number of turns

    and the cross sectional area of the air core coil increases the inductive value. In order to

    meet our design specification of 4.6 H, we repeatedly adjusted these two parameters. The

    Q factor and the final dimensions of the air core coils are shown in Table 4.2.

    Table 4.2: Dimensions of the Air Core Coils

    Hand Wound Air Core Coil

    Q 122

    Diameter of the coil 3.6cm

    Number of turns 7

    Figure 4.4 shows the built hand wound air core coil. In Figure 4.5, we see the inductive

    value of the coil is 4.33 H at the specified sensing resonant frequency 13.56 MHz. This

    inductive value is close to our specified value 4.6 H so the design of the air core coil was

    - 44 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Fig. 4.4: Hand wound air core coil

    acceptable.

    - 45 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Fig. 4.5: Inductive value of the hand wound coil

    Figure 4.6 shows the self-resonant frequency of the coil. As expected the sensing res-

    onant frequency 13.56 MHz of the resonant circuit is much less than this self-resonant

    frequency.

    Fig. 4.6: Self-resonant frequency of the hand wound coil

    Printed Spiral Coil Testing

    Purpose

    The purpose of this test was to confirm that our milled PCB coil met specifications. The

    inductance value of the coil should be 4.6 H at 13.56 MHz (operating frequency) and the

    Q factor of the coil should be high.

    - 46 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Setup

    Two wires were attached to both ends of the printed spiral coil, and the other ends of these

    wires were plugged into the test fixture of the Agilent 4294A Precision Impedance Analyzer.

    Figure 4.7 illustrates the basic setup for the testing of the printed spiral coil.

    Fig. 4.7: Milled PCB coil

    Procedure

    The testing procedures for printed spiral coil are similar to the testing procedures for the

    hand wound air core coil. The impedance analyzer was set to display Ls-Q model. The fre-

    quency sweeps were from 10 MHz to 20 MHz. We checked the value of L that corresponded

    to the specified sensing resonant frequency 13.56 MHz. The Q factor of the printed spiral

    coil was also measured with the impedance analyzer.

    - 47 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Results

    After testing the printed spiral coil, we found that its inductive value was 4.6 H at the

    specified sensing resonant frequency 13.56 MHz and its Q factor was 120. The results

    of testing satisfied our specifications, and verified the accuracy of the modified Wheeler

    expression that was used to calculated the physical parameter of the single layer planar

    spiral coil.

    Conclusion

    The quality of the inductive coil was determined through the measurements from impedance

    analyzer. Both the hand wound air core coil and the printed spiral coil had a high Q factor

    and their inductance values were close to the specified inductance value of 4.6 H at the

    operating frequency of 13.56 MHz. Thus, the designs of the inductive coils were acceptable.

    4.2.3 NFC Tag Testing

    Tag with a Hand Wound Air Core Coil

    Purpose

    The purpose of this test was to experimentally observe the behaviour of NFC tag. This tag

    was used as a prototype to confirm the implementation of our design.

    Setup

    An interrogator coil was connected to the impedance analyzer and the NFC tag was 4.4

    cm away from the interrogator coil on the impedance analyzer. The DC generator was

    connected across the varactor. Figures 4.8 and 4.9 illustrate the setup for testing the NFC

    tag with the hand wound coil.

    - 48 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Fig. 4.8: Top view NFC tag testing set up

    Fig. 4.9: Front view NFC tag testing set up

    - 49 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Procedure

    Using the DC generator, the bias voltage across the varactor was varied from 0 V to 0.4

    V with 0.1 V divisions. The resonant frequencies of the circuit were obtained using the

    impedance analyzer.

    Result

    The sensing resonant frequency shifts from 13.15 MHz to 14.45 MHz. This resonant fre-

    quency shift is due to the 0.1 V to 0.4 V change in the bias voltage across the varactor. The

    calculated Q factor of the resonant circuit is 134. The largest operational distance between

    the sensor coil and interrogator coil is 6.1 cm. The result of testing met our expectation.

    These results provided firsthand data of NFC tag performance. The data was also used as

    a reference for building the tag with printed spiral coil.

    Conclusion

    The NFC tag with hand wound coil satisfied our design specification. However, from the

    aforementioned test, we realised that the hand wound coil is very sensitive to movement.

    This problem was overcome by using the milled PCB coil for our final design.

    Tag with printed spiral coil

    Purpose

    The purpose of this testing was to determine the relationship between the bias voltage

    across the varactor and the resonant frequency of the resonant circuit. It was also aimed

    at measuring the Q factor of the resonant circuit and determining the operational distance

    between the sensor coil and interrogator coil. This tag was implemented in the final design.

    - 50 -

  • NFC Food Spoilage Monitoring Device 4.2 Individual Component Testing

    Setup

    An interrogator coil was connected to the impedance analyzer and the NFC tag wass 4.4

    cm away from the hand wound coil on the impedance analyzer. The DC generator was

    connected across the varactor. Figures 4.10 and 4.11 illustrate the ove