2.2 IEEE802.15.4
This standard defines the operation of low-rate Wireless Personal Area Network (LR-WPAN). The standard defines the physical layer (PHY) and medium access control (MAC) sublayer specifications
for low-data-rate wireless connectivity with fixed, portable, and moving devices with no battery or very
limited battery consumption requirements typically operating in the personal operating space. 4

2.2.1 General
IEEE standard 802.15.4 intends to offer the fundamental lower network layers of a type of Wireless Personal Area Network (WPAN) which focuses on low-cost, low-speed ubiquitous communication between devices. It can be contrasted with other approaches, such as Wi-Fi, which offer more bandwidth and require more power. The emphasis is on very low-cost communication of nearby devices which little to no underlying infrastructure, intending to exploit this to lower power consumption even more. 2 4
An LR-WPAN is a simple, low-cost communication network that allows wireless connectivity in
applications with limited power and relaxed throughput requirements. The main objectives of an LR-WPAN are ease of installation, reliable data transfer, extremely low cost, and a reasonable battery life, while maintaining a simple and flexible protocol. Some of the capabilities provided by this standard are as follows:2
— Star or peer-to-peer operation
— Unique 64-bit extended address or allocated 16-bit short address
— Optional allocation of guaranteed time slots (GTSs)
— Carrier sense multiple access with collision avoidance (CSMA-CA) or ALOHA channel access
— Fully acknowledged protocol for transfer reliability
— Low power consumption
— Energy detection (ED)
— Link quality indication (LQI)

This standard defines multiple PHYs operating in a variety of frequency bands, as described in 8.1.1.
Two different device types can participate in an IEEE 802.15.4 network: a full-function device (FFD) and a reduced-function device (RFD). An FFD is a device that is capable of serving as a personal area network (PAN) coordinator or a coordinator. An RFD is a device that is not capable of serving as either a PAN coordinator or a coordinator. An RFD is intended for applications that are extremely simple, such as a light switch or a passive infrared sensor; it does not have the need to send large amounts of data and only associates with a single FFD at a time. Consequently, the RFD can be implemented using minimal resources and memory capacity. 2
Two different device types can participate in an IEEE 802.15.4 network: a full-function device (FFD) and a reduced-function device (RFD). An FFD is a device that is capable of serving as a personal area network (PAN) coordinator or a coordinator. An RFD is a device that is not capable of serving as either a PAN
coordinator or a coordinator. An RFD is intended for applications that are extremely simple, such as a light switch or a passive infrared sensor; it does not have the need to send large amounts of data and only associates with a single FFD at a time. Consequently, the RFD can be implemented using minimal resources and memory capacity. 4

2.2.2 Components of the IEEE 802.15.4 WPAN

A system conforming to this standard consists of several components. The most basic is the device. Two or more devices communicating on the same physical channel constitute a WPAN. However, this WPAN includes at least one FFD, which operates as the PAN coordinator.
A well-defined coverage area does not exist for wireless media because propagation characteristics are
dynamic and uncertain. Small changes in position or direction often result in drastic differences in the signal strength or quality of the communication link. These effects occur whether a device is stationary or mobile, as moving objects affect station-to-station propagation.

2.2.3 Network topologies

Depending on the application requirements, an IEEE 802.15.4 LR-WPAN operates in either of two
topologies: the star topology or the peer-to-peer topology. Both are shown in Figure 1. In the star topology, the communication is established between devices and a single central controller, called the PAN coordinator. A device typically has some associated application and is either the initiation point or the termination point for network communications. A PAN coordinator can also have a specific application, but it can be used to initiate, terminate, or route communication around the network. The PAN coordinator is the primary controller of the PAN. All devices operating on a network of either topology have unique addresses, referred to as extended addresses. A device will use either the extended address for direct communication within the PAN or the short address that was allocated by the PAN coordinator when the device associated.2
The PAN coordinator will often be mains powered, while the devices will most likely be battery powered. Applications that benefit from a star topology include home automation, personal computer (PC)peripherals, games, and personal health care.
The peer-to-peer topology also has a PAN coordinator; however, it differs from the star topology in that any device is able to communicate with any other device as long as they are in range of one another. Peer-to-peer topology allows more complex network formations to be implemented, such as mesh networking topology. Applications such as industrial control and monitoring, wireless sensor networks, asset and inventory tracking, intelligent agriculture, and security would benefit from such a network topology. A peer-to-peer network allows multiple hops to route messages from any device to any other device on the network. Such functions can be added at the higher layer, but they are not part of this standard. Each independent PAN selects a unique identifier. This PAN identifier allows communication between devices within a network using short addresses and enables transmissions between devices across independent networks. The mechanism by which identifiers are chosen is outside the scope of this standard 4

Figure 1 Showing Network Topologies
2.2.3 Protocol architecture
Devices are conceived to interact with each other over a conceptually simple wireless network. The definition of the network layers is based on the ISO model; although only the lower layers are defined in the standard, interaction with upper layers in intended, possibly using an IEEE802.15.2 logical link control sublayer accessing the MAC through a convergence sublayer. Implementations may rely on external devices or be purely embedded, self-functioning devices. 4

Figure 2 IEEE802.15.4 Protocol architecture
The upper layers, shown in Figure 2, consist of a network layer, which provides network configuration,
manipulation, and message routing, and an application layer, which provides the intended function of the device. The definition of these upper layers is outside the scope of this standard. 2

2.2.4 The MAC layers.
The Media Access Control (MAC) enables the transmission of MAC frames through the use of the physical channel. Besides the data services, it offers a management interface and itself manages access to the physical channel and networking beaconing. It also controls frame validation, guarantees time slots and handles nodes associations. Finally, it offers hook points for secure services.
Note that the IEEE802.15 standards do not use 802.ID or 802.IQ i.e. it’s does not exchange standard Ethernet frames. The physical frame-format is specified in IEEE802.15.4.
It is tailored to the fact most IEEE802.15.4 PHYs only support frames of up-to 127bytes (adaption layer protocols such as 6LoWPAN provide fragmentation schemes to support larger network packets. 4

2.2.5 Network Model
Nodes types
The standard defines two types of network node. The first one is the full-function device (FFD). It can serve as the coordinator of a personal area network just as it may function as a common mode. It implements a general model of communication which allows it to talk to any other device. It may also relay messages, in which case it is dubbed a coordinator (PAN coordinator when it is in charge of the whole network)
One the other hand, there are reduced-function devices (RFD). These are meant to be to be extremely simple deices with very modest resources and communication requirements: due to this, they can only communication with FFDs, and can never act as coordinators. 4 5

2.2.6 Data transport architecture.
Frames are the basic unit of data transport, of which there are four fundamental types (data, acknowledgment, beacon and MAC command frames), which provide a reasonable tradeoff between simplicity and robustness. Additionally, a super frame structure, defined by the coordinator, may be used, in which case two beacons act as its limits and provide synchronization to other devices as well as configuration information. A Super frame consists of sixteen equal-length slots, which can be further divided into an achieve part and an in active part, during which the coordinator may enter power saving mode, not needing to control its network. 45
With super frames contention occurs between their limits, and is resolved by CSMA/CA. Every transmission must end before the arrival of the second beacon. As mentioned before, applications with well-defined bandwidth needs can use up-to seven domains of one or more contention-less guaranteed time slots, trailing at the end of the super frame. The first part of the super frame must be sufficient to give service to the network structure and its devices. Super frames are typically utilized within the content of low latency devices, whose associations must be kept even if inactive for long periods of time.
Data transfers to the coordinator require a beacon synchronization phase. If applicable, followed by CSMA/CA transmission (by means of slots if super-frames are in use); acknowledge is optional. Data transfers from the coordinator usually follow devices requests; if beacons are in use; these are used to signal requests; the coordinator acknowledges the request and then sends the data in packets which are acknowledged by the device. The same is done when super-frames are not in use, only in this case there are no beacons to keep track of pending messages. 4
Point-to-point networks may either use un-slotted CSMA/CA or synchronization mechanism; in the case, communication between any two devices is possible, where in “structured” modes one of the devices must be the network coordinator.
In general, all implemented procedures follow a typical request confirm/indication-response classification. 5

2.2.7 CSMA-CA mechanism

The IEEE 802.15.4 LR-WPAN uses two types of channel access mechanism, depending on the network configuration. Non beacon-enabled PANs use an unslotted CSMA-CA channel access mechanism, as described in Each time a device wishes to transmit data frames or MAC commands, it waits for a random period. If the channel is found to be idle, following the random back off, the device transmits its data.
If the channel is found to be busy following the random back off, the device waits for another random period before trying to access the channel again. Acknowledgment frames are sent without using a CSMA-CA mechanism. Beacon-enabled PANs use a slotted CSMA-CA channel access mechanism, where the back off periods are aligned with the start of the beacon transmission. The back off periods of all devices within one PAN are aligned to the PAN coordinator. Each time a device wishes to transmit data frames during the CAP, it locates the boundary of the next back off period and then waits for a random number of back off periods. If the is busy, following this random back off, the device waits for another random number of back off periods before trying to access the channel again. If the channel is idle, the device begins transmitting on the next available back off period boundary. Acknowledgment and beacon frames are sent without using a CSMA-CA mechanism.

IEEE802.15.4 version Details and comments

IEEE802.15.4-2003 This was the initial release of the IEEE80.15.4 standard. It provided for two different PHYs –one for the lower frequency bands of 868 and 915MHz, and the other for 2.4GHz

IEEE802.15.4-2006 This 2006 release of the IEEE802.15.4 standard provided for an increase in the data rate achievable on the lower frequency bands. This release of the standard updated the PHY for 868 and 915MHz. It also defined four new modulation schemes that could be used-three for the lower frequency bands, and one for 2.4GHz.

IEEE802.15.4a This version of the IEEE802.15.4 standard defined two new PHYs. One used UWB technology and the other provided for using chirp spread spectrum at 2.4GHz

IEEE802.15.4c Updates for 2.4GHz,868MHz and 915MHz, UWB and the China 779-787MHz band.

IEEE802.15.4d 2.4GHz, 868MHz, 915MHz and Japanese 950-956MHz band

IEEE802.15.4c This release defines MAC enhancements to IEEE802.15.4 in support of the ISA SP100.11a application

IEEE802.15.4f This will define new PHYs for UWB, 2.4GHz band and also 433MHz.

IEEE802.15.4g This will define new PHYs for smart neighborhood networks. These may include applications such as smart grid applications for energy industry. It may include the 902-928MHz
Table 2Summary of IEEE802.15.4 version
Although new versions of the standard are available for use by any of the higher layer standards, ZigBee still uses the initial 2003 release of the IEEE802.15.4 standard.

2.2.7 IEEE802.15.4 Applications
The IEEE802.15.4 technology is used for a variety of different higher layer standards. In this way the basic physical and MAC layers are already defined, allowing the higher layers to be provided by individual system in use. 6

Application or System Description of the IEEE802.15.4 application or system

ZigBee ZigBee is supported by the ZigBee Alliance and provides the higher levels required for low powered radio system for control applications including lighting, heating and many other applications.

Wireless HART Wireless HART is an open-standard wireless networking technology that has been developed by HART communication Foundation for use in the 2.4GHz ISM band. The system uses IEEE802.15.4 for the lower layers and provides a time synchronized, self-organizing, and self-healing mesh architecture.

RF4CE RF4CE, Radio Frequency for consumer Electronics has amalgamated with the ZigBee alliance and aims to provide low power radio controls for audio visual applications, mainly for domestic applications such as set to boxes, televisions and the line. It promises enhanced communication and facilities when compared to existing controls.

MiWi MiWi and the accompanying MiWi P2P systems are designed by Microchip Technology. They are designed for low data transmission rates and short distance, low cost networks and they are aimed at applications including industrial monitoring and control, home and building automation, remote control and automated meter reading

ISA100.11a This standard has been developed by ISA as an open-standard wireless networking technology and is it described as a wireless system for industrial automation including process control and other related applications.

6LoWPAN This rather unusual name is an acronym for “IPv6 over low power Wireless Personal Area Networks” it’s a system that uses the basic IEE802.15.4, but using packet data in form of IPv6
Table 3 Applications of IEEE802.15.4 Standard
While the IEEE802.15.4 standard may not be well known as some of the higher-level standard and systems such as ZigBee that use IEEE802.15.4 technology as the underpinning lower levels system, it is nevertheless very important. It spans a variety of different systems, and as such provides a new approach-providing only the lower layers and allowing others systems to provide the higher layers which are tailored for the relevant application.
The 802.15.4 standard was specifically designed for the requirements of wireless sensing applications. The standard is very flexible, as it specifies multiple data rates and multiple transmission frequencies. The power requirements are moderately low; however, the hardware is designed to allow for the radio to be put to sleep, which reduces the power to a minimal amount. Additionally, when the node wakes up from sleep mode, rapid synchronization to the network can be achieved.
This capability allows for very low average power supply current when the radio can be periodically turned off. The standard supports the following characteristics; 6
Transmission frequencies 868MHz/902-928MHz/2.48-2.5GHz.
Data rates of 20kbps (868MHz Band) 40kbps (902MHz Band) and 250kbps (2.4GHz band)
Supports star and peer-to-peer (mesh) network connections.
Standard specifies optional use of AS-128 security for encryption of transmitted data.
Link quality in, which is useful for multi-hop mesh networking algorithms.
Uses direct sequence spread spectrum (DSSS) for robust data communication.
2.2.8 Comparison of the IEEE802.15.11 ,802.15.1, 802.15.4, and 802.15.6 wireless standards.
Wireless LAN (WLAN, also known as Wi-Fi) is a set of low tiers, terrestrial, network technologies for data communication. The WLAN standards operates on the 2.4GHz and 5GHz Industrial, Science and Medical(ISM) frequency bands.
It is specified by the IEEE802 standard and it comes in many different variations like IEEE802.11a/b/g/n. The application of WLAN has been most visible in the consumer market where most portable computers support at least one of the variation. 7
IEEE802.15.1 –Bluetooth
The IEEE802.15.1 standard is the basis for the Bluetooth wireless communication technology. Bluetooth is a low tier, ad hoc, terrestrial standard for short range communication. It is designed for small and low-cost devices with low power consumption. The technology operates with three classes of devices: Class 1, class 2, and class 3 where the range is about 100meters, 10meters, and 1meter respectively. Wireless LAN operates in the same 2.4GHz frequency band as Bluetooth, but the two technologies use different signaling methods which should prevent interference. 7
ZigBee a low-tier, ad hoc terrestrial, wireless standards in same ways similar to Bluetooth. The IEEE802.15.4 standard is commonly known as ZigBee, but ZigBee has some features in addition to those of 802.15.4. It operates in the 868MHz,915MHz and 2.4GHz ISM bands. 7

2.2.9 Modes of Operation
Wireless networks can have to distinct modes of operation; Ad-hoc and Infrastructured. Infrastructured wireless networks usually have some kind of base station which acts as a control central node which connects the wireless terminals.
The station is usually provided in order to enable access to the Internet, an intranet or other wireless networks. Most of the time the base stations have a fixed location, but certain mobile base stations also exit. The disadvantage over ad hoc networks is that the base station is a central point of failure. If it stops working none of the wireless terminals can communicate with each other.2
Ad hoc networks can be formed “on the fly” without the help of a base station. Self- organization is the key to forming an ad-hoc network because initially there is no central node to talk to. In ad-hoc networks the wireless terminals may communicate directly with each other which terminals in Infrastructured networks has to use the base station to relay their messages.
The different standards have different capabilities when it comes to these two modes of operation.
Table contains an overview of which standards support which modes. 7

Standard Ad hoc Infrastructured
802.11a/b/g/n Yes Yes
802.15.1 Yes No
802.15.4 Yes No
802.15.6 Unknown Unknown
Table 4 Table contains an overview of which standards support which modes
2.2.10 Power consumption considerations

In many applications that use this standard, devices will be battery powered, and battery replacement or
recharging in relatively short intervals is impractical. Therefore, the power consumption is of significant concern. This standard was developed with limited power supply availability in mind. However, the physical implementation of this standard will require additional power management considerations that are beyond the scope of this standard 24. The protocol has been developed to favor battery-powered devices. However, in certain applications, some of these devices could potentially be mains powered. Battery-powered devices will require duty-cycling to reduce power consumption. These devices will spend most of their operational life in a sleep state; however, each device periodically listens to the RF channel in order to determine whether a message is pending. This
mechanism allows the application designer to decide on the balance between battery consumption and
message latency. Higher powered devices have the option of listening to the RF channel continuously.
In addition to the power saving features of the LR-WPAN system, the UWB PHY also provides a hybrid modulation that enables very simple, no coherent receiver architectures to further minimize power consumption and implementation complexity.7

2.2.11 Security

From a security perspective, wireless ad hoc networks are no different from any other wireless network. They are vulnerable to passive eavesdropping attacks and active tampering because physical access to the wire is not required to participate in communications. The very nature of ad hoc networks and their cost objectives impose additional security constraints, which perhaps make these networks the most difficult environments to secure. Devices are low-cost and have limited capabilities in terms of computing power, available storage, and power drain; and it cannot always be assumed they have a trusted computing base nor a high-quality random number generator aboard. Communications cannot rely on the online availability of a fixed infrastructure and might involve short-term relationships between devices that never have communicated before. 3 These constraints severely limit the choice of cryptographic algorithms and protocols and influence the design of the security architecture because the establishment and maintenance of trust relationships between devices need to be addressed with care. In addition, battery lifetime and cost constraints put severe limits on the security overhead these networks can tolerate, something that is of far less concern with higher bandwidth networks. Most of these security architectural elements can be implemented at higher layers and, therefore, are outside the scope of this standard. The cryptographic mechanism in this standard is based on symmetric-key cryptography and uses keys that are provided by higher layer processes. The establishment and maintenance of these keys are outside the scope of this standard 6. The mechanism assumes a secure implementation of cryptographic operations and secure and authentic storage of keying material.
The cryptographic mechanism provides particular combinations of the following security services:
— Data confidentiality: Assurance that transmitted information is only disclosed to parties for which it
is intended.
— Data authenticity: Assurance of the source of transmitted information (and, hereby, that information
was not modified in transit).
— Replay protection: Assurance that duplicate information is detected.


2.3.1 Introduction
The nRF24L01(nRF24L01p) is a single chip 2.4GHz transceiver with an embedded baseband protocol engine (Enhanced Shock Burst), suitable for ultra-low power wireless applications. The nRF24L01+ is designed for operation in the world wide ISM frequency band at 2.400- 2.4835GHz. To design a radio system with the nRF24L01, you simply need an MCU (microcontroller) and a few external passive components. The high air data rate combined with two power saving modes make the nRF24L01 very suitable for ultra-low power designs. nRF24L01 is drop-in compatible with nRF24L01 and on-air compatible with nRF2401A, nRF2402, nRF24E1 and nRF24E2. Intermodulation and wideband blocking values in nRF24L01 are much improved in comparison to the nRF24L01 and the addition of internal filtering to nRF24L01 has improved the margins for meeting RF regulatory standards. 8
The nRF24L01 is configured and operated through a Serial Peripheral Interface(SPI). Through this interface the register map is available. The register map contains all configuration registers in the nRF24L01 and is accessible in all operation modes of the chip
The embedded base band protocol engine (Enhanced Sock-Burst) is based on packet communication and supports various modes from manual operation to advanced autonomous protocol operation. Internal FIFOs ensure a smooth data flow between the radio front end and the system’s MCU. Enhanced Shock-Burst reduces system cost by handling all the high-speed link layer operations.
The radio front end uses GFSK modulation. It has user configurable parameters like frequency channel, output power and air data rate.
The air data rate supported by the nRF24L01 is configurable to 2Mbps. The high air data rate combined with two power saving mode makes the nRF24L01 very suitable for ultra-low power designs.
Internal voltage regulators ensure a high-Power Supply Rejection Ratio(PSRR) and a wide power supply range. 8

Figure 3 showing nRF24L01 module

Figure 4 NRF24L01 Module and Pins Description

Pin Name Pin Function Description
1 CE Digital Input Chip Enable Activates RX or TX mode
2 CSN Digital Input SPI chip select
3 SCK Digital Input SPI clock
4 MOSI Digital Input SPI Slave Date input
5 MISO Digital Input SPI Slave Data Output, with tri-state option
6 IRQ Digital Input Maskable interrupt pin
7 VDD Power Power supply (+3V DC)
8 VSS Power Ground (0V)
9 XC2 Analog Output Crystal pin 2
10 XC1 Analog Output Crystal pin 1
11 VDD_PA Power Output Power Supply (+1.8V) to Power Amplifier
12 ANT1 RF Antenna interface 1
13 ANT2 RF Antenna interface 2
14 VSS Power Ground (0V)
15 VDD Power Power supply (+3V DC)
16 IREF Analog Input Reference current
17 VSS Power Ground (0V)
14 VDD Power Power supply (+3V DC)
19 DVDD Power Output Power Digital Supply output for dc-coupling purposes
20 VSS Power Ground (0V)
Table 5 nRF24L01 pin functions

2.2.2 Features
True single chip GFSK transceiver
Complete OSI link layer in hardware
Enhanced Shock-Burst
Auto Ack ; retransmit
Address and CRC computation
On the air data 1 or 2Mbps
Digital interface (SPI) speed 0-8Mbps
125RF channel operation
Short switching time enable frequency hopping
Fully RF compatible with Nrf24xx
5V tolerant signal input pads
20-pin package (QFN20 4x4mm)
Uses ultra-cost chip inductors and 2-layer PCB
Power supply range 1.9-to-3.6V
2.2.3 Applications
Wireless mouse, keyboard, joystick
Keyless entry
Wireless data communication
Alarm and security systems
Home automation
Intelligent sports equipment
Industrial sensors

2.2.4 Specification
Specification Value
PCB Size 15mm*29mm*0.8mm
Power supply 1.9V – 3.6V
Working current 13.5mA at 3Mbps/ 11.3mA at 0dBm output power
Sensitivity -85dBm at 1Mbps
Emission distance 70-100meter at 256kbps
Temperature range -40 to +850C
Data rare 256kbps/1Mbps/2mbps
Communication mode Enhanced ShockBurst TM
Table 6 nRF24L01 specifications

2.2.5 nRF24L01 Block diagram

Figure 5 nRF24L01 Block diagram
2.2.6 Pin assignment

Figure 6 nRF24L01 Pin assignment

2.2.7 Features of the nRF24L01 include
Worldwide 2.4GHz ISM band operation
126RF channels
Common Rx and Tx pins
GRSK modulation
1 and 2Mbps air data rate
1MHZ non-overlapping spacing at IMbps
2MHz non-overlapping channel spacing at 2Mbps
Programmable output power: 0, -6, -12 or -18dBm
11.3mA at 0dBm output power
Integrated channel filters
12.3mA at 2Mbps
-82dBm sensitivity at 2Mbps
-82dBm sensitivity at 1Mbps
Programmable LNA gain
RF Synthesizer
Fully integrated synthesizer
No external loop filer, VCO varactor diode or resonator
Accepts low cost ±60ppm 16MHz crystal
Enhanced Shock-Burst
1 to 32 bytes’ dynamic payload length
Automatic packet handling
Auto packet transaction handling
6 data pipes Multi-Ceiver for 1:6 star networks
Power Management
Integrated voltage regulator
1.9 to 3.6V supply range
Idle modes with fast-up times for advanced
Power management
22µA standby- 1mode, 900nA power down mode
Max 130µs start-up from standby -1 mode
Host Interface
4 – pin hardware SPI
Max 8Mbps
3 separate 32bytes Tx and Rx FIFOs
5V tolerant inputs.
2.2.8 Radio Control
This chapter describes the different modes the nRF24L01 radio transceiver can operate in and the parameters used to control the radio.
The nRF24L01 has a built-in state machine that controls the transitions between the different operating modes of the chip. The state machine takes input from user defined register values and internal signals. 12
2.2.9 RX mode
The RX mode is an active mode where the nRF24L01 radio is a receiver. To enter this mode, the nRF24L01 must have the PWR_UP bit set high, PRIM_RX bit set high and the CE pin set high.
In this mode the receiver demodulates the signals from the RF channel, constantly presenting the demodulated data to the baseband protocol engine. The baseband protocol engine constantly searches for a valid packet. If a valid packet is found (by a matching address and a valid CRC) the payload of the packet is presented in a vacant slot in the RX FIFO. If the RX FIFO is full, the received packet is discarded. 12 8
The nRF24L01 remains in RX mode until the MCU configures it to Standby-I mode or power down mode. If the automatic protocol features (Enhanced Shock-Burst) in the baseband protocol engine are enabled, the nRF24L01 can enter other modes in order to execute the protocol. 8 12
In RX mode a carrier detect signal is available. The carrier detect is a signal that is set high when a RF signal is detected inside the receiving frequency channel. The signal must be FSK modulated for a secure detection. Other signals can also be detected. The Carrier Detect (CD) is set high when an RF signal is detected in RX mode, otherwise CD is low. The internal CD signal is filtered before presented to CD register. The RF signal must be present for at least 128µs before the CD is set high. 8
2.2.10 TX mode
The TX mode is an active mode where the nRF24L01 transmits a packet. To enter this mode, the nRF24L01 must have the PWR_UP bit set high, PRIM_RX bit set low, a payload in the TX FIFO and, a high pulse on the CE for more than 10µs. 8
The nRF24L01 stays in TX mode until it finishes transmitting a current packet. If CE = 0 nRF24L01 returns to Standby-I mode. If CE = 1, the next action is determined by the status of the TX FIFO. If the TX FIFO is not empty the nRF24L01 remains in TX mode, transmitting the next packet. If the TX FIFO is empty, the nRF24L01 goes into standby-II mode. The nRF24L01 transmitter PLL operates in open loop when in TX mode. It is important to never keep the nRF24L01 in TX mode for more than 4ms at a time. If the auto retransmit is enabled, the nRF24L01 is never in TX mode long enough to disobey this rule. 12
2.2.11 Enhanced Shock-Burst
Enhanced Shock-Burst is a packet-based data link layer. It features automatic packet assembly and timing, automatic acknowledgement and re-transmissions of packets. Enhanced Shock-Burst enables the implementation of ultra-low power, high performance communication with low cost host microcontrollers. The features enable significant improvements of power efficiency for bi-directional and uni-directional systems, without adding complexity on the host controller side. 8 12
Enhanced Shock-Burst overview
Enhanced Shock-Burst uses Shock-Burst for automatic packet handling and timing. During transmit, Shock-Burst assembles the packet and clocks the bits in the data packet into the transmitter for transmission. During receive, Shock-Burst constantly searches for a valid address in the demodulated signal. When Shock-Burst finds a valid address, it processes the rest of the packet and validates it by CRC. If the packet is valid the payload is moved into the RX FIFO. The high speed bit handling and timing is controlled by Shock-Burst 8
Enhanced Shock-Burst features automatic packet transaction handling that enables the implementation of a reliable bi-directional data link. An Enhanced Shock-Burst packet transaction is a packet exchange between to transceivers, where one transceiver is the Primary Receiver (PRX) and the other is the Primary Transmitter (PTX). An Enhanced Shock-Burst packet transaction is always initiated by a packet transmission from the PTX, the transaction is complete when the PTX has received an acknowledgment packet (ACK packet) from the PRX. 8 12

Enhanced Shock-Burst packet format
The format of the Enhanced Shock-Burst packet is described in this chapter. The Enhanced Shock-
Pream ble 1 byte Address 3-5 byte Packet Control Field 9 bit Payload 0 – 32 byte C RC 1-2 byte
Burst packet contains a preamble field, address field, packet control field, payload field and a CR field.
Figure 7 An Enhanced ShockBurst Packet with payload (0-32 bytes
Automatic packet validation
Enhanced Shock-Burst features automatic packet validation. In receive mode the nRF24L01 is constantly searching for a valid address. If a valid address is detected the Enhanced Shock-Burst will start to validate the packet. 12
With static packet length the Enhanced Shock-Burst will capture the packet according to the length given by the RX_PW register. With DPL Enhanced Shock-Burst captures the packet according to the payload length field in the packet control field. After capturing the packet Enhanced Shock-Burst will perform
CRC. 12
If the CRC is valid, Enhanced Shock-Burst will check PID. The received PID is compared with the previous received PID. If the PID fields are different, the packet is considered new. If the PID fields are equal the receiver must check if the received CRC is equal to the previous CRC. If the CRCs are equal, the packet is defined as equal to the previous packet and is discarded. 8 12
2.2.12 Data and Control Interface
The data and control interface give you access to all the features in the nRF24L01. The data and control interface consist of the following six 5Volt tolerant digital signals:
IRQ (this signal is active low and is controlled by three maskable interrupt sources)
CE (this signal is active high and is used to activate the chip in RX or TX mode)
CSN (SPI signal)
SCK (SPI signal)
MOSI (SPI signal)
MISO (SPI signal)
You can use the SPI to activate the nRF24L01 data FIFOs or the register map by 1-byte SPI commands during all modes of operation. 8

Modulation is the process of encoding information from a message source in a manner suitable for transmission. It involves translating a baseband message signal to a band pass signal at frequencies
that are very high compared to the baseband frequency. Baseband signal is called modulating signal
and band pass signal is called modulated signal. 9 Modulation can be done by varying the Amplitude, Phase, or Frequency of a high frequency carrier in accordance with the amplitude of the message signal.

Figure 8: Signal characteristics to modify

Demodulation is the inverse operation: extracting the baseband message from the carrier so that it may be processed at the receiver.
The point to modulation is to take a message bearing signal and superimpose it upon a carrier signal for transmission. For ease of transmission carrier signals are generally high frequency for severable reasons; 10
For easy (low pass, low dispersion) propagation as electromagnetic waves.
So that they may be simultaneously transmitted without interference from other signals.
So as to enable the construction of small antennas (a fraction, usually a quarter of wavelength)
So as to be able to multiplex that is to combine multiple signals for transmission at the same time.
Modulation can be analog or digital;
2.3.1 Analog Modulation Schemes
This involves superimposing the message signal in analog form on a carrier which is a sinusoid of the form.
A cos??(w_c t?+?)
There are three quantities that can be varied in proportion to the modulating signal: the amplitude, the phase and frequency. The first scheme is Amplitude Modulation and the second two are called Angle Modulation schemes 10.

Amplitude Modulation.
In Amplitude Modulation or AM, the carrier signal A cos??(w?*t) has it amplitude A modulated in proportion to the message bearing (lower frequency) signal m(t) to give
A(1+m(t))cos??(w_c ? t).
The magnitude of m(t) is chosen to be less than or equal to 1, from reasons having to do with demodulation, i.e. recovery of the signal m(t) from the received signal. The modulation index is then defined to be ?=max?? m(t)?. 10

Figure 9: showing Amplitude Modulation and Demodulation
Frequency Modulation.
FM is also called angle modulation scheme, it was inspired by phase modulation but has proved to be more useful partly for its ease of generation and decoding. The main advantages of FM over AM are;
Improved signal to noise ratio (about 25dB) with respect to man-made interference.
Smaller geographical interference between neighboring stations. 11
Less radiated power.
Well defined service areas for given transmitter power.
Disadvantages of FM
Much more Bandwidth (as much as 20 times as much)
More complicated receiver and transmitter.
In this scheme the frequency of the modulation signal is changed in proportion to the message signal m(t). Thus, the signal that is transmitted is of the form; 10
A cos??(w_c ? t+?w?_0^t??m(t)dt)?
Here the signal m(t) is assumed to be normalized so that the maximum of the integral is 1 and ?? is called the frequency deviation of modulation scheme. The index of modulation of an FM signal to the form m(t)=cos??w_m ? t is defined to be ?=?_w/w_m .

Figure 10: Showing Frequency Modulation
2.3.2 Digital Modulation Scheme
The input is time sequence of symbols or pulses. The aim of digital modulation is to transfer a digital bit stream over an analog communication channel. Offers many advantages; Robustness to channel impairments, Easier multiplexing of various sources of information: voice, data, video. Can accommodate digital error-control codes, enables encryption of the transferred signals; More secure link.1011
After the conversion of an Analog signal to digital by sampling different type of digital modulation schemes can be achieved by the variation of different parameter of the carrier signal for example the Amplitude variation gives ASK, Frequency variation gives FSK and the phase variation gives PSK. Also, sometimes a combinational variation of this parameter is done to generate the hybrid modulation technique, a combinational variation of Amplitude and Phase Shift Keying (PSK). Many more digital modulation techniques are available and can also be designed depending upon the type of signal and the application. 9

Phase-shift keying (PSK) is a digital modulation process which conveys data by changing (modulating) the phase of a reference signal(the carrier wave). The modulation occurs by varying the sine and cosine inputs at a precise time. It is widely used for wireless LANs, RFID and Bluetooth communication.9
Amplitude-shift keying (ASK) is a form of amplitude modulation that represents digital data as variations in the amplitude of a carrier wave. In an ASK system, the binary symbol 1 is represented by transmitting a fixed-amplitude carrier wave and fixed frequency for a bit duration of T seconds. If the signal value is 1 then the carrier signal will be transmitted; otherwise, a signal value of 0 will be transmitted. 9

Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier signal. The technology is used for communication systems such as amateur radio, caller ID and emergency broadcasts. The simplest FSK is binary FSK (BFSK). BFSK uses a pair of discrete frequencies to transmit binary (0s and 1s) information. With this scheme, the “1” is called the mark frequency and the “0” is called the space frequency. 9
FSK has various forms which include; Minimum Shift Keying (MSK), Audio Frequency Shift Keying (AFSK), Gaussian Frequency Shift Keying (GFSK), Continuous-phase frequency-shift keying and Gaussian Minimum Shift Keying (GMSK). 9

Gaussian frequency shift keying (GFSK) is a modulation method for digital communication found in
many standards such as Bluetooth, DECT and Wavenis. Digital communication amounts to translating
symbols from a discrete alphabet into a signal that the transmitting side can send into a transmission
medium and from which the receiving side can recover the original symbols.
When the alphabet consists of just two symbols, the symbols are called bits. The modulation method is a variant of frequency modulation (FM) of some carrier frequency ?c.2 Frequency shift keying (FSK) conveys information by decreasing the carrier frequency for the duration of a 0 symbol and increasing the frequency for the duration of a 1 symbol. If one applies Gaussian filtering to the square-wave signal that would shift the carrier frequency, one gets GFSK. 10

Figure 11: Showing GFSK modulation

2.4 Other IEEE802.15.4 implementation module.

XBee RF Modules
The XBee and XBee-PRO RF Modules were engineered to meet IEEE 802.15.4
standards and support the unique needs of low-cost, low-power wireless sensor
networks. The modules require minimal power and provide reliable delivery of data between devices 14 The XBee radios can all be used with the minimum number of connections — power (3.3 V), ground, data in and data out with other recommended lines being Reset and Sleep. Additionally, most XBee families have some other flow control, input/output (I/O), analog-to-digital converter (A/D) and indicator lines built in. A version called the programmable XBee has an additional on-board processor for user’s code

Figure 12 XBee module

Advantages of nRF24L01 over XBee.
Covers longer distance than XBee. nFR24L01 covers 1km in open space and 70-100m in closed environment while XBee covers 10m. Therefore, coverage is limited for XBee and hence cannot be used as outdoor wireless communication system. It can be used in indoor wireless applications

2.4.1 Datasheet of XBee module 1415

Specification Value
Indoor Up to 100 ft (30m)
Outdoor RF line-of-sight Range Up to 300 ft (90m)
Transmit Power Output 1mW (0 dBm)
Number of Channels 16 Direct Sequence Channels
Serial Interface Data Rate 1200bps – 250kbps
Receiver Sensitivity -92dBm
Supported Network Topologies Point – to – point, Point – to – multipoint ; Peer – to – peer
Addressing options PAID ID, Channel and Addresses
Table 7 XBee Datasheet

Comparison of nRF24L01 and XBee
Both supports a Worldwide 2.4GHz ISM band operation
Both are compatible with Arduino boards

nRF24L01 XBee Comment
Supports 16 channels 16 channels direct channels Both have same requirements
1 and 2Mbps air data rate Bit rate of 250 Kbit/s per channel cannot be fully used for the payload (audio data) nRF24L01 has better data rate
nFR24L01 covers 1km in open space and 70-100m in closed environment It covers 30m in closed space and 90m open environment nRF24L01 covers longer distance
1.9 to 3.6V supply range Supply voltage 2.8- 3.4 V Both can be connected to Arduino
Receiver Sensitivity is -85dBm Receiver Sensitivity -92dBm Xbee has better sensitivity
Transmitter Current is 11.3mA Transmit Current is 45mA nRF24L01 consumes less current
Receiver Current is 12.3mA Receiver Current is 50mA nRF24L01 consumes less current
Table 8 Comparison between nRF24L01 and XBee

Advantages of nRF24L01 over XBee (why we chose nRF20L01 Over XBee).
Covers longer distance than XBee. nFR24L01 covers 1km in open space and 70-100m in closed environment while XBee covers 10m.
nRF24L04 consumes less power.
Low cost.
Arduino is an open-source physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing and MaxMSP). This board contains a microcontroller which is able to be programmed to sense and control objects in the physical world. By responding to sensors and inputs, the Arduino is able to interact with a large array of outputs such as LEDs, motors and displays. Because of its flexibility and low cost, Arduino has become a very popular choice for makers and makerspaces looking to create interactive hardware projects. 15 16
Arduino was introduced back in 2005 in Italy by Massimo Banzi as a way for non-engineers to have access to a low cost, simple tool for creating hardware projects. Since the board is open-source, it is released under a Creative Commons license which allows anyone to produce their own board. If you search the web, you will find there are hundreds of Arduino compatible clones and variations available but the only official boards have Arduino in its name. 16

Figure 13 Arduino board

The Arduino can interact with almost any device that uses some form of remote control, including TVs, audio equipment, cameras, garage doors, appliances, and toys. Most remote controls work by sending digital data from a transmitter to a receiver using infrared light (IR) or wireless radio technology.
Different protocols (signal patterns) are used to translate key presses into a digital signal recipes in.

2.5.1 Communicating using I2C and SPI
The I2C (Integrated Circuit) and SPI (Serial Peripheral Interface) standards were created to provide simple ways for digital information to be transferred between sensors and microcontrollers such as Arduino. Arduino libraries for both 12C and SPI make it easy for you to use both of these protocols.
The choice between I2C and SPI is usually determined by the devices you want to connect. Some devices provide both standards, but usually a device or chip supports one or the other 16
I2C has the advantage that it only needs two signal connections to Arduino- using multiple devices on the two connections is fairly easy, and you get acknowledgement that signals have been correctly received. 16
The disadvantages are that the data rate is shower than SPI and data can only be traveling in one direction at time, lowering the data rate even more if two-way communication is needed. It is also necessary to connect pull-up resistors to the connections to ensure reliable transmission of signals.
The advantages of SPI are that it runs at a higher data rate, and it has separate input and output communications. So it can send receive to select the active devices, so more connections are required if you have many devices to connect.
Most Arduino projects use SPI devices for high data rate applications. Such as Ethernet and memory cards, with just a single device attached. I2C is more typically used with sensors that don’t need to send a lot of data. 16

2.5.2 I2C
The two connections for the I2C bus are called SCL and SDA. These are available on a standard Arduino board using analog pin 5 for SLI, which provides a clock signal, and analog pin 4 for SDL, which is for transfer of data (on the mega use digital pin 20 for SDA and pin 21 for SCL). One device on the I2C bus is considered the master device. Its job is to coordinate the transfer of information between the other devices (slave) that are attached. There must be only one master, and in most case the Arduino is the master, controlling the other chips attached to it. 16

Figure 14 Showing I2C connections

An I2C master with one or more I2C slaves
I2C devices need a common ground to communicate. The Arduino Gnd pin must be connected to ground on each I2C device. Slave devices are identified by their address number. Each slave must have a unique address. Some I2C devices have a fixed address while others allow you to configure their address by setting pin high and low or by sending initialization commands. 15
Arduino uses 7-bit values to specify I2C address. Some device data sheds use 8-bit address values. If you do, divide that values by 2 to get the correct 7-bit value.
I2C and SPI only define how communication takes place between devices- the messages that need to each individual device and what it does. 16

2.5.3 SPI
The Serial Peripheral Interface (SPI) module is a full-duplex synchronous-serial interface useful for communicating with other peripherals or microcontrollers in master/slave relationship and it can transfer data over short distances at high speeds. The peripheral devices may be serial EEPROMs, shift registers, display drivers, analog-to-digital converters, etc. The SPI module is compatible with Motorola’s SPI and Sheltered Instruction Observation Protocol (SIOP) interfaces.
During data transfer devices can work either in master or in Slave mode. The source of synchronization is the system clock, which is generated by the master. The SPI module allows one or more slave devices to be connected to a single master device via the same bus 16. The SPI module can be configured to operate using two, three or four pins. In the 3-pin mode, the Slave select line is not used. In the 2-pin mode, both the MOSI and /SS lines are not used.
Different types of SPIs are available on Microchip microcontrollers. Some have an internal buffer mechanism and some do not. The buffer depth varies across part families. The SPI driver abstracts out these differences and provides a unified model for data transfer across different types of SPIs available.
Both transmitter and receiver provides a buffer in the driver which transmits and receives data to/from the hardware. The SPI driver provides a set of interfaces to perform the read and the write. 16

Figure 15 Showing SPI Connections
Signal connections for SPI master and slaves.
The pin numbers to use for SPI pins are shown in the Table below.

SPI Signal Standard Arduino board Arduino Mega
SCLK(clock) 13 53
MISO(Data out) 12 50
MOSI(Data in) 11 51
SS(Slave select) 10 53

Table 9 The pin numbers to use for SPI pins
The libraries that are included with Arduino; 16
EEPROM. Used to store and read information in memory that is preserved when power is removed.
Ethernet. Used to communicate with the Arduino Ethernet shield.
Firmata. A protocol used to simplify serial communication and control of the board.
Liquid Crystal. For controlling compatible LCD display.
Matrix. Helps manage a matrix of LEDs.
SD. Supports reading and writing files to an SD Card using external hardware.
Servo. Used to control servo motors
Software Serial. Enables additional serial ports.
SPI. Used for Ethernet and SPI hardware.
Sprite. Enables the use of sprites with a LED matrix.
Stepper. For working with stepper motors.
Wire. Works with I2C devices attached to the Arduino.
nRF24. Enables nRF24L01 module.
nRF audio master. Enables audio transmission on nRF
Advantage of SPI
It is very simple protocol hence it does not require processing overheads. Designers need to understand respective read/write timing diagrams of microcontroller/EPROM in order to use it.
It supports full duplex communication.
SPI uses push-pull configuration and hence higher data rates and longer distances are supported by SPI.
It consumes less power than I2C interface.
Data can be transferred at high speed in tens of MHz

We are the amplify the audio sound at the receiver end using an LM386N IC because of its suitability in the project. It is a very low-cost audio amplifier and can power any speaker. And the sound from the LM386 audio Amplifier can be adequately loud. 17
The LM386 amplifies the sound input into it by a factor of 200. All amplifiers need DC voltage in order to run. The LM386 takes anywhere from 4-12 volts of DC voltage to operate. The sound signals to be amplified are placed on terminals 2 and 3. The amplified sound signal then exits through terminal 5. After a few capacitors and a resistor to filter out unwanted noise that may be on this signal, we connect the speakers to play out the amplified sound. 17

Figure 16: Pin diagram of LM386
From the pin diagram, it is clear that LM386 is a simple Amplifier IC with possibly minimum external connections. The following table shows the functions of each pin in the LM386 Amplifier IC. 17

Pin Pin Name Function
1 Gain Gain setting Pin
2 Input – Inverting Input
3 Input + Non-Inventing input
4 GND Ground
5 Vout Output
6 Vs Power Supply Voltage
7 Bypass Bypass decoupling path
8 Gain Gain Setting Pin
Table 10 LM386 Pin functions

2.7 Conclusion
This section has presented background literature on IEEE wireless standards, nRF24L01and other IEEE802.15.4 implementation modules, Arduino boards, ISO model and sound amplification.


The design specifications were divided into three parts. This section presents these three parts; transmitter, receiver and Sound amplifier circuits.

The transmitter’s block diagram shown in Figure 14 below consists of a microcontroller (At-mega 328), nRF24L01, capacitors, resistors, an oscillator, voltage regulators and audio input pin. The is plugged into the audio jack of a TV, which supplies the audio signal that will be modulated and transmitted. The audio signal is transmitted wirelessly to the receiver.

We connected an oscillator to pins (9,10) of the microcontroller to provide it with a clock.
Connected two 22pF capacitors to the oscillator terminals for voltage stabilization.
Used a 5V voltage regulator (LM389) to drop 9V from the battery to 5V required by the microcontroller.
Also connected a 3.3V voltage regulator(LM11171) to drop 5V from LM389 to 3.3V required by the nRF24L01 module.
Connected a power LED between 5V and GND.
Connected a 1000µF capacitor between the VCC and the GND of the 9V connectors for voltage stabilization.
Connected 5V to pin 7 of the microcontroller for power supply.
Connected an audio input socket to pins (22,23) of the microcontroller.
Connected a 10k? resistor between the 5V and pin 1 of the microcontroller to control the flow of current.
CE and CSN of the nRF24L01 were connected to pins 13 and 14 of the microcontroller respectively to controller the transmission mode.
MISO and MOSI of the nRF2401 module were connected to pins 17 and 18 of the microcontroller respectively for input/output.
SCK pin of the nRF24L01 was connected to pin 19 of the microcontroller for the clock.
Connected a switch in-between the 5V path for ON/OFF operations on the transmitter.
Transmitter block circuit diagram

Figure 17: Transmitter circuit connections

The transmitter’s block diagram shown in Figure 15 below consists of a microcontroller (At-mega 328), nRF24L01, capacitors, resistors, an oscillator, voltage regulators and audio input pin. The is plugged into the audio jack of a TV, which supplies the audio signal that will be modulated and transmitted. The audio signal is transmitted wirelessly to the receiver.

We connected an oscillator to pins (9,10) of the microcontroller to provide it with a clock.
Connected two 22pF capacitors to the oscillator terminals for voltage stabilization.
Used a 5V voltage regulator (LM389) to drop 9V from the battery to 5V required by the microcontroller.
Also connected a 3.3V voltage regulator(LM11171) to drop 5V from LM389 to 3.3V required by the nRF24L01 module.
Connected a power LED between 5V and GND.
Connected a 1000µF capacitor between the VCC and the GND of the 9V connectors for voltage stabilization.
Connected 5V to pin 7 of the microcontroller for power supply.
Connected an audio output socket to pins (15,16) of the microcontroller.
Connected a 10k? resistor between the 5V and pin 1 of the microcontroller to control the flow of current.
CE and CSN of the nRF24L01 were connected to pins 13 and 14 of the microcontroller respectively to controller the transmission mode.
MISO and MOSI of the nRF2401 module were connected to pins 17 and 18 of the microcontroller respectively for input/output.
SCK pin of the nRF24L01 was connected to pin 19 of the microcontroller for the clock.
Connected a switch in-between the 5V path for ON/OFF operations on the transmitter.

The receiver circuit

Figure 18: Receiver circuit connections
The receiver’s block diagram that is shown in Figure above detects the transmitted
signal through the nRF24L01 and passes it to the microcontroller where DAC operation is done. From the microcontroller, the audio goes through the amplifier circuit for amplification. Thereafter a user can start receiving to the audio through earphones plugged in the amplifier circuit.


Figure 19: nRF24L01 module pin connections

Pin Name Pin function Description
1 CE Digital Input Chip Enable Activates RX or TX mode
2 CSN Digital Input SPI Chip Select
3 SCK Digital Input SPI Clock
4 MOSI Digital Input SPI Slave Data Input
5 MISO Digital Output SPI Slave Data Output, with tristate option
6 IRQ Digital Output Maskable interrupt pin. Active low
7 VDD Power Power Supply (+1.9V – +3.6V DC)
8 GND Power Ground (0V)

Table 11: nRF24L01 pin functions

Amplification circuit

The amplification circuit was designed using LM386N amplification IC

Figure 20: Amplification circuit

4.1 Introduction
This chapter presents the implementation of the project to achieve the major objective of coming up with an audio transceiver prototype. The implementation technologies and tools used are also highlighted.



Sound Amplifier

After the connections were made, microcontroller was programmed using the Arduino IDE. For communications between the microcontroller and nRF24L01 (using RF24 library). The CE and CSN pins of the nRF24L01 were connected to pins 7 and 8 respectively. The RF Transceivers can behave as a transmitter and receiver.
The power consumption of this module is 12mA during transmission.
Three of these pins are for the SPI communication and they are connected to the SPI pins of the Arduino but note that each Arduino board have different SPI pins. The pins CSN and CE can be connected to any digital pin of the Arduino board and they are used for setting the module in standby or active mode, as well as for switching between transmit or command mode. The last pin is an interrupt pin which doesn’t have to be used. So, once we connect the NRF24L01 modules to the Arduino boards we are ready to make the codes for both the transmitter and the receiver.