SlideShare a Scribd company logo
1 of 145
Download to read offline
The Application of Low-Power Wireless
Networks to Wide-Area Distributed
Audio Systems
A dissertation submitted to The University of Manchester for
the degree of Master of Science in the Faculty of Engineering
and Physical Sciences
2009
Flavio Felici
School of Electrical and Electronic Engineering
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 1
List of Contents
List of Figures....................................................................................................................3
List of Tables.....................................................................................................................5
Abstract .............................................................................................................................5
Declaration ........................................................................................................................6
Copyright Statement ..........................................................................................................6
Acknowledgment...............................................................................................................7
Chapter 1...........................................................................................................................8
Introduction .......................................................................................................................8
1.1 Sound Masking Overview and Project Aim ..............................................................8
1.2 Structure of Dissertation.........................................................................................12
1.3 Achievements.........................................................................................................13
Chapter 2.........................................................................................................................14
Technical Requirements of a Typical Sound Masking System..........................................14
2.1 Frequency of Operation..........................................................................................14
2.2 Range and Network layout .....................................................................................15
2.3 Data Rate ...............................................................................................................16
2.4 Wireless Coexistence .............................................................................................17
Chapter 3.........................................................................................................................18
Review of Communication in the ISM Band ....................................................................18
3.1 Wireless Transmission in the Unlicensed Band.......................................................18
3.2 ISM Band selection ................................................................................................20
3.2.1 The 2.4 and 5.8 GHz ISM Bands .....................................................................20
3.3 Comparison between wireless standards in the 2.4GHz ISM band ..........................21
3.3.2 IEEE 802.15.1 – The Bluetooth Standard.........................................................23
3.3.3 IEEE 802.15.4-2006 – The ZigBee Standard ...................................................24
3.3.4 Texas Instruments SimpliciTI..........................................................................24
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 2
3.4 2.4 GHz ISM Band Survey....................................................................................26
3.5 Custom Built Protocol............................................................................................27
3.6 Additional Requirements for FHSS systems in the 2.4 GHz ISM band ...................27
Chapter 4.........................................................................................................................29
System Design.................................................................................................................29
4.1 High Level Design .................................................................................................29
4.2 Hardware Component Selection .............................................................................31
4.2.1. Microcontroller...............................................................................................31
4.2.2 Transceiver......................................................................................................33
4.3 Hardware Assembly and Testing ............................................................................35
4.4 Software Design.....................................................................................................44
4.4.1 Software Environment.....................................................................................44
4.4.2 SPI Interface and Transceiver Configuration....................................................46
Chapter 5.........................................................................................................................52
Development of a FHSS MAC Layer Protocol.................................................................52
5.1 Basic Functions......................................................................................................52
5.2 Output Functions....................................................................................................61
5.3 Configuring the Transceiver ...................................................................................63
5.4 Fixed Frequency Transmission...............................................................................68
5.5 Frequency Hopping System....................................................................................71
5.6 Adaptive Frequency Hopping System.....................................................................75
5.7 Variable Base Adaptive Frequency Hopping System..............................................77
5.8 Network Setup .......................................................................................................80
5.9 Variable Base Adaptive Fast Frequency Hopping System.......................................81
Chapter 6.........................................................................................................................85
System Testing and Performance .....................................................................................85
6.1 Range Test .............................................................................................................85
6.2 Variable Base Adaptive FHSS System Test............................................................87
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 3
Chapter 7.........................................................................................................................94
Conclusions and Further Work.........................................................................................94
References .......................................................................................................................96
Appendix A ...................................................................................................................102
Source Code ..................................................................................................................102
SPIc...........................................................................................................................102
Fast Hopping RF.c .....................................................................................................111
Appendix B....................................................................................................................120
Feasibility Study............................................................................................................120
Appendix C....................................................................................................................144
Datasheets Front Sheets .................................................................................................144
List of Figures
Figure 1.1 Sound Masking System installed under the office ceiling tile1
............................8
Figure 1.2 Wireless transmission system applied to a network node....................................9
Figure 1.3 Frequency Hopping terminology4
......................................................................11
FIGURE 2.1:NETWORK SETUP
6
..............................................................................................14
Figure 2.2: Traffic patterns in a typical sound masking system7
.........................................15
Figure 2.2: Traffic patterns in a typical sound masking system7
........................................16
Figure 3.1: Wi-Fi Channels in the 2.4 GHz ISM band29
......................................................23
Figure 3.2: Spectrum Survey of the 2.4 GHz ISM Band.....................................................27
Figure 4.1 Wireless board and its main components...........................................................31
Figure 4.2 PIC32MX360F512L main features42
.................................................................34
Figure 4.3 Overview of External Components....................................................................37
Figure 4.4 Microchip Explorer 16 Development Board47
...................................................38
Figure 4.5 Quasar CC2500 module48
...................................................................................39
Figure 4.6 Texas Instruments 2.4 GHz Inverted F Antenna78
..............................................40
Figure 4.7 Pictail connector pinout49
....................................................................................41
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 4
Figure 4.8 Quasar CC2500 module pinout50
.......................................................................43
Figure 4.9 (left) Soldering the glued female connector ......................................................44
Figure 4.10 (right) Plugging the CC2500 module in the glued female connector.............44
Figure 4.11 The breadboard inserted into the Pictail connector .........................................44
Figure 4.12 PIC32 Starter Kit52
(bottom view)....................................................................45
Figure 4.13 I/O Expansion Board with the Pictail connector
53
...........................................................45
Figure 4.14 All the hardware assembled and tested, ready to be programmed..................46
Figure 4.15 4-Wire SPI Interface55
......................................................................................48
Figure 4.16 CC2500 Address Header56
...............................................................................48
Figure 4.17 Single Byte Access: register writing (top) and reading (bottom)57
............... 49
Figure 4.18 SPI Clock Phase and Polarity55
.........................................................................49
Figure 4.19 Configuration registers overview59
...................................................................50
Figure 4.20 Complete Radio Control State Diagram60
.........................................................52
Figure 5.1 Command Strobes list61
......................................................................................56
Figure 5.2 SPI Module Block Diagram68
.............................................................................60
Figure 5.3 Read and Write SPI operation sampled with a logic analyzer...........................62
Figure 5.4 State transition timing70
......................................................................................63
Figure 5.5 Hyperterminal screenshot while calling different output functions..................66
Figure 5.6 Packet Size options71
..........................................................................................68
Figure 5.7 Packet Format72
..................................................................................................69
Figure 5.8 PATABLE Schematic view75
.............................................................................74
Figure 5.9 Available output power levels75
..........................................................................74
Figure 5.10 Variable Base Adaptive Frequency Hopping System program flow...............82
Figure 5.11 Variable Base Adaptive Frequency Hopping System program flow...............87
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 5
List of Tables
Table 3.1 Unlicensed Bands in the UK21
.............................................................................20
Table 3.2: Network protocols characteristics40
....................................................................26
Table 4.1Product comparison guide for the 2.4 GHz ISM band44
.......................................36
Table 4.2 PIN connection list...............................................................................................43
Table 6.1 Test Results..........................................................................................................88
Table 6.2 Test Results..........................................................................................................89
Table 6.3 Test Results..........................................................................................................90
Table 6.4 Test Results..........................................................................................................91
Table 6.5 Test Results..........................................................................................................92
Table 6.6 Test Results..........................................................................................................93
Table 6.7 Test Results..........................................................................................................94
Abstract
The 2.4-2.4835 GHz ISM band has become very popular for home, office, and industrial
wireless systems. This band is shared by a vast variety of different applications and
protocols, making coexistence and interference a key issue.
The purpose of this paper is to design and develop a low-cost wireless MAC layer capable
of operating in the 2.4 GHz ISM band, coexisting with other common wireless standards.
To avoid interference and not to collide with other wireless transmissions, the Frequency
Hopping Spread Spectrum technique is used in this custom built network protocol.
The developed wireless protocol is especially designed to interconnect a network of nodes,
which are part of a sound masking system.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 6
At the end of the project period a FHSS system was developed, able to avoid interference
and coexist with the major wireless standards in the 2.4 GHz ISM band. This paper shows
the key challenges and all the steps involved in developing such system.
Declaration
The writer declares that no portion of the work referred to in the dissertation has been
submitted in support of an application for another degree or qualification of this or any
other university or other institute of learning.
Copyright Statement
Copyright in text of this dissertation rests with the author. Copies (by any process) either in
full, or of extracts, may be made only in accordance with instructions given by the author.
Details may be obtained from the appropriate Graduate Office. This page must form part of
any such copies made. Further copies (by any process) of copies made in accordance with
such instructions may not be made without the permission (in writing) of the author.
The ownership of any intellectual property rights which may be described in this
dissertation is vested in the University of Manchester, subject to any prior agreement to the
contrary, and may not be made available for use by third parties without the written
permission of the University, which will prescribe the terms and conditions of any such
agreement.
Further information on the conditions under which disclosures and exploitation may take
place is available from the Head of the School of Electrical and Electronic Engineering.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 7
Acknowledgment
I would like to thank Mr. R. Green for giving me the opportunity to take part in this
project; his highly competent teaching skills have made these past few months a very steep
learning curve, introducing me to the aspects involved in developing a wireless system.
I also take this opportunity to thank Dr. R. Brassington for his technical advices during
project development and Anand for sharing his practical experience with me.
I am indebted to my family for always being there and for giving me emotional and
financial support.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 8
Chapter 1
Introduction
1.1 Sound Masking Overview and Project Aim
Sound masking is the process of artificially creating a sound in order to smother an
unwanted noise. This technique, especially effective in enclosed spaces, is achieved by
arranging a network of sensors and loudspeakers that constantly survey the environment
for any unwanted sound. If a noise source is detected, the network of loudspeakers
dynamically emit a smothering sound wave that covers up the noise, reducing the noise
impact on the people nearby.
If for example an intermittent noise is present in a room, the occupants of that room will
constantly perceive that noise and will repeatedly be disturbed. If instead a sound masking
system is installed in that same room, the system sensors will detect the noise source and
compensate it by constantly emitting (from its loudspeakers array) an especially
engineered sound wave, effectively reducing the noise awareness by the room occupants.
Such a system increases people‟s concentration and attentiveness by reducing noise
consciousness and distractions from the nearby environment.
For this reason, sound masking technology is often used in places like open plan offices or
meeting halls, since fitting an enclosed space with this kind of system improves
productivity and efficiency. Furthermore, the system loudspeakers can be used to broadcast
messages in the area or can be used for paging. Most of the time these systems installed
above the ceiling tile, making them invisible to the people beneath them.
Figure 1.1 shows a typical sound masking system installed in a working environment.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 9
Figure 1.1 Sound Masking System installed under the office ceiling tile1
Sound masking is not to be confused with active noise control: in fact, sound masking
systems reduce noise awareness by covering pre-existing noises up with special sound
patterns, while active noise control systems tend to cancel noises by re emitting the noise
sound wave with an opposite phase, ideally deleting the original noise. The latter technique
is more effective in reducing noise perception when the noise pattern is unique and both
the noise source and the listener are in a constant and known position- for example, active
noise control is an effective way to remove the rotor noise from a helicopter pilot‟s
headphones. Consequently to improve productivity, concentration and speech privacy in
work and public environments sound masking systems represent the best choice and are
widely used.
Embedded System Projects2
is an audio systems company based in Manchester, England. It
develops and produces a range of products focused on acoustics and digital signal
processing. The company also produces a sound masking system which consists of a
network of digital signal processing boards each coupled with a sound sensor and a
loudspeaker, all forming an independent network node.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 10
In order to achieve a coherent and effective sound masking effect each network node has
to be connected and be able to communicate with the rest of the network. This ensures that
the information about the environment is shared among all the network nodes and enables
the digital signal processing boards to generate an efficient smothering sound, where and
when needed.
The company present-day sound masking system implements a wired connection between
the network nodes. This ensures a safe and reliable connection, however such a wired link
makes the system installation costs even higher than the system itself and limits the
flexibility of arranging the nodes where most needed. In fact, to ensure the best system
performances, each node has to be strategically placed in the room -this is not always
possible if a wired connection is used, especially if the installation takes place in historical
buildings. Moreover, the average system requires several dozens of nodes, each few meters
apart and the wire connecting all of them can become very expensive and time consuming.
As a result, the aim of this project is to develop a board that can be attached to existing
sound masking systems, adding wireless communication capability. Each signal processing
board will be connected with a wireless board, forming a wireless network. Consequently,
adding a wireless device to each node will eliminate the need for expensive and bulky
wired connection.
Using a wireless link to connect each network node will improve the overall sound
masking performance, allowing a more flexible and more efficient, node positioning; and
above all, it will greatly reduce
installation costs.
Such a wireless transmission system is
meant to provide the same link quality
and reliability offered by the wire
connection, ensuring a constant linkage
between all the system units.
To accomplish the drastic installation cost
reduction, the wireless system has to
operate within a frequency range where no
license is required to transmit; To achieve this, it will have to operate within a license free
Figure 1.2 Wireless transmission system applied to a
network node
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 11
frequency range -therefore coexist and not interfere with a wide variety of different devices
and protocols that crowd the license free spectrum.
One of the main challenges of this project is to develop a low cost transmission system
able to establish a wireless link using frequencies shared by a vast number of popular
standards such as local area networks, cordless phones, personal area networks, alarm
systems and so on.
To achieve this result, a special communication technique called Frequency Hopping
Spread Spectrum3
(also known as FHSS) is used. This method, initially developed for
military applications, allows wireless communication even in presence of strong
electromagnetic interference and avoids jammed frequencies.
In particular, with this technique the sender transmits information over a particular
frequency for a certain amount of time, then hops to another carrier and start transmitting
on that frequency until it hops to another one, and so on. The time spent transmitting on
each frequency is called dwell time, while the time that lapses between hops is called blank
time. The shorter the dwell time is, the faster the hopping rate will be; and the shorter the
blank time, the more efficient the system is, as less time is spent without data transmission.
Often the carrier frequency pattern used is pseudo-random, which makes very hard for an
unauthorized person to intercept data, as the frequency of transmission is unknown.
However, one of the main challenges for a FHSS system is synchronization: in fact, to
ensure constant communication between sender and receiver, both must be tuned in the
same frequency at the exact same time –which is particularly hard when the frequency
pattern used by the transmitter is random.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 12
Figure 1.3 Frequency Hopping terminology4
Such a method, even if developed by the military to avoid data interception, is ideal for
civilian application where the need to coexist with other wireless standards in the area
rises. As matter of fact, as FHSS can constantly use different carrier frequencies, it avoids
busy channels, thus permitting a reliable wireless link even in those electromagnetically
crowded bands.
1.2 Structure of Dissertation
This paper is divided into chapters that reflect the project development timeline. Firstly, in
chapter 2, the project technical requirements dictated by the requesting company are listed.
These requirements impose specific choices for both the hardware component selection
and software structure. Chapter 3 analyzes what is probably the main property of a wireless
system: the frequency of operation. Various aspects, including the need of a license free
transmission and antenna dimensions, determine the frequency choice. This choice, in its
turn, has consequent repercussions in all the project development.
Such aspects are discussed in chapter 4, where the whole system in analyzed in its main
functionalities, from a system high-level point of view. Chapter 4 also focuses on the
hardware components that make up the transmission system, with some aspects of the
hardware testing that was involved after the hardware assembly.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 13
Moreover, this chapter exposes the high-level software design, explaining what the
software main tasks will be.
A more detailed explanation of the software implementation is given in chapter 5, in which
all the steps involved in building the system software are analyzed in deep.
In fact, given the complexity of the project, to achieve the requested aim and requirements
the main task was divided in subsequent phases. Each phase represent a key step toward
the main task accomplishment.
The developed system is tested over chapter 6, where all different system parameters are
discussed to achieve better performances.
Lastly, chapter 7 discusses the conclusions and gives propositions for further work on the
whole system.
1.3 Achievements
The results achieved during the development of this project are:
 Peer to peer FHSS link with error detection system
 Scan of signal strength in the entire 2.4 GHz ISM spectrum
 Adaptive FHSS transmission system with network addresses
These results comply with the system requirements given at the start of the project.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 14
Chapter 2
Technical Requirements of a Typical Sound
Masking System
Key aspects for every wireless transmission system are frequency of operation, range,
throughput and link reliability. Embedded System Projects has produced a list of
requirements that the transmission system has to fulfil in order to make the sound masking
system work efficiently and reducing both production and installation costs.
2.1 Frequency of Operation
The wireless transmission system must be able to operate within an unlicensed spectrum
common in the UK, Europe, USA and Japan. In addition, the transmission system must use
transmission power, a modulation scheme and a data rate compatible with the above-
mentioned country regulations. In these countries, many companies are interested in
increasing efficiency and production in offices and work environments, hence those
nations represent the main market for sound masking technology.
Operating within an unlicensed spectrum increases flexibility and reduces costs because
transmitting in those frequencies does not require obtaining a license. However, such
frequencies tend to get always more and more electromagnetically crowded making
interference a major issue.
A requirement such as this deeply affects the hardware components selection, especially
the transceiver choice. As a matter of fact, it is the transceiver that will synthesize the
operation frequency, regulate the output power and apply a modulation scheme on the
carrier.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 15
2.2 Range and Network layout
The range for each network node must be adequate for effectively reaching every element
of the sub network that node is in. In fact, the whole sound masking network will be
divided into smaller sub networks, each positioned in an environment with particular
acoustic properties. The system works if every element in each sub network is able to
communicate with all the rest of the nodes making up that sub network. In addition, a
„master node‟, which is shared by two or more sub networks, grants communication
between different sub networks. In a typical sound masking system, each sub network is
formed by around 50 nodes5
; each about 10 meters apart. Figure 2.1 shows a typical
network layout.
The requirements imposed for the communication range also have an effect on the
hardware components selection. As a matter of fact, both the transmission power and the
antenna type must comply with those requirements.
Figure 2.1: Network Setup6
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 16
2.3 Data Rate
To ensure an effective and successful sound masking action the nodes in each sub network
need to be in constant communication, but not necessarily using a real time protocol. In
actual fact, each node transmits data at predetermined intervals to its neighbouring nodes,
sharing information about the environment noise pattern and level. This communication is
vital for the whole system to work properly and therefore has to be error proof.
For this reason, the transmission system must be able to detect when a transmission error
has occurred, in order not to share and process incorrect data. This implies that the
transceiver which is chosen for the wireless system has to be able to perform an error
detection technique.
Since the communication is not on real time if a faulty packet is received, the transmission
can either be repeated until the data is successfully received or either delayed until the
channel is good for data transmission. Such choices are to be taken when implementing the
upper layer of the communication protocol and will be made by the company, depending
on the required system performances.
However, it is fundamental that the hardware components in the wireless transmission
system are able to detect a faulty packet reception when it occurs.
The average traffic pattern of data shared between nodes in an typical system is shown on
figure 2.2.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 17
Figure 2.2: Traffic patterns in a typical sound masking system7
2.4 Wireless Coexistence
Another requirement is the coexistence between the sound masking transmission system
and other wireless standards that might be present in the same operational area.
In the places where sound masking technology is installed it is often easy to find other
wireless protocols –such as IEEE 802.118
(also known as Wi-Fi) or IEEE 802.15.19
(also
known as Bluetooth) or other short range devices like cordless phones, wireless security
cameras, pagers, alarm systems and wireless temperature sensors, to name a few. Such
systems nowadays are very common in working environments or public places, and all of
them use an unlicensed frequency range to operate.
Consequently, it is very likely to find a fully engaged unlicensed spectrum, making
coexistence and interference a major issue.
The requirement for the sound masking transmission system to be able to successfully
operate without jamming or interfering with other systems that could be transmitting in the
same range of frequencies at the same time is particularly demanding and represents the
main challenge for the project.
The sound masking wireless transmission system property to coexist with other wireless
standards present in the area is vital and represent a key feature for the system; in fact, if
this requirement is not completely fulfilled the whole product would be useless and
unsuccessful in the market.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 18
Chapter 3
Review of Communication in the ISM Band
3.1 Wireless Transmission in the Unlicensed Band
As discussed in the previous section the transmission system has to operate within an
unlicensed frequency range common to various countries; the International
Telecommunication Union10
is a worldwide organization which defines frequencies
allocation and wireless standards for every part of the globe. In particular, the ITU has
divided the world into three main regions: Region1 includes Europe, Africa, the Middle
East, the former Soviet Union area and Mongolia; Region2 comprises the Americas,
Greenland and some eastern Pacific Islands; while Region3 covers most of non former
Soviet Union countries in Asia, Iran and most of Oceania11
.
ITU determines common regulations used as a guideline for each region .Such regulations
are then adjusted by each singular country to suit their own needs, maintaining the basic
properties defined by the international organization.
The ITU regulations for each frequency range contain, among other things, information on
the purpose of the transmission, the maximum transmission power, modulation scheme and
license required.
In addition other standardization bodies that regulate the use of radio equipment for more
specific areas, for instance in Europe the standards are set by The European Conference of
Postal and Telecommunications Administrations12
(also known as CEPT) and also by the
European Telecommunications Standards Institute13
(or ETSI). While in the United States
the governing body concerning wireless systems is the Federal Communications
Commission14
(or FCC). In Japan instead, there is the Association of Radio Industries and
Business15
(or ARIB).
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 19
Such bodies regulate the requirements to a higher-level in respect to the general guidelines
given by the ITU. To be noted that in the case of the European Union the final regulations
are set by each country governing body: in the UK by the Office of Communications16
(or
Ofcom), in Germany by the Federal Network Agency for Electricity, Gas,
Telecommunications, Post and Railway17
, in Italy by the Ministero delle Communicationi18
and in France by the Ministere de l'Econonie des Finances et des L'Industrie19
, to name a
few. However, most of the frequency allocations and regulations tend to be very similar
throughout Europe, especially for those bands used by the public.
Some specific frequency ranges, allocated in different positions of the spectrum, are called
Industrial, Scientific and Medical band or ISM20
. In these ranges, one could operate a
wireless system without obtaining a license first.
Each nation could make use of some, all, or even more ISM bands than what assigned as a
guideline from the ITU. For instance table 3.1 shows all the ISM bands available in the
UK, the ranges and purposes are defined by the Ofcom; nevertheless, those bands are
common for most of the countries laying in the ITU Region1.
Generic Frequency
Band
Application
9 kHz to 30 MHz Short Range Inductive Applications
27 MHz Telemetry, Telecomm and Model Control
40 MHz Telemetry, Telecomm and Model Control
49 MHz General Purpose Low Power Devices
173 MHz Alarms, Telemetry, Telecomm and Medical Applications
405 MHz Ultra Low Power Medical Implants Devices
418 MHz General Purpose Telemetry and Telecomm and Applications
458 MHz Alarms, Telemetry, Telecomm and Medical Applications
864 MHz Cordless Audio Applications
868 MHz Alarms, Telemetry and Telecomm and Applications
2400 MHz General Purpose Short Range Applications, including CCTV and
RFID. Also used for WLANs including Bluetooth Applications.
5.8 GHz Hyper LANs, General Purpose Short Range Applications,
including Road Traffic and Transport Telematics
10.5 GHz Movement Detection
24 GHz Movement Detection
63 GHz 2nd Phase Road Traffic and Transport Telematics
76 GHz Vehicle Radar Systems
Table 3.1 Unlicensed Bands in the UK21
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 20
Although transmissions in those frequencies don‟t require one to obtain a license first,
unlicensed band does not mean unregulated –maximum transmission power, modulation
scheme, channel spacing and duty cycle rules are still imposed for system working in those
ranges. Often in these regulations when referring to power, all the measurements are done
using the Effective Isotropic Radiated Power parameter (also known as EIRP); this is by
definition the transmitted power radiating equally in all direction in the form of a spherical
wave. Therefore, a wireless system has to be approved by the respective governing body of
each country where it is going to be used before it could be sold in the public marked. The
regulations set for operating within an ISM band have safety reasons and regulate
transmissions between different protocols. In fact, those bands tend always to be busier,
with various types of protocols and modulations used at the same time; therefore
coexistence has to be kept.
3.2 ISM Band selection
To choose what ISM band is most suitable for this application different parameters have to
be taken into account: antenna dimension, components availability, path loss, scattering
and band usage status are among them. As the transmission system will be installed indoor
(often above the ceiling tile) and as the standard isotropic antenna length is related with the
frequency wavelength, ISM bands in the megahertz order and below are discarded (those
would require antennae several meters long). Another factor is path loss, in this case the
lowest the carrier frequency the lower atmosphere attenuation is encountered; however, the
relatively short distances between nodes make this parameter minor. Instead, the scattering
produced by the electromagnetic waves being reflected by objects increases with the
frequency, offering to the receiver a better multipath reception at higher frequencies -
particularly in small indoor environments where many objects could reflect the incident
wave. Given these considerations, the most suitable ISM bands for this kind of
transmission system are the 2.4 and 5.8 GHz, both offering small antenna dimension and
good scattering.
3.2.1 The 2.4 and 5.8 GHz ISM Bands
Both the 2.4 and 5.8 GHz ISM bands are very common worldwide and both offer good
physical characteristics in terms of scattering and multipath reception, short antenna
dimensions and certainly a high data rate. Yet, nowadays the 2.4 GHz band is more
popular as it is widely used by protocols such as IEEE 802.118
, IEEE 802.15.19
and IEEE
802.15.4-20061122
(also popularly known as Zigbee) to name a few. This means that this
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 21
frequency range is already likely to be electromagnetically crowded in actual public places
and working environments (even microwave ovens share this very same band).
On the other hand, this entails that manufacturing companies around the world have
already produced quite a large variety of components specially designed to work in this
frequency range. On the contrary, the 5 GHz ISM band is, at the moment this paper is
written, far less used for public products such as wireless local area networks or
communication devices. Consequently, this band is to be expected having far less data
traffic, hence interference. In contrast, as it is fairly new ISM band the choice of
components produced by manufacturers is fairly limited, which makes hard to find
hardware components that fulfil the system requirements.
There are also differences in the two bands in terms of maximum transmission power –for
example in Europe the European Conference of Postal and Telecommunications
Administrations has set the maximum EIRP power to 10mW for short-range devices23
.
Instead, in the 5.150-5.350 GHz ISM range (also called Band A, for indoor use only) the
maximum EIRP limit is set to 200mW with a power density of 10 mW/MHz24
; while in the
5.470-5.725 GHz ISM range (also called Band B, indoor and outdoor use allowed) the
maximum EIRP power is set to 1W with a power density of 50mW/MHz24
. This
difference in the maximum allowed EIRP output power in those two bands is due to the
fact that the path loss increases with the frequency, meaning that to achieve the same range
a 5GHz system would require higher output power.
Given the above considerations and the project technical requirements, the advantage of
having a wider choice in the transceiver selection makes the 2.4 GHz ISM band the
frequency range of choice for this project. This band in fact, even if more
electromagnetically crowded than the 5.4GHz ISM band, offers a vast variety of hardware
components that can accomplish in full the system performance required.
3.3 Comparison between wireless standards in the 2.4GHz ISM band
Since the 2.4GHz ISM band has been chosen as the project frequency range, here below is
listed a selection of the main protocols worldwide used in this frequency range. One of
these protocols could be chosen to be used in the sound masking transmission system; but
above all, these protocols are likely to be found in the area where the transmission system
will be operating. Hence, a good understanding of these standards and their properties
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 22
(such as bandwidth and modulation) makes easier to develop a system that will coexist
with them, avoiding interference.
3.3.1 IEEE 802.11 – The Wi-Fi Standard
Wireless fidelity (or Wi-Fi), is the popular name for the IEEE 802.11 standard.
With its many variants, has become the standard for public and private local area networks.
This standards allows to build up wireless local area networks in which users can access
the internet and share data at high speeds, reaching 600 Mbps with its latest standard
802.11n25
(which uses MIMO technology), with a reasonably wide operative range of
several tens of meters (although the maximum output power limit is set at 10dBm EIRP). It
is capabilities allow interconnecting up to 200726
users at the same time, far beyond what
needed in the case of sound masking systems.
On the other hand, these powerful performances come with a price of complexity; to
implement and to run the software with network protocol requires a relatively large amount
of computational power, which is not compatible with a low-cost system.
The Wi-Fi standards uses the whole 2.4 ISM spectrum, however the frequency range is
divided into 13 channels (in Europe), each of them 22MHz wide (the standards has been
adapted to different variants in the ISM band depending on the country, hence uses 11
channels in USA and 14 in Japan27
).
Each channel is masked with an attenuation of 30dB on the channel edges and since each
channel is 22MHz wide28
a maximum of four Wi-Fi channels can be used at the same time
without channel overlapping. In particular, to ideally achieve zero interference four LANs
could be set up in the same area using channel 1, 5, 9 and 13. Figure 3.1 shows a
representation of the Wi-Fi channels in the 2.4 ISM band.
Figure 3.1: Wi-Fi Channels in the 2.4 GHz ISM band
29
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 23
Thus, this protocol is most suited to share large quantities of data among a large number of
users, reaching rather high data rates. As this standard is very popular, it is reasonable to
expect some Wi-Fi channels present in the transmission system operating environment.
However, the standard property to use the ISM range dividing it into channels makes it
easier to avoid mutual interference between different systems.
3.3.2 IEEE 802.15.1 – The Bluetooth Standard
Another popular standard that uses the 2.4 ISM bad is the IEEE 802.15.1 Bluetooth
standard. It is particularly used for wireless personal area networks (WPAN) and short
range devices such as wireless keyboard or mouse, wireless microphones and wireless
printers. The standard development has been focused to achieve very low power
consumption and a transmission range of few meters (depending on the transceiver class),
with a modest data rate –making it suitable to interconnect the above mentioned devices.
The Bluetooth network is established between a device serving as a master and one or
more slave devices, this is also called Bluetooth piconet network. Unlike the Wi-Fi
standard, Bluetooth does not divide the ISM band into wide portions; instead, FHSS is
used, with the 2.4GHz ISM band divided in 79 channels of 1 MHz each30
. The fist channel
used has a frequency of 2402 MHz30
, while the other 78 channels are found incrementing
the frequency with a 1 MHz step (channel 2 at 2403MHz, channel 3 at 2404, and so on..).
For Bluetooth the dwell time is 625μs30
(corresponding to a hop rate of 1600 hops/second).
In the Piconet network the hopping pattern is pseudo-randomly chosen by the master,
which depending on the surrounding environment makes the selection on what frequencies
to use; the slave device instead keeps following the frequency pattern described by the
master24
. Designers used FHSS for this popular standard to avoid interference as the
2.4GHz ISM band is notoriously a crowded band. This standard both fits the requirements
of coexistence with other protocols (as it constantly moves along the spectrum it does not
jam other systems) and low cost.
However to accomplish the sound masking transmission system requirements a Bluetooth
class 1 or 2 would have to be used (slightly more expensive) and above all, the 802.15.1
standard allows a maximum number of active connection equal to eight30
, which is
incompatible with the requirements set by the sound masking system company. However,
as the example of this standard shows, the FHSS technique is an ideal method for wireless
coexistence.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 24
3.3.3 IEEE 802.15.4-2006 – The ZigBee Standard
ZigBee instead, is an industrial standard specially developed for low cost, low data rate
applications with a typical operating range of around 10 meters31
. As the bit rate that it can
support is quite limited, the Zigbee protocol is ideal for applications such as infrared
sensor, smoke detectors, meters readings or light switches. Most of all, this standard is
designed around an extremely low power consumption, in fact a transmission system to be
certified with the Zigbee standard must be battery powered, with at least a 2 year operating
lifetime. However the number of nodes in a Zigbee network can be greater than 65,00031
.
The modulation technique used in this standard is Direct Sequence Spread Spectrum,
which is particularly useful for fitting many users in a limited frequency range, but does
not offer the same anti-interference capabilities as FHSS.
3.3.4 Texas Instruments SimpliciTI
SimpliciTI is another network protocol commonly used within ISM bands. It has been
developed by Texas Instruments to help creating networks with its produces transceivers. It
is very similar to Zigbee for both data rate and range, making it ideal for application like
smoke detectors, alarms or automatic meter readings32
. Nonetheless, it is an open protocol
and does not require to be implemented into battery-powered systems. The maximum
number of nodes that can be set up into a network using the SimpliciTI standard is defined
as 232
, well beyond what required by the sound masking transmission system. On the other
hand, in order to use the SimpliciTI protocol Texas Instruments components have to be
used and the protocol used is not customizable, reducing the overall efficiency –as most of
its features will not be used in the transmission system. But above all, using this protocol
does not allow flexibility –every system aspect, including data rate, coexistence, bit-error-
rate will be strictly related to Texas Instruments original design, making it hard to modify
it to the sound masking transmission system needs.
Table 3.2 reassumes all the different network protocols characteristics
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 25
PROTOCOL PURPOSE ADVANTAGES DISADVANTAGES
FREQUENCY
RANGE
802.11 a/b/g/n
Medium range
wireless LAN
 Worldwide standard
 high data rates
 can implement
encrypted
communications
 Sensible cost
 Not readily
available
 Requires
elevated
computational
load and
software to be
implemented
2.4 GHz,
5 GHz
Bluetooth
Short range
wireless personal
area networks
 Worldwide standard
 Wide choice of low
cost components
 Good interoperability
 Short range
 Non suited for
crowded
environments
(limited
number of
channels)
2.4 GHz
Zigbee
Short range, very
low power
wireless
communication
link
 Worldwide standard
 Low cost components
and wide choice
 Very low power
consumption
 Low system
requirements
 Battery
powered
systems only
 Strict power
consumption
specifications
 Low data rate
2.4 GHz
TI SimpliciTI
Medium range
low power
wireless
communication
between devices3
 Low cost components
and wide choice
 Low power
consumption and duty
cycle;
 Low system
requirements
 TI devices to
be used
 Low data rate
 Non
customizable
protocol
Sub 1 GHz,
2.4 GHz
Custom
Purpose built:
bidirectional
peer-to-peer
communication
link
 Very low cost
hardware
 Highly efficient data
rate
 Low power
consumption
 Robust to channel
interferences
 Able to coexist with
other wireless
transmission
 Wide choice of low
cost components
 Time to
develop
 Network not
interoperable
with other
wireless
standards
Any ISM BAND
Table 3.2: Network protocols characteristics
40
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 26
3.4 2.4 GHz ISM Band Survey
Figure 3.2 shows a 2.4 GHz ISM band survey taken with a spectrum analyzer in a public
metropolitan area of Manchester, UK. The measurements were taken in the frequency
range spanning from 2.4 to 2.485 GHz using a resolution bandwidth of 1 kHz. In the graph,
it is possible to distinguish three different Wi-Fi channel used and Bluetooth activity over
different frequencies –seen as narrow channels 1MHz wide along all the spectrum. This
graph is a practical confirmation that the Wi-Fi standard uses portion of the spectrum well
defined in width and position, while Bluetooth uses a FHSS technique probing the
spectrum over different frequencies.
As the bit rate required by sound masking system does not need a wide bandwidth, the
transmission system could still operate in such crowded ISM band, avoiding those
frequencies already being used by the other standards.
It is then vital for the system to be able to first perform a scan of the band in order to
operate in those unused regions of the spectrum.
Figure 3.2: Spectrum Survey of the 2.4 GHz ISM Band
-140
-120
-100
-80
-60
-40
-20
0
2400.000001
2402.472728
2404.945455
2407.418182
2409.89091
2412.363637
2414.836364
2417.309091
2419.781819
2422.254546
2424.727273
2427.2
2429.672728
2432.145455
2434.618182
2437.09091
2439.563637
2442.036364
2444.509091
2446.981819
2449.454546
2451.927273
2454.4
2456.872728
2459.345455
2461.818182
2464.29091
2466.763637
2469.236364
2471.709091
2474.181819
2476.654546
2479.127273
2481.600001
2484.072728
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 27
3.5 Custom Built Protocol
The previously mentioned protocols represent a common and reliable solution used in great
deal of applications all over the world; yet, every standard protocol has its own benefits
and drawbacks and its characteristics are designed for a specific purpose.
An alternative of using a standard protocol would be developing a custom protocol from
ground up, a protocol especially designed for the sound masking transmission system.
A custom-made network protocol could be designed just for this wireless system,
improving efficiency and reducing the computational power required, hence the hardware
cost. Such custom build protocol can be fitted around the components selected and deal
with more flexibility issues like coexistence and interference.
In addition, if a non-standard protocol is implemented in the transmission, any possible
maintenance operation or future upgrade to be done on the system could be exclusively
performed by the manufacturing company, leaving no space for competitors.
Such protocol could make use of FHSS technology, which is one of the best methods to
improve standards coexistence.
It is then believed, that the best solution to meet the project requirements with the lowest
cost, is to develop a custom protocol especially designed for this application.
3.6 Additional Requirements for FHSS systems in the 2.4 GHz ISM
band
For wireless systems operating in Europe, The European Conference of Postal and
Telecommunications Administrations classifies, in its recommendation 70-0333
, the non-
specific short range devices in the 2.4GHz ISM band as class 1l23
. For this class of devices
the maximum transmission power is set at 10mW EIRP23
.
Furthermore, if such devices use FHSS technique they must also comply with the
European Telecommunications Standards Institute EN 300 44034
directive.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 28
This directive defines, among other specifications, that all systems belonging to class 1l
and using FHSS must
–define the occupied bandwidth where the spectral density is greater than -74.8dBm/Hz35
(or -30 dBm if measuring the power in a 30 KHz bandwidth);
-the transmitter maximum output power must not exceed the limit set in the ERC 70 03
directive35
;
-such measurements must be made using a hopping sequence with both the highest and
lowest hop frequency 35
(or each frequency in two different measurements);
-FHSS must make use of at least 20 channels separated by a channel bandwidth measured
with a drop of 20dB below the peak level; -the dwell time for each frequency must not
exceed 0.4 s36
;
-each channel must be used at least once in a period of time calculated with the formula:
𝑡 𝑚𝑖𝑛 = 4 × 𝑑𝑤𝑒𝑙𝑙𝑇𝑖𝑚𝑒 × 𝑡𝑜𝑡𝑎𝑙𝐶ℎ𝑎𝑛𝑛𝑒𝑙𝑠𝑁𝑢𝑚𝑏𝑒𝑟
-during the blanking time the transmit power must drop below 20nW36
(-47 dBm);
To be noted that as an eventual system malfunction would not involve any risk or danger to
a person, the ETSI does not require any selectivity or reliability requirement.
The above requirements are mandatory for every FHSS operating in Europe and
appropriate measurements must be made before the final system is sold in the market.
These regulations are harmonized throughout all the European countries, while in the USA
and Japan similar rules apply, however those are less restrictive.
To be noted that American FCC regulations measure the maximum transmission power in
terms of field strength instead of effective isotropic radiated power.
The transmission system development will then start implementing a custom FHSS
network protocol especially designed for the sound masking application. This protocol,
while fulfilling the company requirements, will also have to comply with the
aforementioned regulations.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 29
Chapter 4
System Design
4.1 High Level Design
In this section, the project system level design and main components will be outlined,
focusing on the reasons for each component to be included in the system.
In order to form a wireless network each node of the sound masking system has to be
connected with a wireless board. Each wireless board must consist, to perform the required
task, of several hardware components and software (which contains the network protocol).
As discussed in chapter 3.5, such software will be a custom-made network protocol built
from ground up; this can be designed to make each network node process, manage and
share data coming from the respective sound masking digital signal processing board. The
software must perform all different kind of operations required to transmit and receive the
information from one node to another. Such software can be written in a programming
language and then, once converted by compiler into machine language, stored into a non-
volatile memory inside each wireless board.
The main hardware components for each network node of the transmission system are: a
processing unit (to acquire, process and mange data), a transceiver (to convert the
information from binary code to modulated radio frequencies), a non-volatile memory
(large enough to contain all the network protocol) and an antenna (to transmit and receive
information using radio frequencies). Depending on the transceiver of choice could also be
needed (in the RF front-end) a power amplifier or low noise amplifier. Respectively in case
the output power has to be increased or the received signal is too weak to be successfully
decoded.
Figure 4.1 shows the schematic view of the main components for each network node.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 30
Figure 4.1 Wireless board and its main components connected to a sound masking node
The processing power needed for promptly executing the network protocol can be
addressed using a modern microcontroller. This is a unit which represents a good trade-off
between processing power and unit cost. Furthermore, high-end modern microcontrollers
are fitted with non-volatile memory on board big enough to store the whole network
protocol. Using this component, would remove the need to install for a separate non-
volatile memory, reducing the size of each node and facilitating the board layout.
In line with the system requirements, the transceiver main properties are: the possibility to
span the entire 2.4 GHz ISM band; to have FHSS capabilities; to transmit/receive with an
adequate data rate; and have the ability to detect when a faulty data reception occurs. Such
capabilities can be found in modern low-cost transceivers, which are especially made to
interoperate with microcontroller units. However those chips have often limited
transmission power, so it could become necessary to boost the output power with a power
amplifier to reach the require range (this always respecting the regulations regarding the
maximum EIRP output power). Moreover, low-cost transceivers sensitivity could be
enhanced adding a low-noise amplifier to increase the power lever of weak received
signals. Such extra components to be installed between the transceiver chip and the
antenna will increase the system capabilities, but will also increase the price and design
complexity.
The antenna is another vital system component, it can be isotropic (irradiating power
equally in all directions) or directional. Theoretically, to achieve best performances its
length must be equal to half of the carrier wavelength. This means, for frequencies in the
2.4 GHz ISM band, its length would be around 12.5 cm.
On the other hand, for short-range communications it is also possible to use a printed
circuited antenna (also called PCB antenna): this type of antenna often consists in a
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 31
microstrip track printed on the surface of the PCB board. Over the years, RF engineers
have designed advanced layouts for printed circuit antennae; probably the most successful
type of PCB antenna is what is commonly called the F antenna. This printed circuit
antenna is f-shaped and its dimensions are much shorter than conventional antennae: in
fact, f-antennae are usually not longer than few centimeters for the 2.4 GHz ISM band
frequencies. In addition, since it is only made of a microstrip track (with no need for a
balun) both production cost and layout complexity are reduced significantly. However, f-
antennae are designed for relatively short-range communications and its performances are
inferior to standard isotropic or directional antennae.
4.2 Hardware Component Selection
In this section, topics discussed comprise the selection for all hardware components to be
installed in each wireless board; such components will be chosen using parameters like the
requirements fulfilment, cost and ease of assembly as the main guideline.
In addition, the main aspects of hardware assembly and testing are discussed.
4.2.1. Microcontroller
As discussed in the previous section, a microcontroller unit is the ideal choice for giving
the wireless board enough processing power with both low cost and power consumption.
Even though low power consumption is not a requirement for this project, such feature
allows smaller packaging and eliminates the need for cooling fans. This makes the whole
board smaller, simpler to design and build, and above all, cheaper to produce.
Since the microcontroller will handle all the network protocol, the unit of choice has to be
a high-end model. Furthermore, as mentioned in the previous section, to simplify the board
layout and reduce the mounted components the microcontroller unit must be equipped with
enough onboard non-volatile memory to contain the whole network protocol software.
The major producers of these devices are Texas Instruments37
, Motorola38
and
Microchip39
. All these companies produce low-power, low-cost microcontrollers.
Currently, the most popular and widely used models are the MSP430 and PIC from Texas
Instruments and Microchip respectively. Using one of these devices would guarantee good
processing power, excellent reliability and low-cost. However, the company Embedded
Systems Projects have used Microchip components in the past and has some expertise in
programming such units. This would enable to company to provide product assistance and
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 32
upgrades in the future. Hence, the PIC microprocessor is the microprocessor type of
choice.
The PIC family is divided in three main categories, depending on the word length: 8-bit,
16-bit and 32-bit. The 32-bit PIC microcontroller is most performing in the PIC family; it
provides both relatively high processing power and built-in memory space.
However, PIC32 models are in respect to the 8 and 16-bit types generally more expensive,
have bigger packaging dimensions and higher power consumption.
Due to the complexity of the network protocol and as neither power consumption or layout
dimensions are critical in this project, the PIC32 microcontroller is chosen as the
processing unit. This high performance microcontroller is an adequate device to manage
communication with both the sound masking node and the transceiver.
The the PIC32 family contains several device models, each one built with different
characteristics and features designed for specific area of application.
The microcontroller will be interfaced between the digital signal processing board (in the
sound masking system node) and the transceiver, both using an SPI connection to
communicate. Therefore, the model of choice must feature at least two SPI ports.
This essential feature narrows down the list of possible models to be chosen within the
PIC32 family. As mentioned, enough on-board memory is another vital requirement;
which is why, a model with 512 KB of built in non-volatile memory is preferred.
A PIC32 model that contains the required feature is the PIC32MX360F512L41
; in fact, this
high performance microcontroller has a clock frequency of 80 MHz and a word length of
32 bit, giving it fine processing power. It also features 512 KB of on-board flash memory;
it is equipped with 2 SPI ports; and it has a low price unit.
As a result, the PIC32MX360F512L is chosen to be the project microcontroller unit.
Figure 4.2 reassumes the microcontroller main features.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 33
Figure 4.2 PIC32MX360F512L main features
42
4.2.2 Transceiver
The transceiver unit has the purpose to transmit data over RF frequencies to be shared in
the network. Therefore this is a vital component and extreme care has been taken to select
the most suitable chip. As mentioned in chapter 3, the 2.4 GHz ISM band is very used
worldwide therefore there is quite a wide variety of components to choose from. However,
the nature of the project and its requirements –the FHSS implementation above all- require
an accurate component selection. In particular properties such as frequency span,
frequency resolution, maximum output power, data rate, receiver sensitivity and frequency
calibration speed are the main criteria used to select the appropriate component.
As previously said, for this frequency range many companies such as RF Micro Devices 43
,
Texas Instruments and Microchip, however Texas Instruments has developed over the
years a wide variety of transceivers for the most used frequency range, gaining a leading
position in the market. As a matter of fact, table 4.1 shows all the transceiver made
available from Texas Instruments for the 2.4 GHz ISM band.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 34
Table 4.1Product comparison guide for the 2.4 GHz ISM band
44
As table 4.1 shows there is a vast selection of transceivers from Texas Instruments for the
required frequency range, however it is easily noticeable that the CC2500 is the most
suitable for the project. This transceiver has the best frequency resolution in the product
range (427 Hz, which is remarkable for a low-cost chip), a maximum data rate of 500 kbps
(which is adequate for the project requirements), a fairly good sensitivity and, above all,
it‟s capable of FHSS technique –meaning it can change carrier frequency at a high rate.
This transceiver is also capable of Cyclic Redundancy Check (CRC), which is a method
for detecting corrupted data reception. All these features make this chip fulfil the given
requirements.
Furthermore, with a high sensitivity and a maximum output power of 1 dBm, the CC2500
transceiver eliminates the need for a power amplifier and a low noise amplifier to be
mounted between the transceiver and the antenna for increasing the communication range.
If for example the free space propagation model is applied, it is possible to calculate the
attenuation in the RF signal in the typical distance between two network nodes:
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 35
𝐿 𝐹.𝑆. 𝑑𝐵 = −10 log
𝜆2
4𝜋𝑑 2 = −10 log⁡(
(
𝑐
2.44×109)2
(4𝜋×10)2 ) ≅ 60.18 dB equation 4.145
Where λ is the wavelength of the carrier in the middle of the ISM band, c is the speed of
light in vacuum and d the typical node distance (10 meters). Hence, the RF signal
travelling from one node to another is expected to suffer an attenuation of about 60.18 dB.
This large attenuation in the signal strength is due to the propagation of the wave – in fact,
as an electromagnetic wave travels it expands in a spherical order; therefore as the wave
travels in space its energy density decreases as the inverse of the squared distance.
The calculated loss in the signal strength is only an approximation, assuming no objects or
reflections occur. However, for relatively short distances this path loss approximation
could still be accurate.
If two isotropic antennae are used, the received signal strength can be calculated as:
𝑃𝑅 = 𝑃𝑇 + 𝐺 𝑇 + 𝐺 𝑅 − 𝐿 𝐹.𝑆. = −29 𝑑𝐵 − 60.18 𝑑𝐵 = −89.18 𝑑𝐵 = −59.18 𝑑𝐵𝑚
equation 4.245
Where PT is the transmission power in dB; while GT and GR are respectively the transmitter
and the receiver antenna gains, set to 0 dB as both antennae are passive devices ideally
radiating equally in every direction. Such power budget calculation will be repeated once
the antenna model is chosen; resulting in a more precise approximation.
As table 4.1 shows, a received signal strength of -59.18 dBm is well above the sensitivity
limit for the CC2500 transceiver (-99 dBm at 10kbps44
), even if the transmission uses with
the maximum data rate.
Consequently, due to its features, the Texas Instruments CC2500 is selected as the
transceiver of choice for this project.
4.3 Hardware Assembly and Testing
At this stage of the project, the two main components for the wireless transmission system
have been selected. The PIC32MX360F512L microcontroller will host on board and
execute the network protocol, sending and receiving data with both the sound masking
node and the CC2500 transceiver. The Texas Instruments chip instead will send and
receive data over RF frequencies, establishing a wireless link with all network nodes in its
sub network.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 36
Each wireless board will contain these two main components and an antenna.
However, the previously mentioned chips require the addition of several surface-mounted
components in order to work. These components can be mainly classified in resistors (to
adjust the voltage levels), capacitors (to filter frequencies or to accumulate charge for
current consumption peaks) and oscillators (to synthesize frequencies). For instance, figure
4.3 shows the external components that need to be connected to the CC2500 transceiver.
Figure 4.3 Overview of External Components to be connected to the CC2500 transceiver
46
The wireless board layout has to take account of those external components as well as the
SPI connection tracks and the antenna matching circuit. The layout design will be made for
mass production, optimizing size and cost for each board; however, the creation of such
layout is not part of this project.
In this project instead of using the boards with the custom layout, general-purpose
development boards will be used. Manufacturers equip these boards with all the surface
mounted components needed, plus some additional hardware (such as LCD screens,
communication ports, LEDs and sensors), to provide developers a ready to use platform for
a vast variety of applications. Development boards are in fact the best solution to reduce
the time required for hardware setup, as they come already fitted with all the parts a
developer needs for whole variety of different projects. On the other hand, these boards
have generally a higher unit price and bigger dimensions with respect to single purpose
boards, but are usually bought in small quantities just for prototyping.
Microchip produces several development boards; Explorer 1647
(shown in figure 4.4) is
among them and it is designed for the PIC microcontroller family. It supports different
types of microcontrollers, including the PIC32MX360F512L. This board includes many
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 37
different features with the most significant being a LCD display, serial connection,
potentiometer, USB port and a Pictail connector slot. Using such a board during the project
development stage would allow the use of all the PIC32 features without spending time for
the wireless board layout.
Figure 4.4 Microchip Explorer 16 Development Board
47
To furthermore reduce the time spent on hardware setup during the developing stage, a
pre-fabricated module could also be used for the transceiver. As a matter of fact, Texas
Instruments produces the CC2500EM module, which is a PCB board with installed the
CC2500 transceiver, all the external components required for a correct functioning and a
balun circuit for plugging an external antenna. This module represents a very effective and
rapid solution for using the transceiver; nevertheless, the unit price is fairly high and is not
a convenient choice for the prototyping stage.
Quasar UK48
, a company that produces RF modules, also manufactures a board with the
CC2500 chip installed with all the surface mounted components. This module also
includes an F antenna in the same PCB, which eliminates the need of purchasing an
external isotropic antenna. In addition, above all, the unit price for each module is
relatively very low.
On the other hand, the quality of the components used in this module –such as the
oscillator or the F antenna- will not offer the same transmission quality offered by the
Texas Instruments module or by a custom PCB layout with first quality components. Yet
this reduction in quality is acceptable for the prototype board, and this module was
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 38
approved to be part of the project; figure 4.5shows an image of the Quasar module, in
which can be seen: the CC2500 chip; its external surface mounted components; the SPI
connector; and the F antenna made by Microstrip tracks.
Figure 4.5 Quasar CC2500 module
48
Since an F antenna is mounted in the prototyping board, a reduction in the link range is
likely to occur; Quasar does not include in the module datasheet the antenna radiation
pattern, however an estimation can be made using the radiation pattern from a known
similar type of F antenna. The Texas Instruments 2.4 GHz Inverted F antenna has almost
the same layout characteristics, is therefore a good performance reference point for the
Quasar module F antenna. In figure 4.6 is shown the radiation pattern for the antenna XY
axis (the plane parallel to the PCB board).
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 39
Figure 4.6 Texas Instruments 2.4 GHz Inverted F Antenna
78
From the XY radiation pattern shown on figure 4.6, it is possible to notice that the antenna
gain drops consistently in those regions around 10º and 190 º, which correspond to the
ends of the antenna longitudinal axis. The typical F antenna radiation patter is far from
being isotropic. However, as an approximation, the average gain along the XY plane for
this type of antenna is 1.1 dB79
. Therefore. the received signal strength (equation 4.2) can
be re-calculated as (with both transmitter and receiver gains set as 1.1dB):
𝑃𝑅 = 𝑃𝑇 + 𝐺 𝑇 + 𝐺 𝑅 − 𝐿 𝐹.𝑆. = −29 𝑑𝐵 + 1.1 𝑑𝐵 + 1.1𝑑𝐵 − 60.18 𝑑𝐵 =
−86.98 𝑑𝐵 = −56.98 𝑑𝐵𝑚 equation 4.3
As a result, using the free space loss approximation over a 10 meters distance, the received
signal strength of at the receiver is -56.98 dBm; such power level is well above the
transceiver sensitivity (-99 dBm at 10kbps44
), making the Quasar CC2500 module an
adequate choice for the project requirements.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 40
To connect the transceiver module with the microcontroller SPI interface, the Explorer 16
Pictail connector can be used. Hence, a breadboard is plugged in the Pictail socket -each
contact in the breadboard matches to a pin in the PIC32. At this point a female connector
(which matches the male connector of the Quasar CC2500 module) is glued on one end of
the breadboard, creating a socket in which the transceiver module could be plugged in.
Finally, each pin of the female connector is soldered with the correspondent contact on the
breadboard, effectively putting in contact the CC2500 module with the PIC32 pins.
More in detail the connection between the CC2500 and the microcontroller was established
following the SPI protocol pinout. In fact, each SPI interface is made of 4 pins: serial data
in, serial data out, clock, and cable select. A description of the SPI protocol will be made in
the next chapter, however a correct hardware connection between the transceiver and the
microcontroller is vital for the system functioning.
Figure 4.7 shows the pinout on the Pictail connector on the Explorer 16 board (where the
SPI interface, power and ground PINs can be seen); while figure 4.8 shows the Quasar
CC2500 module.
Figure 4.7 Pictail connector pinout
49
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 41
Figure 4.8 Quasar CC2500 module pinout
50
Hence the connection order followed was:
CC2500 module Explorer 16 board
PIN 1 (Vcc 3.3 V) ↔ PIN 21 (Vcc 3.3 V)
PIN 2 (DATA IN) ↔ PIN 7 (DATA OUT)
PIN 3 (SPI CLOCK) ↔ PIN 3 (SPI CLOCK)
PIN 4 (DATA OUT) ↔ PIN 5 (DATA IN)
PIN 5 (NOT CONNECTED)
PIN 6 (GROUND) ↔ PIN 9 (GROUND)
PIN 7 (GDO0) ↔ PIN 101 (I/O PIN)
PIN 8 (CABLE SELECT) ↔ PIN 1 (CABLE SELECT)
Table 4.2 PIN connection list
Table 4.2 shows the SPI pinout configuration: the microcontroller data output pin is
connected with the data input pin on the CC2500, and similarly the microcontroller data
input is connected with the data output pin on the CC2500. These pins are used to transmit
data on the SPI interface. Instead, the clock pin is used to synchronize the SPI data
transfer; in fact, data will be sampled only when a transition occurs on this pin. The cable
select pin is used to enable or disable the communication with the transceiver. As a matter
of fact, communication with the transceiver can occur only if the cable select pin is at a
low logic level (0 V), instead if this pin is at a high logic level (3.3 V) the CC2500 will
ignore every communication.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 42
In order to avoid a „cold soldered joint‟ each connection was tested after the soldering. A
multimeter was used to check if electrical connection was established between the
microcontroller and the transceiver pins. Figures 4.9, 4.10 and 4.11 show the main steps
followed for connecting the microcontroller with the CC2500 module.
Figure 4.9 (left) Soldering the glued female connector with the corresponding contacts. Figure 4.10 (right)
Plugging the CC2500 module in the glued female connector.
Figure 4.11 The breadboard inserted into the Pictail connector of the Explorer 16 board.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 43
Once all the connections were verified and the breadboard (fitted with the CC2500
module) inserted into the Pictail connector, full communication was established between
the microcontroller and the CC2500 transceiver –effectively creating the prototype
wireless board. This board, in addition, is equipped with a serial connection which will
become very handy for debugging and testing during the network protocol development
phase.
However, in order to establish a wireless link at least two wireless boards are needed; so
another development board and transceiver module are required. Microchip produces a
cheaper development board in respect to the Explorer 16, this smaller and simpler board is
named PIC32 Starter Kit51
. This development board comes fitted with a
PIC32MX360F512L microcontroller, a USB connection for programming, three LEDs and
a general-purpose expansion slot. This board has a lower price compared to other
development board; however, it does not include a serial connection or a Pictail connector.
For this reason, to connect the Starter Kit board to the breadboard fitted with the CC2500
module, a Microchip „I/O Expansion Card‟ is first plugged on top of the Starter Kit
expansion slot. Since such expansion card is equipped with a Pictail connector, a
breadboard could then be inserted, finally connecting the microcontroller in the Starter Kit
with the CC2500 module. Figure 4.12 and 4.13 show the afore mentioned components.
Figure 4.12 PIC32 Starter Kit
52
(bottom view). Figure 4.13 I/O Expansion Board with the Pictail connector
53
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 44
As the Pictail connector in Microchip I/O Expansion card has the exact same pin layout as
the Pictail connector, the pin connection list used is the same as shown in table 4.2 in the
case of the Explore 16 board. For this board also the all series of connection tests were
performed, assuring a reliable link between the CC2500 and microcontroller pins.
Figure 4.14 All the hardware assembled and tested, ready to be programmed
At this point all the hardware which is needed to perform a peer to peer wireless link is
assembled and tested. Setting up a link with two boards will allow to develop a network
protocol that can be extended to a network of nodes. As all the hardware required is all set,
the next project phase is the software development.
4.4 Software Design
Both development boards are equipped with the same microcontroller unit, the well
mentioned PIC32MX360F512L. To make the microcontrollers manage their respective
transceiver unit a firmware must first be programmed into the onboard flash memory. Such
firmware, (also simply called microcontroller software) will contain all the instructions and
modus operandi to run the wireless link, so such element represents the key project aspect.
This protocol will have to make the most of the hardware installed on each board.
4.4.1 Software Environment
Microchip has developed a software environment called MPLAB54
specifically designed
for programming Microchip microcontrollers and digital signal processors. These units are
general-purpose processors and need a firmware to be installed in their on board flash
memory to operate. The device function is only dictated by the firmware installed. The
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 45
MPLAB PC program allows developers to write the firmware in C language, compile it,
and then transfer it into the device.
The first step for programming a device is selecting from a drop down menu, then
choosing what type of device is going to be used, the PIC32MX360F512L for this project.
Once the device is selected, a C program can be written in one or more source files, saved
as .c source file. The syntax and instructions set used in the MPLAB environment is very
similar to the standard ANSI C, however some specific functions are also implemented
(such as those for code optimization or device specific ones). After the C code is
completed, the MPLAB C compiler will first check the syntax of the code (looking for
errors or inconsistencies); then, if the check is successful, it will compile the C code.
Compiling the code transforms the human oriented C instructions into binary code, the also
called machine language. This series of ones and zeros contains all the instructions that the
device will run. Such code can vary from device to device: that is the reason why, prior to
compiling, the exact device type must be selected.
The next step is to transfer the just created code into the device, hence the device board
must be connected to the PC. Such operation can be done in several ways: by using a USB
cable, by using a ICD2 or a REAL ICE programmer. The method by which a device is
programmed depends on the connection used between the PC and the microcontroller
board; the main factor that changes using different transfer method is the transfer speed.
Furthermore, the REAL ICE programmer has the lowest program time and can be used for
debugging. In fact, the REAL ICE programmer can in real time pause the execution of a
device program, allowing developers to check the program flow and variables content. The
Explorer 16 developing board is compatible with a REAL ICE programmer while the
Starter Kit will be programmed through a USB cable.
After the device is programmed the code can be ran and paused from the MPLAB
environment, permitting developers to verify the program tasks. Figure 4.12 shows the
MPLAB environment with the development boards connected ready to be programmed.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 46
4.4.2 SPI Interface and Transceiver Configuration
While the microcontroller unit offers a
general purpose processing unit, that will
execute the instructions saved in its built it
memory, the CC2500 transceiver is
programmed through the 4 wired SPI
interface (figure 4.15). Moreover, the same
interface will be used to establish
communication between the wireless board
and sound masking node, however such
communication will not be discussed as it it not part of the project. The developemnt will
in fact focus on the network protocol (installed in the microcontroller) and in the
transceiver configuration.
More specifically, the CC2500 transceiver has 47 one byte long configuration registers,
that can be either read or written through the SPI protocol, configuring the transceiver; to
each register is assigned one or more specific chip feature. Hence, to modify the CC2500
behaviour and performance the microcontroller unit must access and modify several
transceiver registers. Each register is given a unique hexadecimal address, consequently for
accessing each register, the microcontroller unit must initially send the register address
(specifying if that register is going to be read or written) and then perform the read or write
operation. Such commands are sent using the SPI serial data out pin from the
microcontroller (MOSI); and received in the serial data in pin in the CC2500 (SI). Figure
4.16 shows the address header that must be sent by the microcontroller for accessing a
transceiver register. It is possible to notice that the most significant bit (MSB) specifies if
that register is going to be read or written (if zero it is a write operation, if one it is a read
operation). The second bit instead is the burst bit: if this bit is set, the transceiver will
expect multiple register read/write operations, not requiring the transmission of an address
header (an internal counter will automatically increase the address by one for every data
byte sent by the microcontroller). Finally, the last 6 bits represent the register address that
is going to be read or written.
Figure 4.15 4-Wire SPI Interface
55
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 47
Figure 4.16 CC2500 Address Header
56
The all sequence for reading and writing a register in the CC2500 is well shown by
figure4.17, found in the DN503 Chipcon design note.
Figure 4.17 Single Byte Access: register writing (top) and reading (bottom)
57
It is possible to notice that for establishing communication with the transceiver, the
microcontroller unit must first set the CS pin low, and then send the address header byte
-specifying in the most significant bit whether is a reading or writing operation. In case of
a write operation, after the header byte the microcontroller sends the byte to be written in
that register. Instead, in case of a read operation, after the header byte the microcontroller
just toggles the clock pin to receive the register content over its MISO pin. In fact, as the
SPI protocol specifies, every data transfer is done only when the CLK pin is toggled. In
case of the CC2500 the data is sampled on the clock transition from a low to a high level,
as shown by figure 4.18.
Figure 4.18 SPI Clock Phase and Polarity
55
Each configuration register has to be programmed with the specific value corresponding to
the desired functionality. In fact, it is by changing some specific configuration registers
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 48
that characteristics like modulation scheme, data rate, packet length or output power are
applied. Due to the big number of configuration registers and the high number of
transceiver functionalities, it can be a complex and time consuming operation to find, for
each configuration register, the exact value that produces the desired chip behaviour.
To help developers finding the correct registers values to program into the chip, a PC
software can be used. This software, produced by Texas Instruments, is called Studio RF58
.
Such software allows to selectively enable all the different options and transceiver
parameters, converting such choices into configuration registers values. It is also possible
to export such values with syntax compatible with the C programming language, making
easy to implement such code into the microcontroller software. However, the current
version of the program (v.6.11.5.0), is best suitable for programming transceivers installed
on Texas Instruments development boards. This is the reason why, for some specific
registers, the configuration values were calculated by hand. Figure 4.19 shows the list of
all the CC2550 configuration registers: the whole transceiver programming is dictated by
those registers values.
Figure 4.19 Configuration registers overview
59
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 49
The CC2500 transceiver it is quite a complex chip, however it is possible to send direct
command in order to change it is behaviour (or state). Such commands are also called
command strobes. A command strobe takes the shape of a one-byte long instruction, that
once received in the CC2500 serial data input pin, makes the chip „jump‟ in the requested
state. For instance, it is possible to send command strobes to make the chip go in reception
mode, transmission mode, idle mode or flush the data FIFOs (First Input First Output are
two special registers that contain data to be sent or just received. Both the transmit and
receive FIFO are for the CC2500 transceiver 64 bytes long.
In addition, every time the CC2500 receives a command strobe it also automatically
outputs on its serial output pin a status byte. Such status byte contains the main information
about the system status; such as the state in which the transceiver is or the number of bytes
in the FIFOs. Figure 4.19 shows the complete radio control state diagram of the CC2500
transceiver.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 50
Figure 4.20 Complete Radio Control State Diagram
60
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 51
As it is possible to notice from figure 4.20, sending command strobes allows to move
through the CC2500 states.
Therefore, the software managing the communication between the microcontroller and the
transceiver can be built on few basic functions:
 A function to read a specific register;
 A function to write a specific register;
 A function to send command strobes;
 A function to read the status byte;
All the tasks performed by the network protocol are made using those above basics
functions. For instance, to transmit data one only needs to fill the transmit FIFO (using the
write register function) and then enter in the transmit mode by sending the transmit strobe.
Similarly to receive data the procedure is to first enter in receive mode by sending the
receive strobe, then ensure a full packet is received and finally read the receive FIFO
(using the read function). Even changing carrier frequency involves, in this order, writing
into a register, sending a command strobe and reading a register.
Hence, the whole firmware is divided into four main source files:
 main.c (which contains the high level instructions);
 MicroSetup.c (which mainly contains a function used to setup the microcontroller
clock and serial connection. These functions are part of the Microchip library);
 SPI.c (which contains the mentioned basic functions);
 and RF.c (which contains those functions used to manage data transfer);
In the next chapter, all the functions used in the network protocol will be analyzed in
detail.
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 52
Chapter 5
Development of a FHSS MAC Layer Protocol
Developing a network protocol that uses FHSS technique is not a straightforward task,
since many aspects and details need to be taken into account. The approach adopted in this
project is to develop the MAC layer of the network protocol step-by-step, first starting with
a simple peer-to-peer link over a fixed carrier frequency. Once such result is achieved the
development will gradually evolve toward an adaptive FHSS network protocol. Hence, the
final network protocol will still contain most of the code used for a fixed frequency link;
with the addition of the more advanced functions.
The following functions are given in pseudo code, and describe all the operations needed
to control the CC2500. As the pseudo code is not device specific, such functions could
easily be ported to be ran by different microcontrollers. Furthermore, the device specific
functions, such as the ones used to configure the microcontroller clock speed and serial
communication are not explained. In fact, those are part of the standard code library and
have not been developed in this project. Such functions are standard for every PIC32
device and are all only called in the file MicroSetup.c. All the source code explained in this
chapter is found in full in the appendix at the end of this paper.
5.1 Basic Functions
As previously mentioned, the functions that perform basic transceiver operations (such as
read or write a register) are vital for the whole network protocol. These functions are
contained in the source file SPI.c. This file contains in its first lines some useful
definitions, which will make the code more readable and compact; the functions are here
explained in the same order as they appear in the SPI.c source file.
As the CC2500 has both address header and registers one byte long, it is useful to define a
custom variable type of the same size. This variable type has been called „BYTE‟ and is
defined as an unsigned char, meaning its content can be a number ranging from 0 to 255
(exactly as 28
, the byte definition).
The pseudo code instruction is: define type unsigned char as BYTE
“The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems”
Flavio Felici
University of Manchester 53
It is also useful to define the command strobes names: in fact, a hexadecimal number
represents each command strobe that can be sent to the transceiver. It is then easier to
define a name for each command strobe, in order to use just a name throughout the code
instead of its number. Table 5.1 shows the list of all command strobes that can be sent to
the CC2500 transceiver.
Figure 5.1 Command Strobes list
61
Therefore, for each command strobe a name was defined (the names are the same used in
Figure 5.1).
The pseudo code instruction is: define command strobe 0x30 as SRES
As showed by figure 4.17 for enabling communication with the CC2500 transceiver the
microcontroller must fist pull the cable select pin (CS) low. This is can be programmed
into the microcontroller using a PIC32 library function called PORTClearBits(PORT,
NUMBER)62
. Such function takes two parameters as input: the port number and the pin
number. In fact, in the PIC microcontroller family, all the pins are divided into ports
(ranging from A to G in the PIC32), where each port contains pin numbers (ranging from 0
to 15 in the PIC32). Hence, for referring to a specific microcontroller pin both the port and
the number must be specified. Therefore, a simple function named CSlow is created, which
by calling the PORTClearBits, allows to set the CS pin to a low logic level of 0 V,
enabling communication with the transceiver. As showed by figure 4.4, the cable select pin
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation
Flavio Felici Dissertation

More Related Content

Similar to Flavio Felici Dissertation

Analysis and Classification of ECG Signal using Neural Network
Analysis and Classification of ECG Signal using Neural NetworkAnalysis and Classification of ECG Signal using Neural Network
Analysis and Classification of ECG Signal using Neural NetworkZHENG YAN LAM
 
Anomaly_Analysis_of_OpenStack_Firewall_Polices_Report
Anomaly_Analysis_of_OpenStack_Firewall_Polices_ReportAnomaly_Analysis_of_OpenStack_Firewall_Polices_Report
Anomaly_Analysis_of_OpenStack_Firewall_Polices_ReportCiaran McDonald
 
Project report on Eye tracking interpretation system
Project report on Eye tracking interpretation systemProject report on Eye tracking interpretation system
Project report on Eye tracking interpretation systemkurkute1994
 
Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Cooper Wakefield
 
Scale The Realtime Web
Scale The Realtime WebScale The Realtime Web
Scale The Realtime Webpfleidi
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGANikita Pinto
 
bonino_thesis_final
bonino_thesis_finalbonino_thesis_final
bonino_thesis_finalDario Bonino
 
Distributed Decision Tree Learning for Mining Big Data Streams
Distributed Decision Tree Learning for Mining Big Data StreamsDistributed Decision Tree Learning for Mining Big Data Streams
Distributed Decision Tree Learning for Mining Big Data StreamsArinto Murdopo
 
project Report on LAN Security Manager
project Report on LAN Security Managerproject Report on LAN Security Manager
project Report on LAN Security ManagerShahrikh Khan
 
Wireshark user's guide
Wireshark user's guideWireshark user's guide
Wireshark user's guideGió Lào
 
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...Vassilis Valavanis
 

Similar to Flavio Felici Dissertation (20)

Master thesis
Master thesisMaster thesis
Master thesis
 
Analysis and Classification of ECG Signal using Neural Network
Analysis and Classification of ECG Signal using Neural NetworkAnalysis and Classification of ECG Signal using Neural Network
Analysis and Classification of ECG Signal using Neural Network
 
Anomaly_Analysis_of_OpenStack_Firewall_Polices_Report
Anomaly_Analysis_of_OpenStack_Firewall_Polices_ReportAnomaly_Analysis_of_OpenStack_Firewall_Polices_Report
Anomaly_Analysis_of_OpenStack_Firewall_Polices_Report
 
Project report on Eye tracking interpretation system
Project report on Eye tracking interpretation systemProject report on Eye tracking interpretation system
Project report on Eye tracking interpretation system
 
Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...
 
Diplomarbeit
DiplomarbeitDiplomarbeit
Diplomarbeit
 
Scale The Realtime Web
Scale The Realtime WebScale The Realtime Web
Scale The Realtime Web
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGA
 
Fbiht71598909167
Fbiht71598909167Fbiht71598909167
Fbiht71598909167
 
bonino_thesis_final
bonino_thesis_finalbonino_thesis_final
bonino_thesis_final
 
Tr1546
Tr1546Tr1546
Tr1546
 
diss
dissdiss
diss
 
Distributed Decision Tree Learning for Mining Big Data Streams
Distributed Decision Tree Learning for Mining Big Data StreamsDistributed Decision Tree Learning for Mining Big Data Streams
Distributed Decision Tree Learning for Mining Big Data Streams
 
Knapp_Masterarbeit
Knapp_MasterarbeitKnapp_Masterarbeit
Knapp_Masterarbeit
 
hardback
hardbackhardback
hardback
 
Master's Thesis
Master's ThesisMaster's Thesis
Master's Thesis
 
project Report on LAN Security Manager
project Report on LAN Security Managerproject Report on LAN Security Manager
project Report on LAN Security Manager
 
Wireshark user's guide
Wireshark user's guideWireshark user's guide
Wireshark user's guide
 
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...
Real-Time Vowel Synthesis - A Magnetic Resonator Piano Based Project_by_Vasil...
 
Investigation in deep web
Investigation in deep webInvestigation in deep web
Investigation in deep web
 

Flavio Felici Dissertation

  • 1. The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems A dissertation submitted to The University of Manchester for the degree of Master of Science in the Faculty of Engineering and Physical Sciences 2009 Flavio Felici School of Electrical and Electronic Engineering
  • 2. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 1 List of Contents List of Figures....................................................................................................................3 List of Tables.....................................................................................................................5 Abstract .............................................................................................................................5 Declaration ........................................................................................................................6 Copyright Statement ..........................................................................................................6 Acknowledgment...............................................................................................................7 Chapter 1...........................................................................................................................8 Introduction .......................................................................................................................8 1.1 Sound Masking Overview and Project Aim ..............................................................8 1.2 Structure of Dissertation.........................................................................................12 1.3 Achievements.........................................................................................................13 Chapter 2.........................................................................................................................14 Technical Requirements of a Typical Sound Masking System..........................................14 2.1 Frequency of Operation..........................................................................................14 2.2 Range and Network layout .....................................................................................15 2.3 Data Rate ...............................................................................................................16 2.4 Wireless Coexistence .............................................................................................17 Chapter 3.........................................................................................................................18 Review of Communication in the ISM Band ....................................................................18 3.1 Wireless Transmission in the Unlicensed Band.......................................................18 3.2 ISM Band selection ................................................................................................20 3.2.1 The 2.4 and 5.8 GHz ISM Bands .....................................................................20 3.3 Comparison between wireless standards in the 2.4GHz ISM band ..........................21 3.3.2 IEEE 802.15.1 – The Bluetooth Standard.........................................................23 3.3.3 IEEE 802.15.4-2006 – The ZigBee Standard ...................................................24 3.3.4 Texas Instruments SimpliciTI..........................................................................24
  • 3. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 2 3.4 2.4 GHz ISM Band Survey....................................................................................26 3.5 Custom Built Protocol............................................................................................27 3.6 Additional Requirements for FHSS systems in the 2.4 GHz ISM band ...................27 Chapter 4.........................................................................................................................29 System Design.................................................................................................................29 4.1 High Level Design .................................................................................................29 4.2 Hardware Component Selection .............................................................................31 4.2.1. Microcontroller...............................................................................................31 4.2.2 Transceiver......................................................................................................33 4.3 Hardware Assembly and Testing ............................................................................35 4.4 Software Design.....................................................................................................44 4.4.1 Software Environment.....................................................................................44 4.4.2 SPI Interface and Transceiver Configuration....................................................46 Chapter 5.........................................................................................................................52 Development of a FHSS MAC Layer Protocol.................................................................52 5.1 Basic Functions......................................................................................................52 5.2 Output Functions....................................................................................................61 5.3 Configuring the Transceiver ...................................................................................63 5.4 Fixed Frequency Transmission...............................................................................68 5.5 Frequency Hopping System....................................................................................71 5.6 Adaptive Frequency Hopping System.....................................................................75 5.7 Variable Base Adaptive Frequency Hopping System..............................................77 5.8 Network Setup .......................................................................................................80 5.9 Variable Base Adaptive Fast Frequency Hopping System.......................................81 Chapter 6.........................................................................................................................85 System Testing and Performance .....................................................................................85 6.1 Range Test .............................................................................................................85 6.2 Variable Base Adaptive FHSS System Test............................................................87
  • 4. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 3 Chapter 7.........................................................................................................................94 Conclusions and Further Work.........................................................................................94 References .......................................................................................................................96 Appendix A ...................................................................................................................102 Source Code ..................................................................................................................102 SPIc...........................................................................................................................102 Fast Hopping RF.c .....................................................................................................111 Appendix B....................................................................................................................120 Feasibility Study............................................................................................................120 Appendix C....................................................................................................................144 Datasheets Front Sheets .................................................................................................144 List of Figures Figure 1.1 Sound Masking System installed under the office ceiling tile1 ............................8 Figure 1.2 Wireless transmission system applied to a network node....................................9 Figure 1.3 Frequency Hopping terminology4 ......................................................................11 FIGURE 2.1:NETWORK SETUP 6 ..............................................................................................14 Figure 2.2: Traffic patterns in a typical sound masking system7 .........................................15 Figure 2.2: Traffic patterns in a typical sound masking system7 ........................................16 Figure 3.1: Wi-Fi Channels in the 2.4 GHz ISM band29 ......................................................23 Figure 3.2: Spectrum Survey of the 2.4 GHz ISM Band.....................................................27 Figure 4.1 Wireless board and its main components...........................................................31 Figure 4.2 PIC32MX360F512L main features42 .................................................................34 Figure 4.3 Overview of External Components....................................................................37 Figure 4.4 Microchip Explorer 16 Development Board47 ...................................................38 Figure 4.5 Quasar CC2500 module48 ...................................................................................39 Figure 4.6 Texas Instruments 2.4 GHz Inverted F Antenna78 ..............................................40 Figure 4.7 Pictail connector pinout49 ....................................................................................41
  • 5. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 4 Figure 4.8 Quasar CC2500 module pinout50 .......................................................................43 Figure 4.9 (left) Soldering the glued female connector ......................................................44 Figure 4.10 (right) Plugging the CC2500 module in the glued female connector.............44 Figure 4.11 The breadboard inserted into the Pictail connector .........................................44 Figure 4.12 PIC32 Starter Kit52 (bottom view)....................................................................45 Figure 4.13 I/O Expansion Board with the Pictail connector 53 ...........................................................45 Figure 4.14 All the hardware assembled and tested, ready to be programmed..................46 Figure 4.15 4-Wire SPI Interface55 ......................................................................................48 Figure 4.16 CC2500 Address Header56 ...............................................................................48 Figure 4.17 Single Byte Access: register writing (top) and reading (bottom)57 ............... 49 Figure 4.18 SPI Clock Phase and Polarity55 .........................................................................49 Figure 4.19 Configuration registers overview59 ...................................................................50 Figure 4.20 Complete Radio Control State Diagram60 .........................................................52 Figure 5.1 Command Strobes list61 ......................................................................................56 Figure 5.2 SPI Module Block Diagram68 .............................................................................60 Figure 5.3 Read and Write SPI operation sampled with a logic analyzer...........................62 Figure 5.4 State transition timing70 ......................................................................................63 Figure 5.5 Hyperterminal screenshot while calling different output functions..................66 Figure 5.6 Packet Size options71 ..........................................................................................68 Figure 5.7 Packet Format72 ..................................................................................................69 Figure 5.8 PATABLE Schematic view75 .............................................................................74 Figure 5.9 Available output power levels75 ..........................................................................74 Figure 5.10 Variable Base Adaptive Frequency Hopping System program flow...............82 Figure 5.11 Variable Base Adaptive Frequency Hopping System program flow...............87
  • 6. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 5 List of Tables Table 3.1 Unlicensed Bands in the UK21 .............................................................................20 Table 3.2: Network protocols characteristics40 ....................................................................26 Table 4.1Product comparison guide for the 2.4 GHz ISM band44 .......................................36 Table 4.2 PIN connection list...............................................................................................43 Table 6.1 Test Results..........................................................................................................88 Table 6.2 Test Results..........................................................................................................89 Table 6.3 Test Results..........................................................................................................90 Table 6.4 Test Results..........................................................................................................91 Table 6.5 Test Results..........................................................................................................92 Table 6.6 Test Results..........................................................................................................93 Table 6.7 Test Results..........................................................................................................94 Abstract The 2.4-2.4835 GHz ISM band has become very popular for home, office, and industrial wireless systems. This band is shared by a vast variety of different applications and protocols, making coexistence and interference a key issue. The purpose of this paper is to design and develop a low-cost wireless MAC layer capable of operating in the 2.4 GHz ISM band, coexisting with other common wireless standards. To avoid interference and not to collide with other wireless transmissions, the Frequency Hopping Spread Spectrum technique is used in this custom built network protocol. The developed wireless protocol is especially designed to interconnect a network of nodes, which are part of a sound masking system.
  • 7. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 6 At the end of the project period a FHSS system was developed, able to avoid interference and coexist with the major wireless standards in the 2.4 GHz ISM band. This paper shows the key challenges and all the steps involved in developing such system. Declaration The writer declares that no portion of the work referred to in the dissertation has been submitted in support of an application for another degree or qualification of this or any other university or other institute of learning. Copyright Statement Copyright in text of this dissertation rests with the author. Copies (by any process) either in full, or of extracts, may be made only in accordance with instructions given by the author. Details may be obtained from the appropriate Graduate Office. This page must form part of any such copies made. Further copies (by any process) of copies made in accordance with such instructions may not be made without the permission (in writing) of the author. The ownership of any intellectual property rights which may be described in this dissertation is vested in the University of Manchester, subject to any prior agreement to the contrary, and may not be made available for use by third parties without the written permission of the University, which will prescribe the terms and conditions of any such agreement. Further information on the conditions under which disclosures and exploitation may take place is available from the Head of the School of Electrical and Electronic Engineering.
  • 8. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 7 Acknowledgment I would like to thank Mr. R. Green for giving me the opportunity to take part in this project; his highly competent teaching skills have made these past few months a very steep learning curve, introducing me to the aspects involved in developing a wireless system. I also take this opportunity to thank Dr. R. Brassington for his technical advices during project development and Anand for sharing his practical experience with me. I am indebted to my family for always being there and for giving me emotional and financial support.
  • 9. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 8 Chapter 1 Introduction 1.1 Sound Masking Overview and Project Aim Sound masking is the process of artificially creating a sound in order to smother an unwanted noise. This technique, especially effective in enclosed spaces, is achieved by arranging a network of sensors and loudspeakers that constantly survey the environment for any unwanted sound. If a noise source is detected, the network of loudspeakers dynamically emit a smothering sound wave that covers up the noise, reducing the noise impact on the people nearby. If for example an intermittent noise is present in a room, the occupants of that room will constantly perceive that noise and will repeatedly be disturbed. If instead a sound masking system is installed in that same room, the system sensors will detect the noise source and compensate it by constantly emitting (from its loudspeakers array) an especially engineered sound wave, effectively reducing the noise awareness by the room occupants. Such a system increases people‟s concentration and attentiveness by reducing noise consciousness and distractions from the nearby environment. For this reason, sound masking technology is often used in places like open plan offices or meeting halls, since fitting an enclosed space with this kind of system improves productivity and efficiency. Furthermore, the system loudspeakers can be used to broadcast messages in the area or can be used for paging. Most of the time these systems installed above the ceiling tile, making them invisible to the people beneath them. Figure 1.1 shows a typical sound masking system installed in a working environment.
  • 10. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 9 Figure 1.1 Sound Masking System installed under the office ceiling tile1 Sound masking is not to be confused with active noise control: in fact, sound masking systems reduce noise awareness by covering pre-existing noises up with special sound patterns, while active noise control systems tend to cancel noises by re emitting the noise sound wave with an opposite phase, ideally deleting the original noise. The latter technique is more effective in reducing noise perception when the noise pattern is unique and both the noise source and the listener are in a constant and known position- for example, active noise control is an effective way to remove the rotor noise from a helicopter pilot‟s headphones. Consequently to improve productivity, concentration and speech privacy in work and public environments sound masking systems represent the best choice and are widely used. Embedded System Projects2 is an audio systems company based in Manchester, England. It develops and produces a range of products focused on acoustics and digital signal processing. The company also produces a sound masking system which consists of a network of digital signal processing boards each coupled with a sound sensor and a loudspeaker, all forming an independent network node.
  • 11. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 10 In order to achieve a coherent and effective sound masking effect each network node has to be connected and be able to communicate with the rest of the network. This ensures that the information about the environment is shared among all the network nodes and enables the digital signal processing boards to generate an efficient smothering sound, where and when needed. The company present-day sound masking system implements a wired connection between the network nodes. This ensures a safe and reliable connection, however such a wired link makes the system installation costs even higher than the system itself and limits the flexibility of arranging the nodes where most needed. In fact, to ensure the best system performances, each node has to be strategically placed in the room -this is not always possible if a wired connection is used, especially if the installation takes place in historical buildings. Moreover, the average system requires several dozens of nodes, each few meters apart and the wire connecting all of them can become very expensive and time consuming. As a result, the aim of this project is to develop a board that can be attached to existing sound masking systems, adding wireless communication capability. Each signal processing board will be connected with a wireless board, forming a wireless network. Consequently, adding a wireless device to each node will eliminate the need for expensive and bulky wired connection. Using a wireless link to connect each network node will improve the overall sound masking performance, allowing a more flexible and more efficient, node positioning; and above all, it will greatly reduce installation costs. Such a wireless transmission system is meant to provide the same link quality and reliability offered by the wire connection, ensuring a constant linkage between all the system units. To accomplish the drastic installation cost reduction, the wireless system has to operate within a frequency range where no license is required to transmit; To achieve this, it will have to operate within a license free Figure 1.2 Wireless transmission system applied to a network node
  • 12. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 11 frequency range -therefore coexist and not interfere with a wide variety of different devices and protocols that crowd the license free spectrum. One of the main challenges of this project is to develop a low cost transmission system able to establish a wireless link using frequencies shared by a vast number of popular standards such as local area networks, cordless phones, personal area networks, alarm systems and so on. To achieve this result, a special communication technique called Frequency Hopping Spread Spectrum3 (also known as FHSS) is used. This method, initially developed for military applications, allows wireless communication even in presence of strong electromagnetic interference and avoids jammed frequencies. In particular, with this technique the sender transmits information over a particular frequency for a certain amount of time, then hops to another carrier and start transmitting on that frequency until it hops to another one, and so on. The time spent transmitting on each frequency is called dwell time, while the time that lapses between hops is called blank time. The shorter the dwell time is, the faster the hopping rate will be; and the shorter the blank time, the more efficient the system is, as less time is spent without data transmission. Often the carrier frequency pattern used is pseudo-random, which makes very hard for an unauthorized person to intercept data, as the frequency of transmission is unknown. However, one of the main challenges for a FHSS system is synchronization: in fact, to ensure constant communication between sender and receiver, both must be tuned in the same frequency at the exact same time –which is particularly hard when the frequency pattern used by the transmitter is random.
  • 13. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 12 Figure 1.3 Frequency Hopping terminology4 Such a method, even if developed by the military to avoid data interception, is ideal for civilian application where the need to coexist with other wireless standards in the area rises. As matter of fact, as FHSS can constantly use different carrier frequencies, it avoids busy channels, thus permitting a reliable wireless link even in those electromagnetically crowded bands. 1.2 Structure of Dissertation This paper is divided into chapters that reflect the project development timeline. Firstly, in chapter 2, the project technical requirements dictated by the requesting company are listed. These requirements impose specific choices for both the hardware component selection and software structure. Chapter 3 analyzes what is probably the main property of a wireless system: the frequency of operation. Various aspects, including the need of a license free transmission and antenna dimensions, determine the frequency choice. This choice, in its turn, has consequent repercussions in all the project development. Such aspects are discussed in chapter 4, where the whole system in analyzed in its main functionalities, from a system high-level point of view. Chapter 4 also focuses on the hardware components that make up the transmission system, with some aspects of the hardware testing that was involved after the hardware assembly.
  • 14. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 13 Moreover, this chapter exposes the high-level software design, explaining what the software main tasks will be. A more detailed explanation of the software implementation is given in chapter 5, in which all the steps involved in building the system software are analyzed in deep. In fact, given the complexity of the project, to achieve the requested aim and requirements the main task was divided in subsequent phases. Each phase represent a key step toward the main task accomplishment. The developed system is tested over chapter 6, where all different system parameters are discussed to achieve better performances. Lastly, chapter 7 discusses the conclusions and gives propositions for further work on the whole system. 1.3 Achievements The results achieved during the development of this project are:  Peer to peer FHSS link with error detection system  Scan of signal strength in the entire 2.4 GHz ISM spectrum  Adaptive FHSS transmission system with network addresses These results comply with the system requirements given at the start of the project.
  • 15. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 14 Chapter 2 Technical Requirements of a Typical Sound Masking System Key aspects for every wireless transmission system are frequency of operation, range, throughput and link reliability. Embedded System Projects has produced a list of requirements that the transmission system has to fulfil in order to make the sound masking system work efficiently and reducing both production and installation costs. 2.1 Frequency of Operation The wireless transmission system must be able to operate within an unlicensed spectrum common in the UK, Europe, USA and Japan. In addition, the transmission system must use transmission power, a modulation scheme and a data rate compatible with the above- mentioned country regulations. In these countries, many companies are interested in increasing efficiency and production in offices and work environments, hence those nations represent the main market for sound masking technology. Operating within an unlicensed spectrum increases flexibility and reduces costs because transmitting in those frequencies does not require obtaining a license. However, such frequencies tend to get always more and more electromagnetically crowded making interference a major issue. A requirement such as this deeply affects the hardware components selection, especially the transceiver choice. As a matter of fact, it is the transceiver that will synthesize the operation frequency, regulate the output power and apply a modulation scheme on the carrier.
  • 16. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 15 2.2 Range and Network layout The range for each network node must be adequate for effectively reaching every element of the sub network that node is in. In fact, the whole sound masking network will be divided into smaller sub networks, each positioned in an environment with particular acoustic properties. The system works if every element in each sub network is able to communicate with all the rest of the nodes making up that sub network. In addition, a „master node‟, which is shared by two or more sub networks, grants communication between different sub networks. In a typical sound masking system, each sub network is formed by around 50 nodes5 ; each about 10 meters apart. Figure 2.1 shows a typical network layout. The requirements imposed for the communication range also have an effect on the hardware components selection. As a matter of fact, both the transmission power and the antenna type must comply with those requirements. Figure 2.1: Network Setup6
  • 17. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 16 2.3 Data Rate To ensure an effective and successful sound masking action the nodes in each sub network need to be in constant communication, but not necessarily using a real time protocol. In actual fact, each node transmits data at predetermined intervals to its neighbouring nodes, sharing information about the environment noise pattern and level. This communication is vital for the whole system to work properly and therefore has to be error proof. For this reason, the transmission system must be able to detect when a transmission error has occurred, in order not to share and process incorrect data. This implies that the transceiver which is chosen for the wireless system has to be able to perform an error detection technique. Since the communication is not on real time if a faulty packet is received, the transmission can either be repeated until the data is successfully received or either delayed until the channel is good for data transmission. Such choices are to be taken when implementing the upper layer of the communication protocol and will be made by the company, depending on the required system performances. However, it is fundamental that the hardware components in the wireless transmission system are able to detect a faulty packet reception when it occurs. The average traffic pattern of data shared between nodes in an typical system is shown on figure 2.2.
  • 18. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 17 Figure 2.2: Traffic patterns in a typical sound masking system7 2.4 Wireless Coexistence Another requirement is the coexistence between the sound masking transmission system and other wireless standards that might be present in the same operational area. In the places where sound masking technology is installed it is often easy to find other wireless protocols –such as IEEE 802.118 (also known as Wi-Fi) or IEEE 802.15.19 (also known as Bluetooth) or other short range devices like cordless phones, wireless security cameras, pagers, alarm systems and wireless temperature sensors, to name a few. Such systems nowadays are very common in working environments or public places, and all of them use an unlicensed frequency range to operate. Consequently, it is very likely to find a fully engaged unlicensed spectrum, making coexistence and interference a major issue. The requirement for the sound masking transmission system to be able to successfully operate without jamming or interfering with other systems that could be transmitting in the same range of frequencies at the same time is particularly demanding and represents the main challenge for the project. The sound masking wireless transmission system property to coexist with other wireless standards present in the area is vital and represent a key feature for the system; in fact, if this requirement is not completely fulfilled the whole product would be useless and unsuccessful in the market.
  • 19. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 18 Chapter 3 Review of Communication in the ISM Band 3.1 Wireless Transmission in the Unlicensed Band As discussed in the previous section the transmission system has to operate within an unlicensed frequency range common to various countries; the International Telecommunication Union10 is a worldwide organization which defines frequencies allocation and wireless standards for every part of the globe. In particular, the ITU has divided the world into three main regions: Region1 includes Europe, Africa, the Middle East, the former Soviet Union area and Mongolia; Region2 comprises the Americas, Greenland and some eastern Pacific Islands; while Region3 covers most of non former Soviet Union countries in Asia, Iran and most of Oceania11 . ITU determines common regulations used as a guideline for each region .Such regulations are then adjusted by each singular country to suit their own needs, maintaining the basic properties defined by the international organization. The ITU regulations for each frequency range contain, among other things, information on the purpose of the transmission, the maximum transmission power, modulation scheme and license required. In addition other standardization bodies that regulate the use of radio equipment for more specific areas, for instance in Europe the standards are set by The European Conference of Postal and Telecommunications Administrations12 (also known as CEPT) and also by the European Telecommunications Standards Institute13 (or ETSI). While in the United States the governing body concerning wireless systems is the Federal Communications Commission14 (or FCC). In Japan instead, there is the Association of Radio Industries and Business15 (or ARIB).
  • 20. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 19 Such bodies regulate the requirements to a higher-level in respect to the general guidelines given by the ITU. To be noted that in the case of the European Union the final regulations are set by each country governing body: in the UK by the Office of Communications16 (or Ofcom), in Germany by the Federal Network Agency for Electricity, Gas, Telecommunications, Post and Railway17 , in Italy by the Ministero delle Communicationi18 and in France by the Ministere de l'Econonie des Finances et des L'Industrie19 , to name a few. However, most of the frequency allocations and regulations tend to be very similar throughout Europe, especially for those bands used by the public. Some specific frequency ranges, allocated in different positions of the spectrum, are called Industrial, Scientific and Medical band or ISM20 . In these ranges, one could operate a wireless system without obtaining a license first. Each nation could make use of some, all, or even more ISM bands than what assigned as a guideline from the ITU. For instance table 3.1 shows all the ISM bands available in the UK, the ranges and purposes are defined by the Ofcom; nevertheless, those bands are common for most of the countries laying in the ITU Region1. Generic Frequency Band Application 9 kHz to 30 MHz Short Range Inductive Applications 27 MHz Telemetry, Telecomm and Model Control 40 MHz Telemetry, Telecomm and Model Control 49 MHz General Purpose Low Power Devices 173 MHz Alarms, Telemetry, Telecomm and Medical Applications 405 MHz Ultra Low Power Medical Implants Devices 418 MHz General Purpose Telemetry and Telecomm and Applications 458 MHz Alarms, Telemetry, Telecomm and Medical Applications 864 MHz Cordless Audio Applications 868 MHz Alarms, Telemetry and Telecomm and Applications 2400 MHz General Purpose Short Range Applications, including CCTV and RFID. Also used for WLANs including Bluetooth Applications. 5.8 GHz Hyper LANs, General Purpose Short Range Applications, including Road Traffic and Transport Telematics 10.5 GHz Movement Detection 24 GHz Movement Detection 63 GHz 2nd Phase Road Traffic and Transport Telematics 76 GHz Vehicle Radar Systems Table 3.1 Unlicensed Bands in the UK21
  • 21. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 20 Although transmissions in those frequencies don‟t require one to obtain a license first, unlicensed band does not mean unregulated –maximum transmission power, modulation scheme, channel spacing and duty cycle rules are still imposed for system working in those ranges. Often in these regulations when referring to power, all the measurements are done using the Effective Isotropic Radiated Power parameter (also known as EIRP); this is by definition the transmitted power radiating equally in all direction in the form of a spherical wave. Therefore, a wireless system has to be approved by the respective governing body of each country where it is going to be used before it could be sold in the public marked. The regulations set for operating within an ISM band have safety reasons and regulate transmissions between different protocols. In fact, those bands tend always to be busier, with various types of protocols and modulations used at the same time; therefore coexistence has to be kept. 3.2 ISM Band selection To choose what ISM band is most suitable for this application different parameters have to be taken into account: antenna dimension, components availability, path loss, scattering and band usage status are among them. As the transmission system will be installed indoor (often above the ceiling tile) and as the standard isotropic antenna length is related with the frequency wavelength, ISM bands in the megahertz order and below are discarded (those would require antennae several meters long). Another factor is path loss, in this case the lowest the carrier frequency the lower atmosphere attenuation is encountered; however, the relatively short distances between nodes make this parameter minor. Instead, the scattering produced by the electromagnetic waves being reflected by objects increases with the frequency, offering to the receiver a better multipath reception at higher frequencies - particularly in small indoor environments where many objects could reflect the incident wave. Given these considerations, the most suitable ISM bands for this kind of transmission system are the 2.4 and 5.8 GHz, both offering small antenna dimension and good scattering. 3.2.1 The 2.4 and 5.8 GHz ISM Bands Both the 2.4 and 5.8 GHz ISM bands are very common worldwide and both offer good physical characteristics in terms of scattering and multipath reception, short antenna dimensions and certainly a high data rate. Yet, nowadays the 2.4 GHz band is more popular as it is widely used by protocols such as IEEE 802.118 , IEEE 802.15.19 and IEEE 802.15.4-20061122 (also popularly known as Zigbee) to name a few. This means that this
  • 22. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 21 frequency range is already likely to be electromagnetically crowded in actual public places and working environments (even microwave ovens share this very same band). On the other hand, this entails that manufacturing companies around the world have already produced quite a large variety of components specially designed to work in this frequency range. On the contrary, the 5 GHz ISM band is, at the moment this paper is written, far less used for public products such as wireless local area networks or communication devices. Consequently, this band is to be expected having far less data traffic, hence interference. In contrast, as it is fairly new ISM band the choice of components produced by manufacturers is fairly limited, which makes hard to find hardware components that fulfil the system requirements. There are also differences in the two bands in terms of maximum transmission power –for example in Europe the European Conference of Postal and Telecommunications Administrations has set the maximum EIRP power to 10mW for short-range devices23 . Instead, in the 5.150-5.350 GHz ISM range (also called Band A, for indoor use only) the maximum EIRP limit is set to 200mW with a power density of 10 mW/MHz24 ; while in the 5.470-5.725 GHz ISM range (also called Band B, indoor and outdoor use allowed) the maximum EIRP power is set to 1W with a power density of 50mW/MHz24 . This difference in the maximum allowed EIRP output power in those two bands is due to the fact that the path loss increases with the frequency, meaning that to achieve the same range a 5GHz system would require higher output power. Given the above considerations and the project technical requirements, the advantage of having a wider choice in the transceiver selection makes the 2.4 GHz ISM band the frequency range of choice for this project. This band in fact, even if more electromagnetically crowded than the 5.4GHz ISM band, offers a vast variety of hardware components that can accomplish in full the system performance required. 3.3 Comparison between wireless standards in the 2.4GHz ISM band Since the 2.4GHz ISM band has been chosen as the project frequency range, here below is listed a selection of the main protocols worldwide used in this frequency range. One of these protocols could be chosen to be used in the sound masking transmission system; but above all, these protocols are likely to be found in the area where the transmission system will be operating. Hence, a good understanding of these standards and their properties
  • 23. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 22 (such as bandwidth and modulation) makes easier to develop a system that will coexist with them, avoiding interference. 3.3.1 IEEE 802.11 – The Wi-Fi Standard Wireless fidelity (or Wi-Fi), is the popular name for the IEEE 802.11 standard. With its many variants, has become the standard for public and private local area networks. This standards allows to build up wireless local area networks in which users can access the internet and share data at high speeds, reaching 600 Mbps with its latest standard 802.11n25 (which uses MIMO technology), with a reasonably wide operative range of several tens of meters (although the maximum output power limit is set at 10dBm EIRP). It is capabilities allow interconnecting up to 200726 users at the same time, far beyond what needed in the case of sound masking systems. On the other hand, these powerful performances come with a price of complexity; to implement and to run the software with network protocol requires a relatively large amount of computational power, which is not compatible with a low-cost system. The Wi-Fi standards uses the whole 2.4 ISM spectrum, however the frequency range is divided into 13 channels (in Europe), each of them 22MHz wide (the standards has been adapted to different variants in the ISM band depending on the country, hence uses 11 channels in USA and 14 in Japan27 ). Each channel is masked with an attenuation of 30dB on the channel edges and since each channel is 22MHz wide28 a maximum of four Wi-Fi channels can be used at the same time without channel overlapping. In particular, to ideally achieve zero interference four LANs could be set up in the same area using channel 1, 5, 9 and 13. Figure 3.1 shows a representation of the Wi-Fi channels in the 2.4 ISM band. Figure 3.1: Wi-Fi Channels in the 2.4 GHz ISM band 29
  • 24. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 23 Thus, this protocol is most suited to share large quantities of data among a large number of users, reaching rather high data rates. As this standard is very popular, it is reasonable to expect some Wi-Fi channels present in the transmission system operating environment. However, the standard property to use the ISM range dividing it into channels makes it easier to avoid mutual interference between different systems. 3.3.2 IEEE 802.15.1 – The Bluetooth Standard Another popular standard that uses the 2.4 ISM bad is the IEEE 802.15.1 Bluetooth standard. It is particularly used for wireless personal area networks (WPAN) and short range devices such as wireless keyboard or mouse, wireless microphones and wireless printers. The standard development has been focused to achieve very low power consumption and a transmission range of few meters (depending on the transceiver class), with a modest data rate –making it suitable to interconnect the above mentioned devices. The Bluetooth network is established between a device serving as a master and one or more slave devices, this is also called Bluetooth piconet network. Unlike the Wi-Fi standard, Bluetooth does not divide the ISM band into wide portions; instead, FHSS is used, with the 2.4GHz ISM band divided in 79 channels of 1 MHz each30 . The fist channel used has a frequency of 2402 MHz30 , while the other 78 channels are found incrementing the frequency with a 1 MHz step (channel 2 at 2403MHz, channel 3 at 2404, and so on..). For Bluetooth the dwell time is 625μs30 (corresponding to a hop rate of 1600 hops/second). In the Piconet network the hopping pattern is pseudo-randomly chosen by the master, which depending on the surrounding environment makes the selection on what frequencies to use; the slave device instead keeps following the frequency pattern described by the master24 . Designers used FHSS for this popular standard to avoid interference as the 2.4GHz ISM band is notoriously a crowded band. This standard both fits the requirements of coexistence with other protocols (as it constantly moves along the spectrum it does not jam other systems) and low cost. However to accomplish the sound masking transmission system requirements a Bluetooth class 1 or 2 would have to be used (slightly more expensive) and above all, the 802.15.1 standard allows a maximum number of active connection equal to eight30 , which is incompatible with the requirements set by the sound masking system company. However, as the example of this standard shows, the FHSS technique is an ideal method for wireless coexistence.
  • 25. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 24 3.3.3 IEEE 802.15.4-2006 – The ZigBee Standard ZigBee instead, is an industrial standard specially developed for low cost, low data rate applications with a typical operating range of around 10 meters31 . As the bit rate that it can support is quite limited, the Zigbee protocol is ideal for applications such as infrared sensor, smoke detectors, meters readings or light switches. Most of all, this standard is designed around an extremely low power consumption, in fact a transmission system to be certified with the Zigbee standard must be battery powered, with at least a 2 year operating lifetime. However the number of nodes in a Zigbee network can be greater than 65,00031 . The modulation technique used in this standard is Direct Sequence Spread Spectrum, which is particularly useful for fitting many users in a limited frequency range, but does not offer the same anti-interference capabilities as FHSS. 3.3.4 Texas Instruments SimpliciTI SimpliciTI is another network protocol commonly used within ISM bands. It has been developed by Texas Instruments to help creating networks with its produces transceivers. It is very similar to Zigbee for both data rate and range, making it ideal for application like smoke detectors, alarms or automatic meter readings32 . Nonetheless, it is an open protocol and does not require to be implemented into battery-powered systems. The maximum number of nodes that can be set up into a network using the SimpliciTI standard is defined as 232 , well beyond what required by the sound masking transmission system. On the other hand, in order to use the SimpliciTI protocol Texas Instruments components have to be used and the protocol used is not customizable, reducing the overall efficiency –as most of its features will not be used in the transmission system. But above all, using this protocol does not allow flexibility –every system aspect, including data rate, coexistence, bit-error- rate will be strictly related to Texas Instruments original design, making it hard to modify it to the sound masking transmission system needs. Table 3.2 reassumes all the different network protocols characteristics
  • 26. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 25 PROTOCOL PURPOSE ADVANTAGES DISADVANTAGES FREQUENCY RANGE 802.11 a/b/g/n Medium range wireless LAN  Worldwide standard  high data rates  can implement encrypted communications  Sensible cost  Not readily available  Requires elevated computational load and software to be implemented 2.4 GHz, 5 GHz Bluetooth Short range wireless personal area networks  Worldwide standard  Wide choice of low cost components  Good interoperability  Short range  Non suited for crowded environments (limited number of channels) 2.4 GHz Zigbee Short range, very low power wireless communication link  Worldwide standard  Low cost components and wide choice  Very low power consumption  Low system requirements  Battery powered systems only  Strict power consumption specifications  Low data rate 2.4 GHz TI SimpliciTI Medium range low power wireless communication between devices3  Low cost components and wide choice  Low power consumption and duty cycle;  Low system requirements  TI devices to be used  Low data rate  Non customizable protocol Sub 1 GHz, 2.4 GHz Custom Purpose built: bidirectional peer-to-peer communication link  Very low cost hardware  Highly efficient data rate  Low power consumption  Robust to channel interferences  Able to coexist with other wireless transmission  Wide choice of low cost components  Time to develop  Network not interoperable with other wireless standards Any ISM BAND Table 3.2: Network protocols characteristics 40
  • 27. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 26 3.4 2.4 GHz ISM Band Survey Figure 3.2 shows a 2.4 GHz ISM band survey taken with a spectrum analyzer in a public metropolitan area of Manchester, UK. The measurements were taken in the frequency range spanning from 2.4 to 2.485 GHz using a resolution bandwidth of 1 kHz. In the graph, it is possible to distinguish three different Wi-Fi channel used and Bluetooth activity over different frequencies –seen as narrow channels 1MHz wide along all the spectrum. This graph is a practical confirmation that the Wi-Fi standard uses portion of the spectrum well defined in width and position, while Bluetooth uses a FHSS technique probing the spectrum over different frequencies. As the bit rate required by sound masking system does not need a wide bandwidth, the transmission system could still operate in such crowded ISM band, avoiding those frequencies already being used by the other standards. It is then vital for the system to be able to first perform a scan of the band in order to operate in those unused regions of the spectrum. Figure 3.2: Spectrum Survey of the 2.4 GHz ISM Band -140 -120 -100 -80 -60 -40 -20 0 2400.000001 2402.472728 2404.945455 2407.418182 2409.89091 2412.363637 2414.836364 2417.309091 2419.781819 2422.254546 2424.727273 2427.2 2429.672728 2432.145455 2434.618182 2437.09091 2439.563637 2442.036364 2444.509091 2446.981819 2449.454546 2451.927273 2454.4 2456.872728 2459.345455 2461.818182 2464.29091 2466.763637 2469.236364 2471.709091 2474.181819 2476.654546 2479.127273 2481.600001 2484.072728
  • 28. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 27 3.5 Custom Built Protocol The previously mentioned protocols represent a common and reliable solution used in great deal of applications all over the world; yet, every standard protocol has its own benefits and drawbacks and its characteristics are designed for a specific purpose. An alternative of using a standard protocol would be developing a custom protocol from ground up, a protocol especially designed for the sound masking transmission system. A custom-made network protocol could be designed just for this wireless system, improving efficiency and reducing the computational power required, hence the hardware cost. Such custom build protocol can be fitted around the components selected and deal with more flexibility issues like coexistence and interference. In addition, if a non-standard protocol is implemented in the transmission, any possible maintenance operation or future upgrade to be done on the system could be exclusively performed by the manufacturing company, leaving no space for competitors. Such protocol could make use of FHSS technology, which is one of the best methods to improve standards coexistence. It is then believed, that the best solution to meet the project requirements with the lowest cost, is to develop a custom protocol especially designed for this application. 3.6 Additional Requirements for FHSS systems in the 2.4 GHz ISM band For wireless systems operating in Europe, The European Conference of Postal and Telecommunications Administrations classifies, in its recommendation 70-0333 , the non- specific short range devices in the 2.4GHz ISM band as class 1l23 . For this class of devices the maximum transmission power is set at 10mW EIRP23 . Furthermore, if such devices use FHSS technique they must also comply with the European Telecommunications Standards Institute EN 300 44034 directive.
  • 29. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 28 This directive defines, among other specifications, that all systems belonging to class 1l and using FHSS must –define the occupied bandwidth where the spectral density is greater than -74.8dBm/Hz35 (or -30 dBm if measuring the power in a 30 KHz bandwidth); -the transmitter maximum output power must not exceed the limit set in the ERC 70 03 directive35 ; -such measurements must be made using a hopping sequence with both the highest and lowest hop frequency 35 (or each frequency in two different measurements); -FHSS must make use of at least 20 channels separated by a channel bandwidth measured with a drop of 20dB below the peak level; -the dwell time for each frequency must not exceed 0.4 s36 ; -each channel must be used at least once in a period of time calculated with the formula: 𝑡 𝑚𝑖𝑛 = 4 × 𝑑𝑤𝑒𝑙𝑙𝑇𝑖𝑚𝑒 × 𝑡𝑜𝑡𝑎𝑙𝐶ℎ𝑎𝑛𝑛𝑒𝑙𝑠𝑁𝑢𝑚𝑏𝑒𝑟 -during the blanking time the transmit power must drop below 20nW36 (-47 dBm); To be noted that as an eventual system malfunction would not involve any risk or danger to a person, the ETSI does not require any selectivity or reliability requirement. The above requirements are mandatory for every FHSS operating in Europe and appropriate measurements must be made before the final system is sold in the market. These regulations are harmonized throughout all the European countries, while in the USA and Japan similar rules apply, however those are less restrictive. To be noted that American FCC regulations measure the maximum transmission power in terms of field strength instead of effective isotropic radiated power. The transmission system development will then start implementing a custom FHSS network protocol especially designed for the sound masking application. This protocol, while fulfilling the company requirements, will also have to comply with the aforementioned regulations.
  • 30. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 29 Chapter 4 System Design 4.1 High Level Design In this section, the project system level design and main components will be outlined, focusing on the reasons for each component to be included in the system. In order to form a wireless network each node of the sound masking system has to be connected with a wireless board. Each wireless board must consist, to perform the required task, of several hardware components and software (which contains the network protocol). As discussed in chapter 3.5, such software will be a custom-made network protocol built from ground up; this can be designed to make each network node process, manage and share data coming from the respective sound masking digital signal processing board. The software must perform all different kind of operations required to transmit and receive the information from one node to another. Such software can be written in a programming language and then, once converted by compiler into machine language, stored into a non- volatile memory inside each wireless board. The main hardware components for each network node of the transmission system are: a processing unit (to acquire, process and mange data), a transceiver (to convert the information from binary code to modulated radio frequencies), a non-volatile memory (large enough to contain all the network protocol) and an antenna (to transmit and receive information using radio frequencies). Depending on the transceiver of choice could also be needed (in the RF front-end) a power amplifier or low noise amplifier. Respectively in case the output power has to be increased or the received signal is too weak to be successfully decoded. Figure 4.1 shows the schematic view of the main components for each network node.
  • 31. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 30 Figure 4.1 Wireless board and its main components connected to a sound masking node The processing power needed for promptly executing the network protocol can be addressed using a modern microcontroller. This is a unit which represents a good trade-off between processing power and unit cost. Furthermore, high-end modern microcontrollers are fitted with non-volatile memory on board big enough to store the whole network protocol. Using this component, would remove the need to install for a separate non- volatile memory, reducing the size of each node and facilitating the board layout. In line with the system requirements, the transceiver main properties are: the possibility to span the entire 2.4 GHz ISM band; to have FHSS capabilities; to transmit/receive with an adequate data rate; and have the ability to detect when a faulty data reception occurs. Such capabilities can be found in modern low-cost transceivers, which are especially made to interoperate with microcontroller units. However those chips have often limited transmission power, so it could become necessary to boost the output power with a power amplifier to reach the require range (this always respecting the regulations regarding the maximum EIRP output power). Moreover, low-cost transceivers sensitivity could be enhanced adding a low-noise amplifier to increase the power lever of weak received signals. Such extra components to be installed between the transceiver chip and the antenna will increase the system capabilities, but will also increase the price and design complexity. The antenna is another vital system component, it can be isotropic (irradiating power equally in all directions) or directional. Theoretically, to achieve best performances its length must be equal to half of the carrier wavelength. This means, for frequencies in the 2.4 GHz ISM band, its length would be around 12.5 cm. On the other hand, for short-range communications it is also possible to use a printed circuited antenna (also called PCB antenna): this type of antenna often consists in a
  • 32. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 31 microstrip track printed on the surface of the PCB board. Over the years, RF engineers have designed advanced layouts for printed circuit antennae; probably the most successful type of PCB antenna is what is commonly called the F antenna. This printed circuit antenna is f-shaped and its dimensions are much shorter than conventional antennae: in fact, f-antennae are usually not longer than few centimeters for the 2.4 GHz ISM band frequencies. In addition, since it is only made of a microstrip track (with no need for a balun) both production cost and layout complexity are reduced significantly. However, f- antennae are designed for relatively short-range communications and its performances are inferior to standard isotropic or directional antennae. 4.2 Hardware Component Selection In this section, topics discussed comprise the selection for all hardware components to be installed in each wireless board; such components will be chosen using parameters like the requirements fulfilment, cost and ease of assembly as the main guideline. In addition, the main aspects of hardware assembly and testing are discussed. 4.2.1. Microcontroller As discussed in the previous section, a microcontroller unit is the ideal choice for giving the wireless board enough processing power with both low cost and power consumption. Even though low power consumption is not a requirement for this project, such feature allows smaller packaging and eliminates the need for cooling fans. This makes the whole board smaller, simpler to design and build, and above all, cheaper to produce. Since the microcontroller will handle all the network protocol, the unit of choice has to be a high-end model. Furthermore, as mentioned in the previous section, to simplify the board layout and reduce the mounted components the microcontroller unit must be equipped with enough onboard non-volatile memory to contain the whole network protocol software. The major producers of these devices are Texas Instruments37 , Motorola38 and Microchip39 . All these companies produce low-power, low-cost microcontrollers. Currently, the most popular and widely used models are the MSP430 and PIC from Texas Instruments and Microchip respectively. Using one of these devices would guarantee good processing power, excellent reliability and low-cost. However, the company Embedded Systems Projects have used Microchip components in the past and has some expertise in programming such units. This would enable to company to provide product assistance and
  • 33. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 32 upgrades in the future. Hence, the PIC microprocessor is the microprocessor type of choice. The PIC family is divided in three main categories, depending on the word length: 8-bit, 16-bit and 32-bit. The 32-bit PIC microcontroller is most performing in the PIC family; it provides both relatively high processing power and built-in memory space. However, PIC32 models are in respect to the 8 and 16-bit types generally more expensive, have bigger packaging dimensions and higher power consumption. Due to the complexity of the network protocol and as neither power consumption or layout dimensions are critical in this project, the PIC32 microcontroller is chosen as the processing unit. This high performance microcontroller is an adequate device to manage communication with both the sound masking node and the transceiver. The the PIC32 family contains several device models, each one built with different characteristics and features designed for specific area of application. The microcontroller will be interfaced between the digital signal processing board (in the sound masking system node) and the transceiver, both using an SPI connection to communicate. Therefore, the model of choice must feature at least two SPI ports. This essential feature narrows down the list of possible models to be chosen within the PIC32 family. As mentioned, enough on-board memory is another vital requirement; which is why, a model with 512 KB of built in non-volatile memory is preferred. A PIC32 model that contains the required feature is the PIC32MX360F512L41 ; in fact, this high performance microcontroller has a clock frequency of 80 MHz and a word length of 32 bit, giving it fine processing power. It also features 512 KB of on-board flash memory; it is equipped with 2 SPI ports; and it has a low price unit. As a result, the PIC32MX360F512L is chosen to be the project microcontroller unit. Figure 4.2 reassumes the microcontroller main features.
  • 34. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 33 Figure 4.2 PIC32MX360F512L main features 42 4.2.2 Transceiver The transceiver unit has the purpose to transmit data over RF frequencies to be shared in the network. Therefore this is a vital component and extreme care has been taken to select the most suitable chip. As mentioned in chapter 3, the 2.4 GHz ISM band is very used worldwide therefore there is quite a wide variety of components to choose from. However, the nature of the project and its requirements –the FHSS implementation above all- require an accurate component selection. In particular properties such as frequency span, frequency resolution, maximum output power, data rate, receiver sensitivity and frequency calibration speed are the main criteria used to select the appropriate component. As previously said, for this frequency range many companies such as RF Micro Devices 43 , Texas Instruments and Microchip, however Texas Instruments has developed over the years a wide variety of transceivers for the most used frequency range, gaining a leading position in the market. As a matter of fact, table 4.1 shows all the transceiver made available from Texas Instruments for the 2.4 GHz ISM band.
  • 35. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 34 Table 4.1Product comparison guide for the 2.4 GHz ISM band 44 As table 4.1 shows there is a vast selection of transceivers from Texas Instruments for the required frequency range, however it is easily noticeable that the CC2500 is the most suitable for the project. This transceiver has the best frequency resolution in the product range (427 Hz, which is remarkable for a low-cost chip), a maximum data rate of 500 kbps (which is adequate for the project requirements), a fairly good sensitivity and, above all, it‟s capable of FHSS technique –meaning it can change carrier frequency at a high rate. This transceiver is also capable of Cyclic Redundancy Check (CRC), which is a method for detecting corrupted data reception. All these features make this chip fulfil the given requirements. Furthermore, with a high sensitivity and a maximum output power of 1 dBm, the CC2500 transceiver eliminates the need for a power amplifier and a low noise amplifier to be mounted between the transceiver and the antenna for increasing the communication range. If for example the free space propagation model is applied, it is possible to calculate the attenuation in the RF signal in the typical distance between two network nodes:
  • 36. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 35 𝐿 𝐹.𝑆. 𝑑𝐵 = −10 log 𝜆2 4𝜋𝑑 2 = −10 log⁡( ( 𝑐 2.44×109)2 (4𝜋×10)2 ) ≅ 60.18 dB equation 4.145 Where λ is the wavelength of the carrier in the middle of the ISM band, c is the speed of light in vacuum and d the typical node distance (10 meters). Hence, the RF signal travelling from one node to another is expected to suffer an attenuation of about 60.18 dB. This large attenuation in the signal strength is due to the propagation of the wave – in fact, as an electromagnetic wave travels it expands in a spherical order; therefore as the wave travels in space its energy density decreases as the inverse of the squared distance. The calculated loss in the signal strength is only an approximation, assuming no objects or reflections occur. However, for relatively short distances this path loss approximation could still be accurate. If two isotropic antennae are used, the received signal strength can be calculated as: 𝑃𝑅 = 𝑃𝑇 + 𝐺 𝑇 + 𝐺 𝑅 − 𝐿 𝐹.𝑆. = −29 𝑑𝐵 − 60.18 𝑑𝐵 = −89.18 𝑑𝐵 = −59.18 𝑑𝐵𝑚 equation 4.245 Where PT is the transmission power in dB; while GT and GR are respectively the transmitter and the receiver antenna gains, set to 0 dB as both antennae are passive devices ideally radiating equally in every direction. Such power budget calculation will be repeated once the antenna model is chosen; resulting in a more precise approximation. As table 4.1 shows, a received signal strength of -59.18 dBm is well above the sensitivity limit for the CC2500 transceiver (-99 dBm at 10kbps44 ), even if the transmission uses with the maximum data rate. Consequently, due to its features, the Texas Instruments CC2500 is selected as the transceiver of choice for this project. 4.3 Hardware Assembly and Testing At this stage of the project, the two main components for the wireless transmission system have been selected. The PIC32MX360F512L microcontroller will host on board and execute the network protocol, sending and receiving data with both the sound masking node and the CC2500 transceiver. The Texas Instruments chip instead will send and receive data over RF frequencies, establishing a wireless link with all network nodes in its sub network.
  • 37. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 36 Each wireless board will contain these two main components and an antenna. However, the previously mentioned chips require the addition of several surface-mounted components in order to work. These components can be mainly classified in resistors (to adjust the voltage levels), capacitors (to filter frequencies or to accumulate charge for current consumption peaks) and oscillators (to synthesize frequencies). For instance, figure 4.3 shows the external components that need to be connected to the CC2500 transceiver. Figure 4.3 Overview of External Components to be connected to the CC2500 transceiver 46 The wireless board layout has to take account of those external components as well as the SPI connection tracks and the antenna matching circuit. The layout design will be made for mass production, optimizing size and cost for each board; however, the creation of such layout is not part of this project. In this project instead of using the boards with the custom layout, general-purpose development boards will be used. Manufacturers equip these boards with all the surface mounted components needed, plus some additional hardware (such as LCD screens, communication ports, LEDs and sensors), to provide developers a ready to use platform for a vast variety of applications. Development boards are in fact the best solution to reduce the time required for hardware setup, as they come already fitted with all the parts a developer needs for whole variety of different projects. On the other hand, these boards have generally a higher unit price and bigger dimensions with respect to single purpose boards, but are usually bought in small quantities just for prototyping. Microchip produces several development boards; Explorer 1647 (shown in figure 4.4) is among them and it is designed for the PIC microcontroller family. It supports different types of microcontrollers, including the PIC32MX360F512L. This board includes many
  • 38. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 37 different features with the most significant being a LCD display, serial connection, potentiometer, USB port and a Pictail connector slot. Using such a board during the project development stage would allow the use of all the PIC32 features without spending time for the wireless board layout. Figure 4.4 Microchip Explorer 16 Development Board 47 To furthermore reduce the time spent on hardware setup during the developing stage, a pre-fabricated module could also be used for the transceiver. As a matter of fact, Texas Instruments produces the CC2500EM module, which is a PCB board with installed the CC2500 transceiver, all the external components required for a correct functioning and a balun circuit for plugging an external antenna. This module represents a very effective and rapid solution for using the transceiver; nevertheless, the unit price is fairly high and is not a convenient choice for the prototyping stage. Quasar UK48 , a company that produces RF modules, also manufactures a board with the CC2500 chip installed with all the surface mounted components. This module also includes an F antenna in the same PCB, which eliminates the need of purchasing an external isotropic antenna. In addition, above all, the unit price for each module is relatively very low. On the other hand, the quality of the components used in this module –such as the oscillator or the F antenna- will not offer the same transmission quality offered by the Texas Instruments module or by a custom PCB layout with first quality components. Yet this reduction in quality is acceptable for the prototype board, and this module was
  • 39. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 38 approved to be part of the project; figure 4.5shows an image of the Quasar module, in which can be seen: the CC2500 chip; its external surface mounted components; the SPI connector; and the F antenna made by Microstrip tracks. Figure 4.5 Quasar CC2500 module 48 Since an F antenna is mounted in the prototyping board, a reduction in the link range is likely to occur; Quasar does not include in the module datasheet the antenna radiation pattern, however an estimation can be made using the radiation pattern from a known similar type of F antenna. The Texas Instruments 2.4 GHz Inverted F antenna has almost the same layout characteristics, is therefore a good performance reference point for the Quasar module F antenna. In figure 4.6 is shown the radiation pattern for the antenna XY axis (the plane parallel to the PCB board).
  • 40. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 39 Figure 4.6 Texas Instruments 2.4 GHz Inverted F Antenna 78 From the XY radiation pattern shown on figure 4.6, it is possible to notice that the antenna gain drops consistently in those regions around 10º and 190 º, which correspond to the ends of the antenna longitudinal axis. The typical F antenna radiation patter is far from being isotropic. However, as an approximation, the average gain along the XY plane for this type of antenna is 1.1 dB79 . Therefore. the received signal strength (equation 4.2) can be re-calculated as (with both transmitter and receiver gains set as 1.1dB): 𝑃𝑅 = 𝑃𝑇 + 𝐺 𝑇 + 𝐺 𝑅 − 𝐿 𝐹.𝑆. = −29 𝑑𝐵 + 1.1 𝑑𝐵 + 1.1𝑑𝐵 − 60.18 𝑑𝐵 = −86.98 𝑑𝐵 = −56.98 𝑑𝐵𝑚 equation 4.3 As a result, using the free space loss approximation over a 10 meters distance, the received signal strength of at the receiver is -56.98 dBm; such power level is well above the transceiver sensitivity (-99 dBm at 10kbps44 ), making the Quasar CC2500 module an adequate choice for the project requirements.
  • 41. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 40 To connect the transceiver module with the microcontroller SPI interface, the Explorer 16 Pictail connector can be used. Hence, a breadboard is plugged in the Pictail socket -each contact in the breadboard matches to a pin in the PIC32. At this point a female connector (which matches the male connector of the Quasar CC2500 module) is glued on one end of the breadboard, creating a socket in which the transceiver module could be plugged in. Finally, each pin of the female connector is soldered with the correspondent contact on the breadboard, effectively putting in contact the CC2500 module with the PIC32 pins. More in detail the connection between the CC2500 and the microcontroller was established following the SPI protocol pinout. In fact, each SPI interface is made of 4 pins: serial data in, serial data out, clock, and cable select. A description of the SPI protocol will be made in the next chapter, however a correct hardware connection between the transceiver and the microcontroller is vital for the system functioning. Figure 4.7 shows the pinout on the Pictail connector on the Explorer 16 board (where the SPI interface, power and ground PINs can be seen); while figure 4.8 shows the Quasar CC2500 module. Figure 4.7 Pictail connector pinout 49
  • 42. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 41 Figure 4.8 Quasar CC2500 module pinout 50 Hence the connection order followed was: CC2500 module Explorer 16 board PIN 1 (Vcc 3.3 V) ↔ PIN 21 (Vcc 3.3 V) PIN 2 (DATA IN) ↔ PIN 7 (DATA OUT) PIN 3 (SPI CLOCK) ↔ PIN 3 (SPI CLOCK) PIN 4 (DATA OUT) ↔ PIN 5 (DATA IN) PIN 5 (NOT CONNECTED) PIN 6 (GROUND) ↔ PIN 9 (GROUND) PIN 7 (GDO0) ↔ PIN 101 (I/O PIN) PIN 8 (CABLE SELECT) ↔ PIN 1 (CABLE SELECT) Table 4.2 PIN connection list Table 4.2 shows the SPI pinout configuration: the microcontroller data output pin is connected with the data input pin on the CC2500, and similarly the microcontroller data input is connected with the data output pin on the CC2500. These pins are used to transmit data on the SPI interface. Instead, the clock pin is used to synchronize the SPI data transfer; in fact, data will be sampled only when a transition occurs on this pin. The cable select pin is used to enable or disable the communication with the transceiver. As a matter of fact, communication with the transceiver can occur only if the cable select pin is at a low logic level (0 V), instead if this pin is at a high logic level (3.3 V) the CC2500 will ignore every communication.
  • 43. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 42 In order to avoid a „cold soldered joint‟ each connection was tested after the soldering. A multimeter was used to check if electrical connection was established between the microcontroller and the transceiver pins. Figures 4.9, 4.10 and 4.11 show the main steps followed for connecting the microcontroller with the CC2500 module. Figure 4.9 (left) Soldering the glued female connector with the corresponding contacts. Figure 4.10 (right) Plugging the CC2500 module in the glued female connector. Figure 4.11 The breadboard inserted into the Pictail connector of the Explorer 16 board.
  • 44. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 43 Once all the connections were verified and the breadboard (fitted with the CC2500 module) inserted into the Pictail connector, full communication was established between the microcontroller and the CC2500 transceiver –effectively creating the prototype wireless board. This board, in addition, is equipped with a serial connection which will become very handy for debugging and testing during the network protocol development phase. However, in order to establish a wireless link at least two wireless boards are needed; so another development board and transceiver module are required. Microchip produces a cheaper development board in respect to the Explorer 16, this smaller and simpler board is named PIC32 Starter Kit51 . This development board comes fitted with a PIC32MX360F512L microcontroller, a USB connection for programming, three LEDs and a general-purpose expansion slot. This board has a lower price compared to other development board; however, it does not include a serial connection or a Pictail connector. For this reason, to connect the Starter Kit board to the breadboard fitted with the CC2500 module, a Microchip „I/O Expansion Card‟ is first plugged on top of the Starter Kit expansion slot. Since such expansion card is equipped with a Pictail connector, a breadboard could then be inserted, finally connecting the microcontroller in the Starter Kit with the CC2500 module. Figure 4.12 and 4.13 show the afore mentioned components. Figure 4.12 PIC32 Starter Kit 52 (bottom view). Figure 4.13 I/O Expansion Board with the Pictail connector 53
  • 45. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 44 As the Pictail connector in Microchip I/O Expansion card has the exact same pin layout as the Pictail connector, the pin connection list used is the same as shown in table 4.2 in the case of the Explore 16 board. For this board also the all series of connection tests were performed, assuring a reliable link between the CC2500 and microcontroller pins. Figure 4.14 All the hardware assembled and tested, ready to be programmed At this point all the hardware which is needed to perform a peer to peer wireless link is assembled and tested. Setting up a link with two boards will allow to develop a network protocol that can be extended to a network of nodes. As all the hardware required is all set, the next project phase is the software development. 4.4 Software Design Both development boards are equipped with the same microcontroller unit, the well mentioned PIC32MX360F512L. To make the microcontrollers manage their respective transceiver unit a firmware must first be programmed into the onboard flash memory. Such firmware, (also simply called microcontroller software) will contain all the instructions and modus operandi to run the wireless link, so such element represents the key project aspect. This protocol will have to make the most of the hardware installed on each board. 4.4.1 Software Environment Microchip has developed a software environment called MPLAB54 specifically designed for programming Microchip microcontrollers and digital signal processors. These units are general-purpose processors and need a firmware to be installed in their on board flash memory to operate. The device function is only dictated by the firmware installed. The
  • 46. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 45 MPLAB PC program allows developers to write the firmware in C language, compile it, and then transfer it into the device. The first step for programming a device is selecting from a drop down menu, then choosing what type of device is going to be used, the PIC32MX360F512L for this project. Once the device is selected, a C program can be written in one or more source files, saved as .c source file. The syntax and instructions set used in the MPLAB environment is very similar to the standard ANSI C, however some specific functions are also implemented (such as those for code optimization or device specific ones). After the C code is completed, the MPLAB C compiler will first check the syntax of the code (looking for errors or inconsistencies); then, if the check is successful, it will compile the C code. Compiling the code transforms the human oriented C instructions into binary code, the also called machine language. This series of ones and zeros contains all the instructions that the device will run. Such code can vary from device to device: that is the reason why, prior to compiling, the exact device type must be selected. The next step is to transfer the just created code into the device, hence the device board must be connected to the PC. Such operation can be done in several ways: by using a USB cable, by using a ICD2 or a REAL ICE programmer. The method by which a device is programmed depends on the connection used between the PC and the microcontroller board; the main factor that changes using different transfer method is the transfer speed. Furthermore, the REAL ICE programmer has the lowest program time and can be used for debugging. In fact, the REAL ICE programmer can in real time pause the execution of a device program, allowing developers to check the program flow and variables content. The Explorer 16 developing board is compatible with a REAL ICE programmer while the Starter Kit will be programmed through a USB cable. After the device is programmed the code can be ran and paused from the MPLAB environment, permitting developers to verify the program tasks. Figure 4.12 shows the MPLAB environment with the development boards connected ready to be programmed.
  • 47. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 46 4.4.2 SPI Interface and Transceiver Configuration While the microcontroller unit offers a general purpose processing unit, that will execute the instructions saved in its built it memory, the CC2500 transceiver is programmed through the 4 wired SPI interface (figure 4.15). Moreover, the same interface will be used to establish communication between the wireless board and sound masking node, however such communication will not be discussed as it it not part of the project. The developemnt will in fact focus on the network protocol (installed in the microcontroller) and in the transceiver configuration. More specifically, the CC2500 transceiver has 47 one byte long configuration registers, that can be either read or written through the SPI protocol, configuring the transceiver; to each register is assigned one or more specific chip feature. Hence, to modify the CC2500 behaviour and performance the microcontroller unit must access and modify several transceiver registers. Each register is given a unique hexadecimal address, consequently for accessing each register, the microcontroller unit must initially send the register address (specifying if that register is going to be read or written) and then perform the read or write operation. Such commands are sent using the SPI serial data out pin from the microcontroller (MOSI); and received in the serial data in pin in the CC2500 (SI). Figure 4.16 shows the address header that must be sent by the microcontroller for accessing a transceiver register. It is possible to notice that the most significant bit (MSB) specifies if that register is going to be read or written (if zero it is a write operation, if one it is a read operation). The second bit instead is the burst bit: if this bit is set, the transceiver will expect multiple register read/write operations, not requiring the transmission of an address header (an internal counter will automatically increase the address by one for every data byte sent by the microcontroller). Finally, the last 6 bits represent the register address that is going to be read or written. Figure 4.15 4-Wire SPI Interface 55
  • 48. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 47 Figure 4.16 CC2500 Address Header 56 The all sequence for reading and writing a register in the CC2500 is well shown by figure4.17, found in the DN503 Chipcon design note. Figure 4.17 Single Byte Access: register writing (top) and reading (bottom) 57 It is possible to notice that for establishing communication with the transceiver, the microcontroller unit must first set the CS pin low, and then send the address header byte -specifying in the most significant bit whether is a reading or writing operation. In case of a write operation, after the header byte the microcontroller sends the byte to be written in that register. Instead, in case of a read operation, after the header byte the microcontroller just toggles the clock pin to receive the register content over its MISO pin. In fact, as the SPI protocol specifies, every data transfer is done only when the CLK pin is toggled. In case of the CC2500 the data is sampled on the clock transition from a low to a high level, as shown by figure 4.18. Figure 4.18 SPI Clock Phase and Polarity 55 Each configuration register has to be programmed with the specific value corresponding to the desired functionality. In fact, it is by changing some specific configuration registers
  • 49. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 48 that characteristics like modulation scheme, data rate, packet length or output power are applied. Due to the big number of configuration registers and the high number of transceiver functionalities, it can be a complex and time consuming operation to find, for each configuration register, the exact value that produces the desired chip behaviour. To help developers finding the correct registers values to program into the chip, a PC software can be used. This software, produced by Texas Instruments, is called Studio RF58 . Such software allows to selectively enable all the different options and transceiver parameters, converting such choices into configuration registers values. It is also possible to export such values with syntax compatible with the C programming language, making easy to implement such code into the microcontroller software. However, the current version of the program (v.6.11.5.0), is best suitable for programming transceivers installed on Texas Instruments development boards. This is the reason why, for some specific registers, the configuration values were calculated by hand. Figure 4.19 shows the list of all the CC2550 configuration registers: the whole transceiver programming is dictated by those registers values. Figure 4.19 Configuration registers overview 59
  • 50. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 49 The CC2500 transceiver it is quite a complex chip, however it is possible to send direct command in order to change it is behaviour (or state). Such commands are also called command strobes. A command strobe takes the shape of a one-byte long instruction, that once received in the CC2500 serial data input pin, makes the chip „jump‟ in the requested state. For instance, it is possible to send command strobes to make the chip go in reception mode, transmission mode, idle mode or flush the data FIFOs (First Input First Output are two special registers that contain data to be sent or just received. Both the transmit and receive FIFO are for the CC2500 transceiver 64 bytes long. In addition, every time the CC2500 receives a command strobe it also automatically outputs on its serial output pin a status byte. Such status byte contains the main information about the system status; such as the state in which the transceiver is or the number of bytes in the FIFOs. Figure 4.19 shows the complete radio control state diagram of the CC2500 transceiver.
  • 51. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 50 Figure 4.20 Complete Radio Control State Diagram 60
  • 52. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 51 As it is possible to notice from figure 4.20, sending command strobes allows to move through the CC2500 states. Therefore, the software managing the communication between the microcontroller and the transceiver can be built on few basic functions:  A function to read a specific register;  A function to write a specific register;  A function to send command strobes;  A function to read the status byte; All the tasks performed by the network protocol are made using those above basics functions. For instance, to transmit data one only needs to fill the transmit FIFO (using the write register function) and then enter in the transmit mode by sending the transmit strobe. Similarly to receive data the procedure is to first enter in receive mode by sending the receive strobe, then ensure a full packet is received and finally read the receive FIFO (using the read function). Even changing carrier frequency involves, in this order, writing into a register, sending a command strobe and reading a register. Hence, the whole firmware is divided into four main source files:  main.c (which contains the high level instructions);  MicroSetup.c (which mainly contains a function used to setup the microcontroller clock and serial connection. These functions are part of the Microchip library);  SPI.c (which contains the mentioned basic functions);  and RF.c (which contains those functions used to manage data transfer); In the next chapter, all the functions used in the network protocol will be analyzed in detail.
  • 53. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 52 Chapter 5 Development of a FHSS MAC Layer Protocol Developing a network protocol that uses FHSS technique is not a straightforward task, since many aspects and details need to be taken into account. The approach adopted in this project is to develop the MAC layer of the network protocol step-by-step, first starting with a simple peer-to-peer link over a fixed carrier frequency. Once such result is achieved the development will gradually evolve toward an adaptive FHSS network protocol. Hence, the final network protocol will still contain most of the code used for a fixed frequency link; with the addition of the more advanced functions. The following functions are given in pseudo code, and describe all the operations needed to control the CC2500. As the pseudo code is not device specific, such functions could easily be ported to be ran by different microcontrollers. Furthermore, the device specific functions, such as the ones used to configure the microcontroller clock speed and serial communication are not explained. In fact, those are part of the standard code library and have not been developed in this project. Such functions are standard for every PIC32 device and are all only called in the file MicroSetup.c. All the source code explained in this chapter is found in full in the appendix at the end of this paper. 5.1 Basic Functions As previously mentioned, the functions that perform basic transceiver operations (such as read or write a register) are vital for the whole network protocol. These functions are contained in the source file SPI.c. This file contains in its first lines some useful definitions, which will make the code more readable and compact; the functions are here explained in the same order as they appear in the SPI.c source file. As the CC2500 has both address header and registers one byte long, it is useful to define a custom variable type of the same size. This variable type has been called „BYTE‟ and is defined as an unsigned char, meaning its content can be a number ranging from 0 to 255 (exactly as 28 , the byte definition). The pseudo code instruction is: define type unsigned char as BYTE
  • 54. “The Application of Low-Power Wireless Networks to Wide-Area Distributed Audio Systems” Flavio Felici University of Manchester 53 It is also useful to define the command strobes names: in fact, a hexadecimal number represents each command strobe that can be sent to the transceiver. It is then easier to define a name for each command strobe, in order to use just a name throughout the code instead of its number. Table 5.1 shows the list of all command strobes that can be sent to the CC2500 transceiver. Figure 5.1 Command Strobes list 61 Therefore, for each command strobe a name was defined (the names are the same used in Figure 5.1). The pseudo code instruction is: define command strobe 0x30 as SRES As showed by figure 4.17 for enabling communication with the CC2500 transceiver the microcontroller must fist pull the cable select pin (CS) low. This is can be programmed into the microcontroller using a PIC32 library function called PORTClearBits(PORT, NUMBER)62 . Such function takes two parameters as input: the port number and the pin number. In fact, in the PIC microcontroller family, all the pins are divided into ports (ranging from A to G in the PIC32), where each port contains pin numbers (ranging from 0 to 15 in the PIC32). Hence, for referring to a specific microcontroller pin both the port and the number must be specified. Therefore, a simple function named CSlow is created, which by calling the PORTClearBits, allows to set the CS pin to a low logic level of 0 V, enabling communication with the transceiver. As showed by figure 4.4, the cable select pin